new AxAnimationElement(canvas, onRenderEvent, startRenderingnon-null, enableContextMenunon-null, touchScrollingEnablednon-null)
Utilizes the canvas element which will be used for rendering
Provides useful functionality for continuous rendering, mouse and keyboard input
Parameters:
Name | Type | Description |
---|---|---|
canvas |
String | HTMLCanvasElement | The id of the HTML canvas element or the canvas element object itself. |
onRenderEvent |
AxAnimationElementRender | The method which to perform rendering of a frame |
startRendering |
Boolean | Denotes whether to start rendering immediately. If omitted, assumes a default value of false |
enableContextMenu |
Boolean | Denotes whether to enable the default context menu on the canvas element. If omitted, assumes a default value of false |
touchScrollingEnabled |
Boolean | Denotes whether to enable scrolling the page when touching the canvas in a touchscreen device |
Methods
Initialize(canvas)
Provides managment for the element which will be used for rendering
requestAnimationFrame in a cross browser way.
Parameters:
Name | Type | Description |
---|---|---|
canvas |
String | HTMLCanvasElement | The id of the HTML canvas element or the canvas element object itself. |
Render()
Performs various routines to handle the element input and renders s frame using the OnRender method
This method is called when rendering continuously
This method uses the OnRender method to draw a frame on the canvas element
StartRendering()
Initiates continuous rendering onto the canvas
StopRendering()
Stops continuous rendering