Component_PathAnimation Class
Executes a path-animation on a game-object. A path-animation moves the game-object along a path of quadratic bezier-curves.
Item Index
Methods
movePath
(
-
path
-
loopType
-
duration
-
easingType
-
[callback]
Starts the path-animation.
Parameters:
-
path
ObjectThe path to follow.
-
loopType
gs.AnimationLoopTypeThe loop-Type.
-
duration
NumberThe duration in frames.
-
easingType
ObjectThe easing-type.
-
[callback]
Function optionalAn optional callback called if blending is finished.
quadraticBezierPoint
(
protected
-
startPt
-
controlPt
-
endPt
-
percent
Calculates a certain point on a specified bezier-curve.
Parameters:
-
startPt
Number- The start-point of the bezier-curve.
-
controlPt
Number- The control-point of the bezier-curve.
-
endPt
Number- The end-point of the bezier-curve.
-
percent
Number- The percentage (0.0 - 1.0). A percentage of 0.0 returns the startPt and 1.0 returns the endPt while 0.5 return the point at the middle of the bezier-curve.
scrollPath
(
-
path
-
loopType
-
duration
-
easingType
-
[callback]
Starts the path-animation. Scrolls the game object along the path.
Parameters:
-
path
ObjectThe path to follow.
-
loopType
gs.AnimationLoopTypeThe loop-Type.
-
duration
NumberThe duration in frames.
-
easingType
ObjectThe easing-type.
-
[callback]
Function optionalAn optional callback called if blending is finished.
skip
()
Skips the animation. That is used to skip an animation if the user wants to skip very fast through a visual novel scene.
toDataBundle
()
Serializes the path-animation into a data-bundle.
update
()
Updates the path-animation.