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:
-
sx
Number- The start x-coordinate.
-
sy
Number- The start y-coordinate.
-
dx
Number- The distance/amount on x-axis.
-
dy
Number- The distance/amount on y-axis.
-
duration
Number- The duration of the animation.
startEndless
(
-
speedX
-
speedY
Starts an endless moving/scroll animation.
Parameters:
-
speedX
Number- The animation speed on x-axis.
-
speedY
Number- The animation speed on y-axis.
startValue
(
-
value
-
distance
-
duration
Starts a value animation.
Parameters:
-
value
Number- The start-value.
-
distance
Number- The distance/amount to change the value by.
-
duration
Number- The duration of the animation.
startValueEndless
(
-
value
-
speedY
Starts an endless value animation.
Parameters:
-
value
Number- The start-value.
-
speedY
Number- 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.