Class: Sizes

Sizes

it's a simple class to contain Sizes with scaling values and methods

new Sizes(width, height, scaleX, scaleY)

Parameters:
Name Type Description
width Int
height Int
scaleX Float
scaleY Float
Source:
Example
 var size = new DE.Sizes( 500, 455, 1.2, 1.2 );

Methods

<protected, static> this._center() → {Sizes}

center the parent localPosition according to these sizes

Source:
Returns:

this current instance

Type
Sizes

<protected, static> this._uncenter() → {Sizes}

center the parent localPosition according to these sizes

Source:
Returns:

this current instance

Type
Sizes

<protected, static> this.scaleTo(val, time) → {Sizes}

Work In Progress, don't use it
scaleTo provide a middleware to make scale animation

Parameters:
Name Type Description
val Vector2

value to scale X and Y

time Int

in milliseconds

Source:
Returns:

this current instance

Type
Sizes

<protected, static> this.scaleXTo(val, time) → {Sizes}

Work In Progress, don't use it
scaleXTo provide a middleware to make scaleX animation

Parameters:
Name Type Description
val Vector2

value scale X

time Int

in milliseconds

Source:
Returns:

this current instance

Type
Sizes

<protected, static> this.scaleYTo(val, time) → {Sizes}

Work In Progress, don't use it
scaleYTo provide a middleware to make scaleY animation

Parameters:
Name Type Description
val Float

value scale Y

time Int

in milliseconds

Source:
Returns:

this current instance

Type
Sizes

<static> this.setScale(val, valY) → {Sizes}

change scales, will remove centering then apply again (if there is a parent)

Parameters:
Name Type Argument Description
val Float

valX or valX and Y if no Y given

valY Float <optional>
Source:
Returns:

this current instance

Type
Sizes

<protected, static> this.setSizes(first, height) → {Sizes}

set current sizes to given sizes, if you provide only first as Int, will make a boxed sizes

Parameters:
Name Type Argument Description
first Vector2

sizes values X and Y

height Int <optional>

height value if first corresponding to width

Source:
Returns:

this current instance

Type
Sizes
Dreamirl Copyright © 2014 And the contributors
Documentation generated by JSDoc 3.2.2 on Thu Apr 24 2014 11:56:41 GMT+0200 (CEST) using the DocStrap template.