new Engine() → {Engine}
The main entry point into bo-X. This class manages the scene, renderer,
and update tick.
Returns:
- Type
- Engine
Methods
-
getRenderer() → {WebGLRenderer}
-
Returns the WebGLRenderer instance.
Returns:
- Type
- WebGLRenderer
-
getScene() → {Scene}
-
Returns the Scene being rendered.
Returns:
- Type
- Scene
-
getSimulationTime() → {Number}
-
Returns the time, in seconds, since the start of the simulation.
Returns:
The time, in seconds, since the start of the simulation.- Type
- Number
-
getSpriteSheetScheduler() → {SpriteSheetScheduler}
-
Returns the SpriteSheetScheduler for updating SpriteSheets.
Returns:
- Type
- SpriteSheetScheduler
-
initialize(renderer)
-
Initializes this object. This starts the game tick and begins calling the renderer.
Parameters:
Name Type Description rendererWebGLRenderer The WebGLRenderer to render the scene with. -
start()
-
Starts the simulation. This is automatically called by initialize.
-
stop()
-
Stops the simulation.