App

Main application. Everything else in the overall application is a child of this object.

Constructor

new App(canvasID)

Construct a new App.
Parameters:
NameTypeDescription
canvasIDstringThe ID of the canvas to draw on

Members

events

Get the app's event handler.

space

Get the currently running space.

space

Set the currently running space.

Methods

draw()

Draw the App and its children.

init()

Initialize the App and its child components.

loop(timeStamp)

Perform the update loop and call update().
Parameters:
NameTypeDescription
timeStampnumberThe current time

start()

Start up the application.

update(elapsed)

Update the App and its children.
Parameters:
NameTypeDescription
elapsednumberTime since last update