Create a new SceneRegistry instance.
The application.
Change to a new scene. Calling this function will load the scene data, delete all
entities and graph nodes under app.root
and load the scene settings and hierarchy.
The scene item (which can be found with SceneRegistry#find, URL of the scene file (e.g."scene_id.json") or name of the scene.
Optional
callback: ChangeSceneCallbackThe function to call after loading, passed (err, entity) where err is null if no errors occurred.
Find a Scene by name and return the SceneRegistryItem.
The name of the scene.
The stored data about a scene or null if no scene with that name exists.
Find a scene by the URL and return the SceneRegistryItem.
The URL to search by.
The stored data about a scene or null if no scene with that URL exists.
Return the list of scene.
All items in the registry.
Load the scene hierarchy and scene settings. This is an internal method used by the AppBase.
The URL of the scene file.
The function called after the settings are applied. Passed (err, scene) where err is null if no error occurred and scene is the Scene.
Loads and stores the scene data to reduce the number of the network requests when the same scenes are loaded multiple times. Can also be used to load data before calling SceneRegistry#loadSceneHierarchy and SceneRegistry#loadSceneSettings to make scene loading quicker for the user.
The scene item (which can be found with SceneRegistry#find, URL of the scene file (e.g."scene_id.json") or name of the scene.
The function to call after loading, passed (err, sceneItem) where err is null if no errors occurred.
Load a scene file, create and initialize the Entity hierarchy and add the hierarchy to the application root Entity.
The scene item (which can be found with SceneRegistry#find, URL of the scene file (e.g."scene_id.json") or name of the scene.
The function to call after loading, passed (err, entity) where err is null if no errors occurred.
Load a scene file and apply the scene settings to the current scene.
The scene item (which can be found with SceneRegistry#find, URL of the scene file (e.g."scene_id.json") or name of the scene.
The function called after the settings are applied. Passed (err) where err is null if no error occurred.
Unloads scene data that has been loaded previously using SceneRegistry#loadSceneData.
The scene item (which can be found with SceneRegistry#find or URL of the scene file. Usually this will be "scene_id.json".
Container for storing and loading of scenes. An instance of the registry is created on the AppBase object as AppBase#scenes.