Class: Engine

Engine()

Complex Engine. This class handles the rendering of the current scene.

Constructor

new Engine()

Source:

Members

instance :Engine|null

Type:
Source:

scene :Scene|null

Type:
Source:

Methods

(static) getInstance() → {Engine}

Gets current instance
Source:
Returns:
Type
Engine

getScene() → {Scene|null}

Source:
Returns:
Type
Scene | null

loadScene(scene) → {this}

load a scene to be rendered
Parameters:
Name Type Description
scene Scene
Deprecated:
  • Yes
Source:
Returns:
Type
this

simpleScene(setupFunction) → {Engine}

Compose a simple scene for a very quick start
Parameters:
Name Type Description
setupFunction function
Source:
Returns:
Type
Engine

start() → {Engine}

Start the rendering loop. This updates automatically with requestAnimationFrame
Source:
Returns:
Type
Engine

update() → {Engine}

render the loaded scene
Source:
Returns:
Type
Engine

useScene(scene) → {Engine}

Use a scene
Parameters:
Name Type Description
scene
Source:
Returns:
Type
Engine