Fix engine errors

This commit is contained in:
Schluffe
2026-09-18 19:05:24 +02:00
parent 1c6f2368a1
commit 9ca21bdcb8
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -167,6 +167,7 @@ export async function setScene(name: string): Promise<void> {
postProcess(); postProcess();
} }
const previousSceneData = currentScene.data;
currentScene.data = data; currentScene.data = data;
self.dispatchEvent(new Event("resize")); self.dispatchEvent(new Event("resize"));
@@ -174,7 +175,7 @@ export async function setScene(name: string): Promise<void> {
currentScene.process = process; currentScene.process = process;
for (const callback of sceneChangeSet.values()) { for (const callback of sceneChangeSet.values()) {
callback(data, currentScene.data); callback(currentScene.data, previousSceneData);
} }
} }
+1 -1
View File
@@ -90,7 +90,7 @@ export function resizeCanvas(width: number, height: number): void {
boundaries.minX = translation.x; boundaries.minX = translation.x;
boundaries.minY = translation.y; boundaries.minY = translation.y;
boundaries.maxX = translation.x + canvas.width; boundaries.maxX = translation.x + canvas.width;
boundaries.maxY = translation.x + canvas.height; boundaries.maxY = translation.y + canvas.height;
} }
export function resetCtx() { export function resetCtx() {