Skip to content
pixi-silk
GitHub repository
Interface

MiniTimelineOptions

import type { MiniTimelineOptions } from 'pixi-silk/ui/timeline';

Options of MiniTimeline.

Properties#

PropertyTypeDescriptionDefined in
duration?numberLength in frames. Default 120.ui/timeline.ts:82
fontFamily?stringFont family of the frame numbers. Default system-ui, -apple-system, Segoe UI, Roboto, sans-serif.ui/timeline.ts:102
fontSize?numberFont size of the frame numbers in local units. Default 9.ui/timeline.ts:100
fps?numberPlayback speed in frames per second. Default 30.ui/timeline.ts:84
height?numberHeight in local units, ruler included. Default 64.ui/timeline.ts:80
keys?TimelineKey[]Starting keys. They are copied. Default none.ui/timeline.ts:86
label?LabelFactoryBuilds the frame number labels from their style. Default a PixiJS BitmapText tinted with the theme’s text. Pass silkLabel() from pixi-silk/text to draw them as SDF text.ui/timeline.ts:109
labels?booleanFrame numbers on the ruler. Default true.ui/timeline.ts:98
loop?[number, number]Loop range in frames. Default none: playback loops over the whole track.ui/timeline.ts:90
minSpan?numberFewest frames the view can zoom in to. Default 8.ui/timeline.ts:96
onKeysChange?(keys: TimelineKey[]) => voidKeys were dragged. Called once on release with a copy of every key. MiniTimeline.setKeys does not call it.ui/timeline.ts:119
onScrub?(time: number) => voidThe playhead moved because of the user. Writes to state.time and playback do not call it.ui/timeline.ts:117
playing?booleanStart playing. Default false.ui/timeline.ts:92
profiles?Partial<Record<InputKind, Partial<InputProfile>>>Per pointer kind overrides of slop, the movement a tap may have.ui/timeline.ts:113
rubber?numberHow far the playhead stretches past either end while scrubbing, in pixels. Default 28.ui/timeline.ts:94
snap?numberSnap keys and the playhead to multiples of this many frames. 0 for none. Default 1.ui/timeline.ts:88
textStyle?TextStyleOptionsStyle of the frame numbers. Its fields win over fontSize and fontFamily. The colour is the theme’s text.ui/timeline.ts:104
theme?Partial<TimelineTheme>Colours that replace parts of TIMELINE_THEME.ui/timeline.ts:111
ticker?Ticker | nullTicker driving playback and animation. Default Ticker.shared. null for manual MiniTimeline.tick.ui/timeline.ts:115
width?numberWidth in local units. Default 440.ui/timeline.ts:78