Class: Engine

Engine

Engine

new Engine() → {Engine}

The main entry point into bo-X. This class manages the scene, renderer, and update tick.
Author:
  • thegoldenmule
Source:
Returns:
Type
Engine

Methods

getRenderer() → {WebGLRenderer}

Returns the WebGLRenderer instance.
Source:
Returns:
Type
WebGLRenderer

getScene() → {Scene}

Returns the Scene being rendered.
Source:
Returns:
Type
Scene

getSimulationTime() → {Number}

Returns the time, in seconds, since the start of the simulation.
Source:
Returns:
The time, in seconds, since the start of the simulation.
Type
Number

getSpriteSheetScheduler() → {SpriteSheetScheduler}

Returns the SpriteSheetScheduler for updating SpriteSheets.
Source:
Returns:
Type
SpriteSheetScheduler

initialize(renderer)

Initializes this object. This starts the game tick and begins calling the renderer.
Parameters:
Name Type Description
renderer WebGLRenderer The WebGLRenderer to render the scene with.
Source:

start()

Starts the simulation. This is automatically called by initialize.
Source:

stop()

Stops the simulation.
Source: