Skip to content

Commit

Permalink
chore: bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
load1n9 committed Jan 24, 2024
1 parent db970ef commit c86235b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ callback ([DWM](https://github.com/deno-windowing/dwm) handles both).

```ts
// GLES2 3.2 API
import * as gl from "https://deno.land/x/[email protected].1/api/gles23.2.ts";
import * as gl from "https://deno.land/x/[email protected].2/api/gles23.2.ts";

// Initialize function pointers
gl.load(yourGetProcAddress);
Expand Down Expand Up @@ -53,10 +53,10 @@ Extensions:
## Maintainers

- Dj ([@DjDeveloperr](https://github.com/DjDeveloperr))
- Loading ([@load1n9](https://github.com/load1n9))
- Dean Srebnik ([@load1n9](https://github.com/load1n9))

## License

[Apache-2.0](./LICENSE) licensed.

Copyright 2023 © The Deno Windowing Team
Copyright 2024 © The Deno Windowing Team
2 changes: 1 addition & 1 deletion examples/babylon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Game extends World {
camera.setTarget(BABYLON.Vector3.Zero());

// This attaches the camera to the canvas
camera.attachControl(window, true);
camera.attachControl(globalThis, true);

// This creates a light, aiming 0,1,0 - to the sky (non-mesh)
const light = new BABYLON.HemisphericLight(
Expand Down
2 changes: 1 addition & 1 deletion examples/triangle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
createWindow,
getProcAddress,
mainloop,
} from "https://deno.land/x/[email protected].3/mod.ts";
} from "https://deno.land/x/[email protected].4/mod.ts";
import * as gl from "../api/gles23.2.ts";

const window = createWindow({
Expand Down
20 changes: 10 additions & 10 deletions src/webgl/canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,38 @@ import {
import "./renderingContext.ts";

export class WebGLCanvas extends HTMLElement {
window: DwmWindow;
win: DwmWindow;
#context: WebGLRenderingContext;

constructor(options: CreateWindowOptions) {
super();
this.window = createWindow(Object.assign({
this.win = createWindow(Object.assign({
glVersion: [2, 0],
gles: true,
}, options));
this.#context = new WebGLRenderingContext(this.window);
this.#context = new WebGLRenderingContext(this.win);
}

get width() {
const size = this.window.size;
const size = this.win.size;
return size.width;
}

set width(width: number) {
const size = this.window.size;
const size = this.win.size;
size.width = width;
this.window.size = size;
this.win.size = size;
}

get height() {
const size = this.window.size;
const size = this.win.size;
return size.height;
}

set height(height: number) {
const size = this.window.size;
const size = this.win.size;
size.height = height;
this.window.size = size;
this.win.size = size;
}

getContext(contextId: "webgl"): WebGLRenderingContext;
Expand Down Expand Up @@ -77,7 +77,7 @@ export class WebGLCanvas extends HTMLElement {

async run() {
await mainloop(() => {
this.window.swapBuffers();
this.win.swapBuffers();
}, false);
}
}
2 changes: 1 addition & 1 deletion src/webgl/deps.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "https://deno.land/x/[email protected].3/mod.ts";
export * from "https://deno.land/x/[email protected].5/mod.ts";

0 comments on commit c86235b

Please sign in to comment.