Get the picture's angle
Returns:
Type | Description |
---|
number | The picture's angle |
applyEasing(current, target)number
Applies easing for picture movements
Name | Type | Description |
---|
current | number | The current picture state |
target | number | The target picture state |
Returns:
Type | Description |
---|
number | The calculated value between current and target values |
Get the picture's blend mode
Returns:
Type | Description |
---|
number | The picture's blend mode |
Calculates the easing amount
Name | Type | Description |
---|
t | number | The amount of easing to calculate given current state |
Returns:
Type | Description |
---|
number | The calculated easing value |
easeIn(t, exponent)number
Calculates the easing amount for slow start
Name | Type | Description |
---|
t | number | The amount of easing to calculate given current state |
exponent | number | The exponent to apply |
Returns:
Type | Description |
---|
number | The calculated easing value |
easeInOut(t, exponent)number
Calculates the easing amount for slow start and end
Name | Type | Description |
---|
t | number | The amount of easing to calculate given current state |
exponent | number | The exponent to apply |
Returns:
Type | Description |
---|
number | The calculated easing value |
easeOut(t, exponent)number
Calculates the easing amount for slow end
Name | Type | Description |
---|
t | number | The amount of easing to calculate given current state |
exponent | number | The exponent to apply |
Returns:
Type | Description |
---|
number | The calculated easing value |
Initialize basic properties of the picture object
Initialize the picture's rotation
Initialize target properties of the picture object
Initialize the picture's tone
Initialize the picture game object
move(origin, x, y, scaleX, scaleY, opacity, blendMode, duration, easingType)
Moves the picture with options
Name | Type | Description |
---|
origin | number | The picture origin |
x | number | The picture x coordinate |
y | number | The picture y coordinate |
scaleX | number | The x (horizontal) scale of the picture |
scaleY | number | The y (vertical) scale of the picture |
opacity | number | The opacity of the picture |
blendMode | number | The blend mode of the picture |
duration | number | The duration of the move |
easingType | number | The easing type of the move |
Get the picture image file name
Returns:
Type | Description |
---|
string | The picture's image file name |
Get the picture's opacity
Returns:
Type | Description |
---|
number | The picture's opacity |
Get the picture's origin
Returns:
Type | Description |
---|
number | The picture's origin |
Rotates the picture
Name | Type | Description |
---|
speed | number | The speed of the rotation |
Get the picture's x scale
Returns:
Type | Description |
---|
number | The picture's x scale |
Get the picture's y scale
Returns:
Type | Description |
---|
number | The picture's y scale |
show(name, origin, x, y, scaleX, scaleY, opacity, blendMode)
Shows the picture with options
Name | Type | Description |
---|
name | string | The picture image file name |
origin | number | The picture origin |
x | number | The picture x coordinate |
y | number | The picture y coordinate |
scaleX | number | The x (horizontal) scale of the picture |
scaleY | number | The y (vertical) scale of the picture |
opacity | number | The opacity of the picture |
blendMode | number | The blend mode of the picture |
Sets the picture's tint over a given duration
Name | Type | Description |
---|
tone | Array.<number> | The new tone of the picture |
duration | number | The duration over which to change the tone |
tone()Array.<number> | null
Get the picture's tone
Returns:
Type | Description |
---|
Array.<number>|null | The picture's tone |
Update the picture
Update moving the picture
Update the picture rotation
Update the picture tone
Get the picture's x coordinate
Returns:
Type | Description |
---|
number | The picture's x coordinate |
Get the picture's y coordinate
Returns:
Type | Description |
---|
number | The picture's y coordinate |