Skip to content

Commit

Permalink
Fixed resize crash under WebGPU
Browse files Browse the repository at this point in the history
  • Loading branch information
BarthPaleologue committed Nov 26, 2023
1 parent 7b97bcf commit ccd5f9c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ts/flatfield.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ scene.executeWhenReady(() => {
});

window.addEventListener("resize", () => {
engine.resize();
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
engine.resize(true);
});
2 changes: 1 addition & 1 deletion src/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ scene.executeWhenReady(() => {
});

window.addEventListener("resize", () => {
engine.resize();
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
engine.resize(true);
});
2 changes: 1 addition & 1 deletion src/ts/minimal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ThinInstancePatch.CreateSquare(new Vector3(0, 0, 0), patchSize, patchResolution,
});

window.addEventListener("resize", () => {
engine.resize();
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
engine.resize(true);
});
2 changes: 1 addition & 1 deletion src/ts/planet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ scene.executeWhenReady(() => {
});

window.addEventListener("resize", () => {
engine.resize();
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
engine.resize(true);
});

0 comments on commit ccd5f9c

Please sign in to comment.