Easing Class
The Easing class provides different types of animation using different easings. The easing of an animation controls how hard/soft the animation starts and/or stops.
Item Index
Methods
start
(
-
sx -
sy -
dx -
dy -
duration
Starts a move/scroll animation.
Parameters:
-
sxNumber- The start x-coordinate.
-
syNumber- The start y-coordinate.
-
dxNumber- The distance/amount on x-axis.
-
dyNumber- The distance/amount on y-axis.
-
durationNumber- The duration of the animation.
startEndless
(
-
speedX -
speedY
Starts an endless moving/scroll animation.
Parameters:
-
speedXNumber- The animation speed on x-axis.
-
speedYNumber- The animation speed on y-axis.
startValue
(
-
value -
distance -
duration
Starts a value animation.
Parameters:
-
valueNumber- The start-value.
-
distanceNumber- The distance/amount to change the value by.
-
durationNumber- The duration of the animation.
startValueEndless
(
-
value -
speedY
Starts an endless value animation.
Parameters:
-
valueNumber- The start-value.
-
speedYNumber- The animation speed.
stop
()
Stops the animation
updatePosition
()
Updates the move/scroll animation.
updateValue
()
Updates the value animation.
Properties
duration
Number
The duration of the animation.
dx
Number
protected
Delta X
dy
Number
protected
Delta Y
func
Function
The easing function used for the animation.
gs.Easings
Function
The easing type.
isEndless
Boolean
Indicates if the animation is endless.
isRunning
Boolean
Indicates if the animation is running.
isSingleValue
Boolean
speed
Number
protected
speedX
Number
protected
speedY
Number
protected
startX
Number
protected
startY
Number
protected
time
Number
protected
Frame counter for the animation.
value
Number
protected
The current value.
