Skip to content

Commit

Permalink
chore: bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
load1n9 committed Mar 9, 2023
1 parent 7ad5834 commit 9d0b916
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cli/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = "2.6.2";
export const VERSION = "2.6.3";
4 changes: 2 additions & 2 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// export * from "https://deno.land/x/daybreak@0.1.2/mod.ts";
export { Matrix4 } from "https://deno.land/x/gmath@0.1.11/mod.ts";
export * from "https://deno.land/x/gluten@0.1.4/mod.ts";
export * from "https://deno.land/x/gluten@0.1.5/mod.ts";
export * from "https://deno.land/x/dwm@0.3.2/mod.ts";
2 changes: 1 addition & 1 deletion examples/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const test = new World({
width: 1800,
height: 1600,
resizable: true,
gles: true
gles: true,
}, [Game]);

await test.start();
4 changes: 2 additions & 2 deletions examples/sprite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class Game extends Scene {
this.addChild(this.test);
}
update(): void {
this.test.nextFrame();
this.world.reRender = true;
this.test.nextFrame();
this.world.reRender = true;
}
}

Expand Down
11 changes: 7 additions & 4 deletions src/World.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { CreateWindowOptions, WindowKeyboardEvent } from "https://deno.land/x/dwm@0.3.0/mod.ts";
import { WebGLCanvas } from "../deps.ts";
import {
CreateWindowOptions,
WebGLCanvas,
WindowKeyboardEvent,
} from "../deps.ts";
import { Scene } from "../mod.ts";
import { KeyManager } from "./events/KeyManager.ts";
import { WebGLRenderer2D } from "./renderers/webgl/2d.ts";
import type { MouseMotionEvent, RGBA, } from "./types.ts";
import type { MouseMotionEvent, RGBA } from "./types.ts";
import { hexToRGBA, printBanner, sleepSync } from "./utils/mod.ts";
import { VERSION } from "./version.ts";

Expand All @@ -22,7 +25,7 @@ export class World extends WebGLCanvas {
constructor(params: CreateWindowOptions, scenes: Array<typeof Scene>) {
super(params);
this.params = params;
// this.params.glVersion = this.params.glVersion || [3, 3];
this.params.glVersion = this.params.glVersion || [3, 3];
this.scenes = scenes;
this.currentScene = new this.scenes[0](this);
this.keyManager = new KeyManager(this);
Expand Down
8 changes: 6 additions & 2 deletions src/renderers/webgl/2d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,12 @@ export class WebGLRenderer2D {
setBuffer(this.#gl, buffers.position, this.#location.position, 2);
setBuffer(this.#gl, buffers.coords, this.#location.texture, 2);

const x = entity instanceof Image || entity instanceof FrameBuffer ? entity.x : entity.x-entity.frame.x / this.canvas.width * 2;
const y = entity instanceof Image || entity instanceof FrameBuffer ? entity.y : entity.y-entity.frame.y/ this.canvas.height * -2;
const x = entity instanceof Image || entity instanceof FrameBuffer
? entity.x
: entity.x - entity.frame.x / this.canvas.width * 2;
const y = entity instanceof Image || entity instanceof FrameBuffer
? entity.y
: entity.y - entity.frame.y / this.canvas.height * -2;

this.#gl.activeTexture(this.#gl.TEXTURE0);
this.#gl.bindTexture(this.#gl.TEXTURE_2D, buffers.texture);
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = "2.6.2";
export const VERSION = "2.6.3";
2 changes: 1 addition & 1 deletion web/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = "2.6.2";
export const VERSION = "2.6.3";

0 comments on commit 9d0b916

Please sign in to comment.