Skip to content

luxe: world/scene


import "luxe: world/scene" for Scene

Scenes are collections of entities that are stored together and can be instanced together. If entities in a scene have a transform modifier without a transform parent, the scene root will automatically be set as their parent.

Once a scene is instanced in a world, all its entities behave just like other entities in the world and get assigned unique entity UUIDs. Relative scene UUIDs, or named entities within a scene can be accessed via the root entity of the scene instance.

Getting information about a Scene is generally done via the Entity.___(_) functions that mention a context. Resolving scene addresses is done Entity.get_addressed_in(scene, address).

Scene.create(world : World, scene : Scene) : Entity

Loads a scene from a scene asset. Returns the root entity of the newly loaded scene.

var main_root = Scene.create(app.world, Asset.scene("scene/main"))

Scene.create(world : World, scene : Scene, on_ready : Fn) : Entity

Version of scene load that calls on_ready function when done loading (just before scene script runs).

Scene.has(entity : Entity) : unknown

Get if the entity the root of a scene.

Scene.fix_id(id : String) : unknown

Given a full absolute ID to the scene.lx asset, make it a path id (note: temporary solution till asset ids migrate)

Scene.connect(world : World, scene_id : String, wire : Num, fn : Fn) : unknown

no docs found

Scene.send(scene_id : String, wire : Num, entity : Entity, data : Any) : unknown

no docs found

import "luxe: world/scene" for SceneReady

no docs found

var world : World = 0
var scene : Entity = Entity.none
var data : Any = null
var state : States = null

SceneReady.new(world : World, scene : Entity) : SceneReady

no docs found

SceneReady.editor_new(world : World, scene : Entity) : SceneReady

no docs found

SceneReady.ready(world : World, scene : Entity) : unknown

no docs found

SceneReady.ready() : unknown

no docs found

SceneReady.change(change : SceneChange) : unknown

no docs found

SceneReady.editor_change(change : SceneChange) : unknown

no docs found

SceneReady.editor_ready(world : World, scene : Entity) : unknown

no docs found

SceneReady.editor_ready() : unknown

no docs found

SceneReady.tick(delta : Num) : unknown

no docs found

SceneReady.editor_tick(delta : Num) : unknown

no docs found

SceneReady.destroy(world : World, scene : Entity) : unknown

no docs found

SceneReady.destroy() : unknown

no docs found

SceneReady.editor_destroy(world : World, scene : Entity) : unknown

no docs found

SceneReady.editor_destroy() : unknown

no docs found

import "luxe: world/scene" for Stage

no docs found

Stage.create(world : World, stage : Stage) : unknown

no docs found