Motion
Get Motion

ReferenceScripting APIMotionTimeline

MotionTimeline

interface

The clock the scene's keyframes go by (scene.timeline): the scene's own time until a script plays, holds, seeks or speeds it.

NameMotionTimeline
Kindinterface
Script reaches it asMotionScene.timeline
Since0.4

Syntax

interface MotionTimeline { … }

Properties

NameTypeDescription
timepropertyreadonly numberThe keyframes' time, seconds.
playingpropertyreadonly booleanWhether the keyframes play.
speedpropertyreadonly numberHow fast they play.
markerspropertyreadonly ({ name: string; time: number })[]The scene's markers, as the Timeline shows them, in order.

Methods

SignatureDescription
play(): voidmethodPlays the keyframes on from where they are.
pause(): voidmethodHolds the keyframes where they are.
seek(seconds: number): voidmethodMoves the keyframes to a time.
setSpeed(speed: number): voidmethodPlays the keyframes faster or slower.
release(): voidmethodGives the keyframes back to the scene's own time.