API Documentation for: 0.0.1
Show:

CreateJSDisplay Class

Defined in: CreateJSDisplay:8
Namespace: cloudkid

CreateJSDisplay is a display plugin for the CloudKid Framework that uses the EaselJS library for rendering.

Constructor

CreateJSDisplay

(
  • id
  • options
)

Defined in CreateJSDisplay:8

Parameters:

  • id String

    The id of the canvas element on the page to draw to.

  • options Object

    The setup data for the CreateJS stage.

    • [stageType="stage"] String optional

      If the stage should be a normal stage or a SpriteStage (use "spriteStage").

    • [clearView=false] Boolean optional

      If the stage should wipe the canvas between renders.

    • [mouseOverRate=30] Int optional

      How many times per second to check for mouseovers. To disable them, use 0 or -1.

Methods

destroy

()

Defined in destroy:196

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
)

Defined in render:182

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 Int

    The time elapsed since the previous frame.

resize

(
  • width
  • height
)

Defined in resize:169

Resizes the canvas. This is only called by the Application.

Parameters:

  • width Int

    The width that the display should be

  • height Int

    The height that the display should be

Properties

_enabled

Boolean private

Defined in _enabled:115

If input is enabled on the stage.

_visible

Boolean private

Defined in _visible:148

If the display is visible.

Animator

Animator public

Defined in Animator:46

The Animator class to use when using this display.

canvas

DOMElement public

Defined in canvas:57

the canvas managed by this display

enabled

Boolean public

Defined in enabled:122

If input is enabled on the stage for this display. The default is true.

height

Int public

Defined in height:82

Convenience method for getting the height of the canvas element would be the same thing as canvas.height

id

String public

Defined in id:65

The DOM id for the canvas

mouseOverRate

Int public

Defined in mouseOverRate:107

The rate at which EaselJS calculates mouseover events, in times/second.

Default: 30

paused

Boolean public

Defined in paused:99

If rendering is paused on this display only. Pausing all displays can be done using Application.paused setter.

createjs.Stage | createjs.SpriteStage public

Defined in :91

The rendering library's stage element, the root display object

visible

Boolean public

Defined in visible:155

If the display is visible, using "display: none" css on the canvas. Invisible displays won't render.

width

Int public

Defined in width:73

Convenience method for getting the width of the canvas element would be the same thing as canvas.width