Constructor
new App(canvasID)
Construct a new App.
Parameters:
Name | Type | Description |
---|---|---|
canvasID | string | The 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:
Name | Type | Description |
---|---|---|
timeStamp | number | The current time |
start()
Start up the application.
update(elapsed)
Update the App and its children.
Parameters:
Name | Type | Description |
---|---|---|
elapsed | number | Time since last update |