Class: RenderLoop

RenderLoop(stage)

A RenderLoop wraps a Stage and calls Stage#render on the next frame whenever it fires Stage#renderInvalid. It may be started and stopped, and is initially in the stopped state, in which no call to Stage#render occurs.

Constructor

new RenderLoop(stage)

Parameters:
Name Type Description
stage Stage
Listens to Events:

Methods

destroy()

Destructor.

renderOnNextFrame()

Forces the stage to render on the next frame, even if its contents remain valid. Does nothing if the loop is stopped.

stage() → {Stage}

Returns the underlying stage.

Returns:
Type
Stage

start()

Starts the render loop.

stop()

Stops the render loop.

Events

afterRender

Signals that Stage#render has just been called.

beforeRender

Signals that Stage#render is about to be called.