Constructor
new L3D.Loki()
Properties
If false, user scripts won't be loaded.
If false, WebXR will not be enabled.
If true, exception catching will be done in inner engine loops, otherwise it won't use exception catching to improve performance.
Maps classes name like "Prefab" or "Animation" to its namespace "Loki.Prefab". Used in AssetLoader and AssetManager when reading classnames from JSONs.
Contains all of the registered components.
If true, extra debugging info will be logged.
The current active graph
True when the user has interacted with the page, allowing audio to be played.
Whether initializeLoki has been called.
Classes that load assets
File extensions registered to AssetLoader
Fired when an output of node is about to be computed.
Fired when an exception was caught.
Fired when the editor graph should be refreshed.
Fired when a request has been made to redraw all of the canvases.
Notify the Edtiro to update an asset.
Fired when the user has interacted with the page, allowing audio players to resume or unmute themselves.
Fired when a variables value has changed.
Fired when the status of XR support has changed.
The current active scene
When not 0, drawing will be disabled, to reduce draw calls during scene loads.
The current version of the Loki engine
The path to the web server.
Methods
static escapeString(s)
Prepare a string to be used in a JSON strcture or be sent over a web request.
s |
String |
static getVariable(name) → *
Get a variable value, used by variable nodes in a graph.
name |
String |
- *
static hasVariable(name) → bool
Check to see if a variable has been defined.
name |
String |
- bool
static isArray(obj) → bool
Returns true if the object is an array.
obj |
* |
- bool
static isArrayOrTypedArray(obj) → bool
Returns true if the object is either an Array or a TypedArray
obj |
* |
- bool
static isEmpty(obj) → bool
Returns true if the object is null, undefined, an object, map, array, or string with no contents.
obj |
* |
- bool
static isEqual(a, b)
Test if two values are equal.
a |
* | |
b |
* |
static isFunction(obj) → bool
Returns true if the object is a function.
obj |
* |
- bool
static isNullOrUndefined(obj)
Returns true if the object is null or undefined.
obj |
* |
static isNumber(obj) → bool
Returns true if the object is a number.
obj |
* |
- bool
static isString(obj) → bool
Returns true if the object is a string.
obj |
* |
- bool
static isTypedArray(obj) → bool
Returns true if the object is a typed array, such as Float32Array.
obj |
* |
- bool
static requestFrame()
Request all active GLContexts to draw.
static requestUpdate()
Request an update for the acive scene.
static setVariable(name, value)
Set a variable value, used by variable nodes in a graph.
name |
String | |
value |
* |
static validateName(v) → bool
Checks if the given string is valid to use as an object name. It must start with a letter, and can only contain letters, numbers or "_".
v |
String | The string to check. |
- bool
true if the string is valid, false otherwise.