Skip to content

1681-engine / index / TimelineOptions

Interface: TimelineOptions ​

Defined in: src/core/Timeline.ts:5

Properties ​

onComplete? ​

ts
optional onComplete?: (timeline) => void;

Defined in: src/core/Timeline.ts:24

When the playhead reaches the end it is playing toward: the end, or the start when reversed.

Parameters ​

ParameterType
timelineTimeline

Returns ​

void


onRepeat? ​

ts
optional onRepeat?: (timeline) => void;

Defined in: src/core/Timeline.ts:22

Parameters ​

ParameterType
timelineTimeline

Returns ​

void


onUpdate? ​

ts
optional onUpdate?: (timeline) => void;

Defined in: src/core/Timeline.ts:21

Parameters ​

ParameterType
timelineTimeline

Returns ​

void


paused? ​

ts
optional paused?: boolean;

Defined in: src/core/Timeline.ts:12

Built but not playing until play() / resume().


repeat? ​

ts
optional repeat?: number;

Defined in: src/core/Timeline.ts:14

Extra plays after the first (-1 = forever).


repeatDelay? ​

ts
optional repeatDelay?: number;

Defined in: src/core/Timeline.ts:18

Ms of stillness between plays.


timeScale? ​

ts
optional timeScale?: number;

Defined in: src/core/Timeline.ts:20

Its own speed factor, on top of its manager's.


tweens? ​

ts
optional tweens?: Tweener;

Defined in: src/core/Timeline.ts:10

The manager that steps it: stage.tweens makes it follow the stage's timeScale and stop with the stage. Leave it out to step the timeline yourself with update(dt) (a fixed step, a test, a timeline played by another).


yoyo? ​

ts
optional yoyo?: boolean;

Defined in: src/core/Timeline.ts:16

Every second play runs backwards.

Released under the MIT License.