This page captures practical migration notes from older ExoJS usage patterns to the current runtime model.
Current model:
Applicationdrives frame lifecycleScene.update(delta)mutates stateScene.draw(runtime)submits drawablesApplicationflushes/presents through the active backend runtime
Scene code should render via drawables:
public override draw(runtime: import('exojs').SceneRenderRuntime): void {
this.root.render(runtime);
}Application now defaults to auto backend mode:
- prefer WebGPU when available
- fallback to WebGL2 on unavailable/failed WebGPU initialization
Explicit backend forcing remains available.
Use pushScene/popScene for overlays and pause menus rather than replacing every scene:
await app.sceneManager.pushScene(new PauseScene(), { mode: 'modal' });
await app.sceneManager.popScene();For larger projects, replace hand-maintained preload lists with manifest bundles:
loader.registerManifest(manifest);
await loader.loadBundle('boot');Prefer built-in node/runtime features over custom backend hacks:
filtersmaskcacheAsBitmapRenderTargetPass
Use Sound pooling and audio sprites for frequent UI/gameplay SFX.
- migrate one scene at a time
- keep scene logic in
Scenelifecycle methods - keep rendering explicit (
drawable.render(runtime)) - verify with
npm testandnpm run perf:benchmark