19 years of age. Cofounder the whistle programming language & the Deno Windowing organization and a core member of the Denosaurs organization creating projects such as Netsaur.
- Twitter: @1oad1n9
- discord: load1n9
- linkedin: dean-srebnik
⚡ Blazing fast, modern, Game Engine powered by WebGPU for Deno and the browser
Home Page: https://caviarengine.netlify.app/
License: MIT License
When I run the deno demo, I get:
~/TestProjects/Caviar: deno run -A --unstable src/index.ts
⚠️ The `--unstable` flag is deprecated and will be removed in Deno 2.0. Use granular `--unstable-*` flags instead.
Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags
error: Uncaught (in promise) TypeError: Deno[Deno.internal].core.ops.op_base64_decode is not a function
const DECODED = Deno.build.os === "darwin" && Deno.build.arch === "x86_64" ? Deno[Deno.internal].core.ops.op_base64_decode(BASE64) : new Uint8Array();
^
at https://glfw-binaries.deno.dev/3.4.0-patch2/glfw3_darwin.js:2:107
~/TestProjects/Caviar:
Hi
I am getting errors on trying to run the given example;
import { World, Scene, Rectangle } from 'https://deno.land/x/caviar/mod.ts';
class Game extends Scene {
public test = new Rectangle(0, 0, 100, 100, "#00ff00");
public test2 = new Rectangle(0, 0, 100, 100, "#00ff00");
public setup() {
this.addChild(this.test);
this.addChild(this.test2);
}
public update() {
this.test.setX(this.test.x + 5);
this.test2.setX(this.test2.x + 2);
}
}
const test = new World({
title: "test",
width: 800,
height: 600,
resizable: true,
}, [Game]);
await test.start();
The full trace is;
C:\Users\risharan\Documents\Dev\typescript\cav>deno run test.ts
Download https://deno.land/x/caviar/mod.ts
Warning Implicitly using latest version (2.4.1) for https://deno.land/x/caviar/mod.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/x/[email protected]/src/Plugin.ts
Download https://deno.land/x/[email protected]/src/World.ts
Download https://deno.land/x/[email protected]/src/entities/mod.ts
Download https://deno.land/x/[email protected]/src/events/EventManager.ts
Download https://deno.land/x/[email protected]/src/math/mod.ts
Download https://deno.land/x/[email protected]/src/renderers/types.ts
Download https://deno.land/x/[email protected]/src/scenes/mod.ts
Download https://deno.land/x/[email protected]/src/types.ts
Download https://deno.land/x/[email protected]/src/utils/Keycodes.ts
Download https://deno.land/x/[email protected]/src/utils/mod.ts
Download https://deno.land/x/[email protected]/src/scenes/Scene.ts
Download https://deno.land/x/[email protected]/deps.ts
Download https://deno.land/x/[email protected]/src/renderers/webgl/2d.ts
Download https://deno.land/x/[email protected]/src/math/Average.ts
Download https://deno.land/x/[email protected]/src/math/Bernstein.ts
Download https://deno.land/x/[email protected]/src/math/Between.ts
Download https://deno.land/x/[email protected]/src/math/Bezier.ts
Download https://deno.land/x/[email protected]/src/math/Clamp.ts
Download https://deno.land/x/[email protected]/src/math/Factorial.ts
Download https://deno.land/x/[email protected]/src/math/FuzzyEqual.ts
Download https://deno.land/x/[email protected]/src/math/const.ts
Download https://deno.land/x/[email protected]/src/math/matrices/mod.ts
Download https://deno.land/x/[email protected]/src/math/vector/mod.ts
Download https://deno.land/x/[email protected]/src/entities/Entity.ts
Download https://deno.land/x/[email protected]/src/entities/containers/mod.ts
Download https://deno.land/x/[email protected]/src/entities/geometry/mod.ts
Download https://deno.land/x/[email protected]/src/entities/sprites/mod.ts
Download https://deno.land/x/[email protected]/src/entities/textures/mod.ts
Download https://deno.land/x/[email protected]/src/utils/Frames.ts
Download https://deno.land/x/[email protected]/src/utils/HexToRGBA.ts
Download https://deno.land/x/[email protected]/src/utils/QuadTree.ts
Download https://deno.land/x/[email protected]/src/utils/atlas/mod.ts
Download https://deno.land/x/[email protected]/src/renderers/webgl/shader.ts
Download https://deno.land/x/[email protected]/src/renderers/webgl/types.ts
Download https://deno.land/x/[email protected]/src/renderers/webgl/util.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/x/[email protected]/src/math/matrices/TransformMatrix.ts
Download https://deno.land/x/[email protected]/src/entities/geometry/Rectangle.ts
Download https://deno.land/x/[email protected]/src/math/vector/Vector.ts
Download https://deno.land/x/[email protected]/src/math/vector/types.ts
Download https://deno.land/x/[email protected]/src/entities/sprites/Atlas.ts
Download https://deno.land/x/[email protected]/src/entities/sprites/AtlasSprite.ts
Download https://deno.land/x/[email protected]/src/entities/sprites/FrameBuffer.ts
Download https://deno.land/x/[email protected]/src/entities/sprites/Image.ts
Download https://deno.land/x/[email protected]/src/entities/sprites/Sprite.ts
Download https://deno.land/x/[email protected]/src/utils/atlas/Atlas.ts
Download https://deno.land/x/[email protected]/src/utils/atlas/GodotAtlas.ts
Download https://deno.land/x/[email protected]/src/utils/atlas/PhaserAtlas.ts
Download https://deno.land/x/[email protected]/src/utils/atlas/PixiAtlas.ts
Download https://deno.land/x/[email protected]/src/entities/containers/Button.ts
Download https://deno.land/x/[email protected]/src/entities/containers/Group.ts
Download https://deno.land/x/[email protected]/src/entities/textures/TextureSprite.ts
Download https://deno.land/x/[email protected]/src/entities/textures/palettes/mod.ts
Download https://deno.land/x/[email protected]/src/core/mod.ts
Download https://deno.land/x/[email protected]/src/web/mod.ts
Download https://deno.land/x/[email protected]/src/angle.ts
Download https://deno.land/x/[email protected]/src/decomposed.ts
Download https://deno.land/x/[email protected]/src/matrix2.ts
Download https://deno.land/x/[email protected]/src/matrix3.ts
Download https://deno.land/x/[email protected]/src/matrix4.ts
Download https://deno.land/x/[email protected]/src/projection.ts
Download https://deno.land/x/[email protected]/src/quaternion.ts
Download https://deno.land/x/[email protected]/src/vector2.ts
Download https://deno.land/x/[email protected]/src/vector3.ts
Download https://deno.land/x/[email protected]/src/vector4.ts
Download https://deno.land/[email protected]/path/mod.ts
Download https://deno.land/x/[email protected]/src/util.ts
Download https://deno.land/x/[email protected]/src/core/const.ts
Download https://deno.land/x/[email protected]/src/core/glfw.ts
Download https://deno.land/x/[email protected]/src/core/opengl.ts
Download https://deno.land/x/[email protected]/src/web/animation.ts
Download https://deno.land/x/[email protected]/src/web/canvas.ts
Download https://deno.land/x/[email protected]/src/web/context.ts
Download https://deno.land/x/[email protected]/src/web/document.ts
Download https://deno.land/x/[email protected]/src/web/element.ts
Download https://deno.land/x/[email protected]/src/web/image.ts
Download https://deno.land/x/[email protected]/wasm/mod.ts
Download https://deno.land/x/[email protected]/src/util.ts
Download https://deno.land/[email protected]/_util/os.ts
Download https://deno.land/[email protected]/path/_interface.ts
Download https://deno.land/[email protected]/path/common.ts
Download https://deno.land/[email protected]/path/glob.ts
Download https://deno.land/[email protected]/path/posix.ts
Download https://deno.land/[email protected]/path/separator.ts
Download https://deno.land/[email protected]/path/win32.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/x/[email protected]/wasm/wasm.js
Download https://deno.land/[email protected]/path/_constants.ts
Download https://deno.land/[email protected]/path/_util.ts
Download https://deno.land/x/[email protected]/src/web/ext/mod.ts
Download https://deno.land/x/[email protected]/src/web/webgl_object.ts
Download https://deno.land/[email protected]/_util/assert.ts
Download https://deno.land/x/[email protected]/plug.ts
Download https://deno.land/x/[email protected]/lib/decoder.ts
Download https://deno.land/x/[email protected]/lib/encoder.ts
Download https://deno.land/x/[email protected]/lib/image.ts
Download https://deno.land/x/[email protected]/lib/pixel.ts
Download https://deno.land/x/[email protected]/wasm.js
Download https://deno.land/[email protected]/encoding/base64.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/x/[email protected]/src/web/ext/angle_instance_arrays.ts
Download https://deno.land/x/[email protected]/src/web/ext/ext_blend_minmax.ts
Download https://deno.land/x/[email protected]/src/web/ext/ext_color_buffer_float.ts
Download https://deno.land/x/[email protected]/src/web/ext/ext_color_buffer_half_float.ts
Download https://deno.land/x/[email protected]/src/web/ext/ext_disjoint_timer_query.ts
Download https://deno.land/x/[email protected]/src/web/ext/ext_float_blend.ts
Download https://deno.land/x/[email protected]/src/web/ext/ext_frag_depth.ts
Download https://deno.land/x/[email protected]/src/web/ext/ext_shader_texture_lod.ts
Download https://deno.land/x/[email protected]/src/web/ext/ext_srgb.ts
Download https://deno.land/x/[email protected]/src/web/ext/ext_texture_filter_anisotropic.ts
Download https://deno.land/x/[email protected]/src/web/ext/khr_parallel_shader_compile.ts
Download https://deno.land/x/[email protected]/src/web/ext/oes_texture_float_linear.ts
Download https://deno.land/x/[email protected]/src/web/ext/oes_texture_half_float.ts
Download https://deno.land/x/[email protected]/deps.ts
Download https://deno.land/x/[email protected]/wasm.js
Download https://deno.land/[email protected]/fmt/colors.ts
Download https://deno.land/[email protected]/path/mod.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/x/[email protected]/cache.ts
Download https://deno.land/[email protected]/_util/os.ts
Download https://deno.land/[email protected]/path/_interface.ts
Download https://deno.land/[email protected]/path/common.ts
Download https://deno.land/[email protected]/path/glob.ts
Download https://deno.land/[email protected]/path/posix.ts
Download https://deno.land/[email protected]/path/separator.ts
Download https://deno.land/[email protected]/path/win32.ts
Download https://deno.land/x/[email protected]/deps.ts
Download https://deno.land/x/[email protected]/directories.ts
Download https://deno.land/x/[email protected]/file.ts
Download https://deno.land/x/[email protected]/helpers.ts
Download https://deno.land/[email protected]/path/_constants.ts
Download https://deno.land/[email protected]/path/_util.ts
Download https://deno.land/[email protected]/_util/assert.ts
Download https://deno.land/[email protected]/fs/ensure_dir.ts
Download https://deno.land/[email protected]/fs/exists.ts
Download https://deno.land/[email protected]/hash/mod.ts
Download https://deno.land/[email protected]/path/mod.ts
Download https://deno.land/x/[email protected]/file_fetcher.ts
Download https://deno.land/[email protected]/fs/_util.ts
Download https://deno.land/[email protected]/hash/_wasm/hash.ts
Download https://deno.land/[email protected]/hash/hasher.ts
Download https://deno.land/[email protected]/_util/os.ts
Download https://deno.land/[email protected]/path/_interface.ts
Download https://deno.land/[email protected]/path/common.ts
Download https://deno.land/[email protected]/path/glob.ts
Download https://deno.land/[email protected]/path/posix.ts
Download https://deno.land/[email protected]/path/separator.ts
Download https://deno.land/[email protected]/path/win32.ts
Download https://deno.land/[email protected]/encoding/hex.ts
Download https://deno.land/[email protected]/hash/_wasm/wasm.js
Download https://deno.land/[email protected]/path/_constants.ts
Download https://deno.land/[email protected]/path/_util.ts
Download https://deno.land/[email protected]/_util/assert.ts
Check file:///C:/Users/risharan/Documents/Dev/typescript/cav/test.ts
error: TS2694 [ERROR]: Namespace 'Deno' has no exported member 'NativeType'.
export type MapType<T extends Deno.NativeType> = T extends "u8" ? number
~~~~~~~~~~
at https://deno.land/x/[email protected]/src/util.ts:1:36
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'UnsafePointer'.
: T extends "pointer" ? Deno.UnsafePointer
~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/util.ts:11:32
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'NativeType'.
export type MapParamType<T extends Deno.NativeType> = T extends "pointer" ? (
~~~~~~~~~~
at https://deno.land/x/[email protected]/src/util.ts:15:41
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'UnsafePointer'.
| Deno.UnsafePointer
~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/util.ts:16:10
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'NativeType'.
export type MapParameters<T extends Deno.NativeType[]> = [
~~~~~~~~~~
at https://deno.land/x/[email protected]/src/util.ts:32:42
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'NativeType'.
[K in keyof T]: T[K] extends Deno.NativeType ? MapParamType<T[K]> : unknown;
~~~~~~~~~~
at https://deno.land/x/[email protected]/src/util.ts:34:39
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'ForeignFunction'.
export type MapFunction<T extends Deno.ForeignFunction> = (
~~~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/util.ts:38:40
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'ForeignFunction'.
export type MapFFI<T extends Record<string, Deno.ForeignFunction>> = {
~~~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/util.ts:43:50
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'UnsafePointer'.
export function init(GetProcAddress: (name: string) => Deno.UnsafePointer) {
~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/core/opengl.ts:1277:61
TS2339 [ERROR]: Property 'UnsafeFnPointer' does not exist on type 'typeof Deno'.
const fnptr = new Deno.UnsafeFnPointer(
~~~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/core/opengl.ts:1287:28
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'ForeignFunction'.
(symbols as Record<string, Deno.ForeignFunction>)[name],
~~~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/core/opengl.ts:1289:39
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'ForeignFunction'.
export async function prepare<S extends Record<string, Deno.ForeignFunction>>(
~~~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/plug.ts:101:61
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'DynamicLibrary'.
): Promise<Deno.DynamicLibrary<S>> {
~~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/plug.ts:104:17
TS2551 [ERROR]: Property 'dlopen' does not exist on type 'typeof Deno'. 'Deno.dlopen' is an unstable API. Did you forget to run with the '--unstable' flag, or did you mean 'open'?
return Deno.dlopen(file, symbols);
~~~~~~
at https://deno.land/x/[email protected]/plug.ts:106:15
'open' is declared here.
export function open(
~~~~
at asset:///lib.deno.ns.d.ts:850:19
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'ForeignFunction'.
Deno.ForeignFunction
~~~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/core/glfw.ts:616:10
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'UnsafePointer'.
lib.symbols.glfwGetProcAddress(cstr(name)) as Deno.UnsafePointer
~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/core/glfw.ts:623:56
TS2339 [ERROR]: Property 'UnsafePointerView' does not exist on type 'typeof Deno'.
const str = new Deno.UnsafePointerView(ptr).getCString();
~~~~~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/web/context.ts:931:32
TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
sourcePtr[0] = Deno.UnsafePointer.of(sourceEncoded).value;
~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/web/context.ts:2029:25
TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
new Deno.UnsafePointer(BigInt(offset)),
~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/web/context.ts:2583:16
TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
new Deno.UnsafePointer(BigInt(offset)),
~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/web/context.ts:2611:16
TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
? new Deno.UnsafePointer(BigInt(pixels))
~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/web/context.ts:2644:20
TS2339 [ERROR]: Property 'UnsafePointerView' does not exist on type 'typeof Deno'.
const view = new Deno.UnsafePointerView(mapped);
~~~~~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/web/context.ts:3022:27
TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
ptrs[i] = Deno.UnsafePointer.of(varyingCstrs[i]).value;
~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/web/context.ts:3492:22
TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
pointers[i] = Deno.UnsafePointer.of(e).value;
~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/web/context.ts:3549:26
TS2694 [ERROR]: Namespace 'Deno' has no exported member 'UnsafePointer'.
handle: Deno.UnsafePointer;
~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/web/canvas.ts:16:16
TS2339 [ERROR]: Property 'UnsafePointerView' does not exist on type 'typeof Deno'.
new Deno.UnsafePointerView(new Deno.UnsafePointer(errptr[0]))
~~~~~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/web/canvas.ts:64:20
TS2339 [ERROR]: Property 'UnsafePointer' does not exist on type 'typeof Deno'.
new Deno.UnsafePointerView(new Deno.UnsafePointer(errptr[0]))
~~~~~~~~~~~~~
at https://deno.land/x/[email protected]/src/web/canvas.ts:64:47
TS2339 [ERROR]: Property 'setX' does not exist on type 'Rectangle'. this.test.setX(this.test.x + 5);
~~~~
at file:///C:/Users/risharan/Documents/Dev/typescript/cav/test.ts:13:19
TS2339 [ERROR]: Property 'setX' does not exist on type 'Rectangle'.
this.test2.setX(this.test2.x + 2);
~~~~
at file:///C:/Users/risharan/Documents/Dev/typescript/cav/test.ts:14:20
Found 30 errors.
I downloaded and ran the two moving rectangles starter program, but I seem to missing a driver of some sort. The full error is below. Has a solution been found for this problem?
Full error:
GlfwError: 65542 WGL: OpenGL ES requested but WGL_ARB_create_context_es2_profile is unavailable
error: Uncaught (in promise) Error: Failed to create window
throw new Error("Failed to create window");
^
at new WindowGlfw (https://raw.githubusercontent.com/deno-windowing/dwm/main/src/platform/glfw/window.ts:563:13)
at createWindow (https://raw.githubusercontent.com/deno-windowing/dwm/main/src/platform/mod.ts:29:10)
at new WebGLCanvas (https://raw.githubusercontent.com/deno-windowing/gluten/main/src/webgl/canvas.ts:18:19)
at new World (https://deno.land/x/[email protected]/src/World.ts:22:5)
at file:///C:/Users/jakel/OneDrive/UNH/sem7/IT%20505/repos/finalproject/app/app.ts:16:14
error: Uncaught TypeError: Cannot convert object to primitive value
new BigUint64Array([BigInt(Deno.UnsafePointer.of(buf))]).buffer,
^
at BigInt ()
at WebGLRenderingContext.shaderSource (https://deno.land/x/[email protected]/src/webgl/renderingContext.ts:737:29)
at loadShader (https://deno.land/x/[email protected]/src/renderers/webgl/util.ts:41:8)
at initShaderProgram (https://deno.land/x/[email protected]/src/renderers/webgl/util.ts:15:24)
at new WebGLRenderer2D (https://deno.land/x/[email protected]/src/renderers/webgl/2d.ts:40:21)
at new World (https://deno.land/x/[email protected]/src/World.ts:29:21)
at file:///C:/Users/popit/workspace/deno/kekotest/main.ts:8:14
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.