Delete framework dir

This commit is contained in:
2025-07-23 00:00:25 +01:00
parent ac172e4cd4
commit 4d32146eb3
250 changed files with 0 additions and 14158 deletions

View File

View File

@@ -1,12 +0,0 @@
import { Scene } from './scene';
export declare class SceneManager {
scenes: Map<string, Scene>;
currentScene: Scene;
defaultScene: Scene;
constructor();
init(): void;
addScene(scene: Scene): void;
removeScene(scene: Scene): void;
switchTo(scene: Scene): void;
setDefaultScene(scene: Scene): void;
}

View File

@@ -1,33 +0,0 @@
export class SceneManager {
constructor() {
this.scenes = new Map();
}
init() {
if (this.defaultScene) {
this.switchTo(this.defaultScene);
}
}
addScene(scene) {
this.scenes.set(scene.id, scene);
}
removeScene(scene) {
if (scene === this.currentScene)
this.currentScene.onDeactivate();
this.scenes.delete(scene.id);
}
switchTo(scene) {
if (scene === this.currentScene)
return;
let data;
if (this.currentScene) {
this.currentScene.onDeactivate();
data = this.currentScene.data;
}
this.currentScene = this.scenes.get(scene.id);
this.currentScene.onSwitch(data);
this.currentScene.onActivate(this);
}
setDefaultScene(scene) {
this.defaultScene = scene;
}
}

View File

@@ -1,10 +0,0 @@
import { SceneManager } from './manager';
export interface Scene {
id: string;
data: any;
onActivate(manager: SceneManager): any;
onDeactivate(): any;
onSwitch(data: any): any;
update(dt: number): any;
updateDraw(): any;
}

View File

@@ -1 +0,0 @@
export {};