Files
dusk/types/scene/scene.d.ts
T
YourWishes e61914bad4 Finish JerryScript Entity/Scene wiring; remove JSON serialize/deserialize
Register Entity, the generic Component wrapper, and Scene as JerryScript
classes (modulelist.c ties them together, plus their .d.ts stubs), so
scenes/entities can be built from script going forward instead of the
JSON scene format.

With scripting now the intended authoring path, drop the JSON
serialize/deserialize machinery entirely: componentdefinition_t's
serialize/deserialize callbacks, every component's *Serialize/
*Deserialize function, entitySerialize/entityDeserialize,
sceneSerialize/sceneDeserialize, and the "prefabs/<name>.json"/
"scenes/<name>.json" asset fallback in entityPrefabResolveAndApply/
scenePrefabResolveAndApply (C-coded prefabs only now). physicsshape.c
and its test are removed outright since they only existed for this.
game.c's test scene now comes from the existing overworldSceneCreate()
C builder instead of loading the now-deleted assets/scenes/test.json.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-30 11:19:08 -05:00

28 lines
817 B
TypeScript

// Copyright (c) 2026 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
/**
* A scene: an isolated pool of entities/components. `new Scene()`
* creates an empty scene -- it is not made active automatically, call
* `.setActive()` for that. `Entity`/`Component` always operate on
* whichever scene is currently active, not on a specific Scene
* instance.
*/
declare class Scene {
constructor();
/** The engine-assigned numeric scene ID. */
readonly id: number;
/** Makes this the active scene (see Scene.getActive()). */
setActive(): void;
/** Destroys this scene and all its entities/components. */
dispose(): void;
/** Gets the currently active scene, or undefined if none is active. */
static getActive(): Scene | undefined;
}