springroll.easeljs.DisplayAdapter Class

Provide a normalized way to get size, position, scale values as well as provide reference for different geometry classes.

Methods

Properties

contains

(
  • container
  • child
)
Boolean
static

Defined in contains:308

If a container contains a child

Parameters:

  • container createjs.Container

    The container

  • child createjs.DisplayObject

    The object to test

Returns:

Boolean:

If the child contained within the container

getBitmapSize

(
  • bitmap
)
Object
static

Defined in getBitmapSize:257

Get the original size of a bitmap

Parameters:

  • bitmap createjs.Bitmap

    The bitmap to measure

Returns:

Object:

The width (w) and height (h) of the actual bitmap size

getLocalBounds

(
  • object
)
createjs.Rectangle
static

Defined in getLocalBounds:78

Gets the object's boundaries in its local coordinate space, without any scaling or rotation applied.

Parameters:

  • object createjs.DisplayObject

    The createjs display object

Returns:

createjs.Rectangle:

A rectangle with additional right and bottom properties.

getPosition

(
  • object
  • [direction]
)
Object | Number
static

Defined in getPosition:176

Normalize the object position getting

Parameters:

  • object createjs.DisplayObject

    The createjs display object

  • [direction] String optional

    Either "x" or "y", default is an object of both

Returns:

Object | Number:

The position as an object with x and y keys if no direction value is set, or the value of the specific direction

getScale

(
  • object
  • [direction]
)
Object | Number
static

Defined in getScale:128

Normalize the object scale

Parameters:

  • object createjs.DisplayObject

    The createjs display object

  • [direction] String optional

    Either "x" or "y" to return a specific value

Returns:

Object | Number:

A scale object with x and y keys or a single number if direction is set

removeChildren

(
  • container
)
static

Defined in removeChildren:297

Remove all children from a display object

Parameters:

setHitArea

(
  • object
  • shape
)
createjs.DisplayObject
static

Defined in setHitArea:243

Set the hit area of the shape

Parameters:

  • object createjs.DisplayObject

    The createjs Display object

  • shape Object

    The geometry object

Returns:

createjs.DisplayObject:

Return the object for chaining

setPivot

(
  • object
  • pivot
  • [direction]
)
createjs.DisplayObject
static

Defined in setPivot:220

Set the pivot or registration point of an object

Parameters:

  • object createjs.DisplayObject

    The createjs Display object

  • pivot Object | Number

    The object pivot point or the value if the direction is set

    • [x] Number optional

      The x position of the pivot point

    • [y] Number optional

      The y position of the pivot point

  • [direction] String optional

    Either "x" or "y" the value for specific direction, default will set using the object.

Returns:

createjs.DisplayObject:

Return the object for chaining

setPosition

(
  • object
  • position
  • [direction]
)
createjs.DisplayObject
static

Defined in setPosition:148

Normalize the object position setting

Parameters:

  • object createjs.DisplayObject

    The createjs display object

  • position Object | Number

    The position object or the value if the direction is set.

    • [x] Number optional

      The x value

    • [y] Number optional

      The y value

  • [direction] String optional

    Either "x" or "y" value

Returns:

createjs.DisplayObject:

Return the object for chaining

setScale

(
  • object
  • scale
  • [direction]
)
createjs.DisplayObject
static

Defined in setScale:197

Normalize the object scale setting

Parameters:

  • object createjs.DisplayObject

    The createjs Display object

  • scale Number

    The scaling object or scale value for x and y

  • [direction] String optional

    Either "x" or "y" if setting a specific value, default sets both the scale x and scale y.

Returns:

createjs.DisplayObject:

Return the object for chaining

Circle

Function static

Defined in Circle:15

The geometry class for Circle

Default: createjs.Circle

Ellipse

Function static

Defined in Ellipse:24

The geometry class for Ellipse

Default: createjs.Ellipse

Point

Function static

Defined in Point:51

The geometry class for point

Default: createjs.Point

Polygon

Function static

Defined in Polygon:60

The geometry class for Polygon

Default: createjs.Polygon

Rectangle

Function static

Defined in Rectangle:33

The geometry class for Rectangle

Default: createjs.Rectangle

Sector

Function static

Defined in Sector:42

The geometry class for Sector

Default: createjs.Sector

useRadians

Boolean static

Defined in useRadians:69

If the rotation is expressed in radians

Default: false