Repository navigation
extends a2d.Events
Defined in a2d.js
|
a2d A happy namespace for all game engine stuffs.
|
|
<static> |
Audio A convenience wrapper for html5 audio |
| <static> |
load (loadData) Load resources. |
| **[canvas](#canvas)** Get or set the canvas. | |
| **[dimension](#dimension)** The canvas size. | |
| <static> | **[requestFrame](#requestFrame)** (function) Request animation frame. |
| **[root](#root)** The root sceneNode. | |
| <static> | **[version](#version)** a2d engine version |
| **[draw](#draw)** fired when a frame is drawn. | |
| **[load](#load)** fired when all resources have been loaded. | |
| **[progress](#progress)** (eventObject) fired when progress is made loading resources. |
a2d
A happy namespace for all game engine stuffs.
<static> a2d.Audio
A convenience wrapper for html5 audio
--
<static> a2d.load (loadData)
Load resources.
{object} loadData
canvas
Get or set the canvas.
Assigning a string to this property will attempt to find the canvas with the given string as an ID.
If no canvas is set, an attempt is made to "auto-detect" a canvas in the DOM. If not found, one will be
created and added to the DOM.
--
dimension
The canvas size. You can resize the canvas by setting this.
--
<static> a2d.requestFrame (function)
Request animation frame.
Browser-specific animation frame, or 60fps timeout callback.
{Function} function
--
root
The root sceneNode. Attach nodes you want displayed to this.
--
<static> a2d.version
a2d engine version
draw
fired when a frame is drawn.
--
load
fired when all resources have been loaded.
--
progress (eventObject)
fired when progress is made loading resources.
{object} eventObject
{number} eventObject.loaded
{number} eventObject.total