Engine

The Engine controls the update and render loop.

Constructor

new L3D.Engine()

Properties

static active Engine = null

The engine currently being updated and rendered.

static onFixedUpdate Signal

Signal emitted when an Engine performs a fixed update.

static onPlay Signal

Signal emitted when an Engine starts playing.

static onPostDraw Signal

Signal emitted just after the engine draws the frame.

static onPostUpdate Signal

Signal emitted when an Engine performs a post update.

static onPreDraw Signal

Signal emitted just before the engine draws the frame.

static onPreUpdate Signal

Signal emitted when an Engine performs a pre update.

static onStop Signal

Signal emitted when an Engine stops playing.

static onUpdate Signal

Signal emitted when an Engine performs an update.

canvas GLCanvas

The WebGL canvas using this Engine.

Methods

drawFrame(renderSettings)

Calls the active renderer to render the current frame.

Parameters
renderSettings RenderSettings null

pause()

Pause the engine, which will skip the update loop but continue rendering.

play()

Start the engine playback. This will call the start event, and begine the update and render loop.

requestFrame()

Request the next frame to be drawn.

step()

If the Engine is paused, this calls the update event for a single frame.

stop()

Stop the engine, calling the stop event and ending the update and render loop.

update(step)

Calls the update method for all components.

Parameters
step number

The time delta since the last frame