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 animationParameters:
Name Type Description valVector2 value to scale X and Y
timeInt 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 animationParameters:
Name Type Description valVector2 value scale X
timeInt 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 animationParameters:
Name Type Description valFloat value scale Y
timeInt 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 valFloat valX or valX and Y if no Y given
valYFloat <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 firstVector2 sizes values X and Y
heightInt <optional>
height value if first corresponding to width
- Source:
Returns:
this current instance
- Type
- Sizes