Animation
-
class
cee.pt.Animation() Controls time-step animation of a
ParticleModel.Access via
ParticleModel.animation. Frames advance inside the render loop at the configuredtargetFrameRate.Example:
Accessors
Methods
Accessors
-
Animation.frameStride() Frames to advance per step. Default
1.E.g. stride 5 with
targetFrameRate = 30gives a 150x speedup. Also used bysetNextFrameandsetPreviousFrame.Return type: number
-
Animation.frameStride(value) Arguments: - value (
number) – None
Return type: void
- value (
Methods
isModelAnimationRunning
-
Animation.isModelAnimationRunning() Whether the animation is running.
Return type: boolean
runAnimation
-
Animation.runAnimation(start) Arguments: - start (
boolean) – None
Start or stop playback.
Return type: void - start (
setAnimationFrameChangedCallback
-
Animation.setAnimationFrameChangedCallback(callback) Arguments: - callback (
AnimationFrameChangedCallback) – None
Register a callback invoked on each frame change.
Return type: void - callback (
setFirstFrame
-
Animation.setFirstFrame() Seek to the first frame. Stops animation.
Return type: void