WIP WIP WIP

This commit is contained in:
Schluffe
2026-03-16 00:18:11 +01:00
parent a1c4dd8401
commit 6e95c538fb
6 changed files with 84 additions and 46 deletions
+12
View File
@@ -3,6 +3,7 @@ import { type Component, createEffect, createSignal, onMount } from "solid-js";
import { render } from "solid-js/web";
import $, {
currentScene,
type SceneChange,
type SceneData,
sceneChangeSet,
sceneGraph,
@@ -121,6 +122,17 @@ const DevTools: Component<{ gameContainer: HTMLElement }> = ({
document.addEventListener("mousemove", handleMouseMove);
document.addEventListener("mouseup", stopResizing);
if (location.hash) {
const callback: SceneChange = (sceneData) => {
const name = location.hash.substring(1);
if (sceneData.name !== name) {
setScene(name).catch(console.error);
}
sceneChangeSet.delete(callback);
};
sceneChangeSet.add(callback);
}
});
return (