CreateJSDisplay Class
CreateJSDisplay is a display plugin for the CloudKid Framework that uses the EaselJS library for rendering.
Constructor
CreateJSDisplay
-
id
-
options
Parameters:
-
id
StringThe id of the canvas element on the page to draw to.
-
options
ObjectThe setup data for the CreateJS stage.
-
[stageType="stage"]
String optionalIf the stage should be a normal stage or a SpriteStage (use "spriteStage").
-
[clearView=false]
Boolean optionalIf the stage should wipe the canvas between renders.
-
[mouseOverRate=30]
Int optionalHow many times per second to check for mouseovers. To disable them, use 0 or -1.
-
Item Index
Methods
destroy
()
Destroys the display. This method is called by the Application and should not be called directly, use Application.removeDisplay(id). The stage recursively removes all display objects here.
render
-
elapsed
Updates the stage and draws it. This is only called by the Application. This method does nothing if paused is true or visible is false.
Parameters:
-
elapsed
IntThe time elapsed since the previous frame.
resize
-
width
-
height
Resizes the canvas. This is only called by the Application.
Parameters:
-
width
IntThe width that the display should be
-
height
IntThe height that the display should be
Properties
canvas
DOMElement
public
the canvas managed by this display
height
Int
public
Convenience method for getting the height of the canvas element would be the same thing as canvas.height
mouseOverRate
Int
public
The rate at which EaselJS calculates mouseover events, in times/second.
Default: 30
paused
Boolean
public
If rendering is paused on this display only. Pausing all displays can be done using Application.paused setter.
The rendering library's stage element, the root display object
visible
Boolean
public
If the display is visible, using "display: none" css on the canvas. Invisible displays won't render.
width
Int
public
Convenience method for getting the width of the canvas element would be the same thing as canvas.width