API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classMapWorldRuntime
The live side of a MapWorld: loads and unloads levels on demand, each with its own asset scope and its own lifetime. ExoJS provides the mechanism, not the streaming policy. Nothing here watches a camera or guesses a radius: game code reads MapWorld.getNeighbours / MapWorld.getLevelsInBounds and calls loadLevel and unloadLevel when it decides to. Scope layout - the runtime owns everything below its own scope and nothing above it: ```text scene.loader (given to the runtime, never destroyed by it) └─ world (the runtime's own scope) ├─ level:forest └─ level:cave ```
import { MapWorldRuntime } from '@codexo/exojs-tilemap'The live side of a MapWorld: loads and unloads levels on demand, each with its own asset scope and its own lifetime.
ExoJS provides the mechanism, not the streaming policy. Nothing here watches a camera or guesses a radius: game code reads MapWorld.getNeighbours / MapWorld.getLevelsInBounds and calls loadLevel and unloadLevel when it decides to.
Scope layout - the runtime owns everything below its own scope and nothing above it:
```text scene.loader (given to the runtime, never destroyed by it) └─ world (the runtime's own scope) ├─ level:forest └─ level:cave ```
new(options: MapWorldRuntimeOptionsOptions for MapWorldRuntime.): MapWorldRuntimedestroy(): voidgetLevel(id: string): MapLevelRuntimeOne loaded level and everything that load produced. Created by MapWorldRuntime.loadLevel; destroying it unloads the level. There is nothing else to release aft…<DestroyableStructural interface for anything that holds resources requiring explicit release. ExoJS value types tend to implement this even when no external resources are…> | undefinedisLoaded(id: string): booleanisLoading(id: string): booleanloadLevel(id: string, options?: MapLevelCancelOptionsOptions for a MapWorldRuntime.loadLevel that spawns nothing.): Promise<MapLevelRuntimeOne loaded level and everything that load produced. Created by MapWorldRuntime.loadLevel; destroying it unloads the level. There is nothing else to release aft…<DestroyableStructural interface for anything that holds resources requiring explicit release. ExoJS value types tend to implement this even when no external resources are…>>loadLevel(id: string, options: MapLevelLoadOptionsOptions for a MapWorldRuntime.loadLevel that also spawns the level's map objects. `spawner` and `context` travel together: the context exists to be handed to t…<Context, Result>): Promise<MapLevelRuntimeOne loaded level and everything that load produced. Created by MapWorldRuntime.loadLevel; destroying it unloads the level. There is nothing else to release aft…<Result>>unloadLevel(id: string): booleandestroyed: booleanlevels: readonly MapLevelRuntimeOne loaded level and everything that load produced. Created by MapWorldRuntime.loadLevel; destroying it unloads the level. There is nothing else to release aft…<DestroyableStructural interface for anything that holds resources requiring explicit release. ExoJS value types tend to implement this even when no external resources are…>[]