SceneLoader

SceneLoader responsible for loading .scn (JSON) files and instantiating the scene graph.

Constructor

new SceneLoader()

Methods

(async, static) load(path) → {Promise.<Scene>}

Loads a scene from a JSON file.

Parameters:
NameTypeDescription
pathstring

The path to the .scn file.

Returns:

The loaded scene.

Type: 
Promise.<Scene>

(static) parse(data) → {Promise.<Scene>}

Parses a scene JSON object and creates the Scene.

Parameters:
NameTypeDescription
dataobject

The scene JSON data.

Returns:

The instantiated scene.

Type: 
Promise.<Scene>

(static) validate()

Validate a scene payload without constructing or registering a Scene.