API Documentation for: 0.0.1
Show:

PixiDisplay Class

Defined in: PixiDisplay:8
Namespace: cloudkid

PixiDisplay is a display plugin for the CloudKid Framework that uses the Pixi library for rendering.

Constructor

PixiDisplay

(
  • id
  • options
)

Defined in PixiDisplay:8

Parameters:

  • id String

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

  • options Object

    The setup data for the Pixi stage.

    • [forceContext=null] String optional

      If a specific renderer should be used instead of WebGL falling back to Canvas. Use "webgl" or "canvas2d" to specify a renderer.

    • [clearView=false] Boolean optional

      If the stage should wipe the canvas between renders.

    • [backgroundColor=0x000000] Uint optional

      The background color of the stage (if it is not transparent).

    • [transparent=false] Boolean optional

      If the stage should be transparent.

    • [preMultAlpha=false] Boolean optional

      If the WebGL renderer should draw with all images as pre-multiplied alpha. In most cases, you probably do not want to set this option to true.

Methods

destroy

()

Defined in destroy:223

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:209

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

resize

(
  • width
  • height
)

Defined in resize:196

Resizes the canvas and the renderer. 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

PIXI.CanvasRenderer | PIXI.WebGLRenderer public

Defined in :128

The Pixi renderer.

_enabled

Boolean private

Defined in _enabled:144

If input is enabled on the stage.

_visible

Boolean private

Defined in _visible:175

If the display is visible.

Animator

Animator public

Defined in Animator:75

The Animator class to use when using this display.

PIXI.Stage public

Defined in :120

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

canvas

DOMElement public

Defined in canvas:86

the canvas managed by this display

enabled

Boolean public

Defined in enabled:151

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

height

Int public

Defined in height:111

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

id

String public

Defined in id:94

The DOM id for the canvas

paused

Boolean public

Defined in paused:136

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

visible

Boolean public

Defined in visible:182

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

width

Int public

Defined in width:102

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