ReferenceScripting APIMotionTimeline
MotionTimeline
interfaceThe clock the scene's keyframes go by (scene.timeline): the scene's own time until a script plays, holds, seeks or speeds it.
| Name | MotionTimeline |
|---|---|
| Kind | interface |
| Script reaches it as | MotionScene.timeline |
| Since | 0.4 |
Syntax
interface MotionTimeline { … }Properties
| Name | Type | Description |
|---|---|---|
timeproperty | readonly number | The keyframes' time, seconds. |
playingproperty | readonly boolean | Whether the keyframes play. |
speedproperty | readonly number | How fast they play. |
markersproperty | readonly ({ name: string; time: number })[] | The scene's markers, as the Timeline shows them, in order. |
Methods
| Signature | Description |
|---|---|
play(): voidmethod | Plays the keyframes on from where they are. |
pause(): voidmethod | Holds the keyframes where they are. |
seek(seconds: number): voidmethod | Moves the keyframes to a time. |
setSpeed(speed: number): voidmethod | Plays the keyframes faster or slower. |
release(): voidmethod | Gives the keyframes back to the scene's own time. |
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.