MountedScene
A scene’s component mounted headless: the game the devtools attach to, and what unmounts the scene, destroying its entities. The caller destroys the world. Here rather than beside the mount, so a room that steps one needs the core alone.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
input |
StepInput |
What every step reads, which holdInput writes. |
reload? |
() => Promise<void> |
Mounts the scene again, so its entities spawn anew, and resolves once every render and effect of the mount has settled: a room calls it in the step a restart raised the world’s SceneReloadsTrait, and steps no more until it resolves. Rejects with what the scene throws as it mounts. mountHeadlessScene gives one; a test’s stand-in for a mount may leave it out. |
scene? |
Object3D<Object3DEventMap> |
The scene the mount’s views add their objects to, which nothing draws: a room counts its objects, since a view that clears what it adds only on a frame grows it for as long as the room runs. |
unmount |
() => Promise<void> |
- |
world |
World |
The world it made, with the map’s ground and the scene’s entities. Step it with stepSeconds(game, seconds) or through the devtools store, and destroy it with world.destroy() once done. |