API Documentation for: 0.0.1
Show:

Positioner Class

Defined in: Positioner:5
Namespace: cloudkid

Initially layouts all interface elements

Item Index

Methods

Methods

generateHitArea

(
  • hitArea
  • scale=1
)
Object static

Defined in generateHitArea:59

Create the polygon hit area for interface elements

Parameters:

  • hitArea Object | Array

    One of the following:

    • An array of points for a polygon, e.g.

        [{x:0, y:0}, {x:0, y:20}, {x:20, y:0}]
    • An object describing a rectangle, e.g.

        {type:"rect", x:0, y:0, w:10, h:30}
    • An object describing an ellipse, where x and y are the center, e.g.

        {type:"ellipse", x:0, y:0, w:10, h:30}
    • An object describing a circle, where x and y are the center, e.g.

        {type:"circle", x:0, y:0, r:20}
  • scale=1 Number

    The size to scale hitArea by

Returns:

Object:

A geometric shape object for hit testing, either a Polygon, Rectangle, Ellipse, or Circle, depending on the hitArea object. The shape will have a contains() function for hit testing.

positionItems

(
  • parent
  • itemSettings
)
static

Defined in positionItems:15

Initial position of all layout items

Parameters:

  • parent PIXI.DisplayObject
  • itemSettings Object

    JSON format with position information