MiniTimelineOptions
import type { MiniTimelineOptions } from 'pixi-silk/ui/timeline';
Options of MiniTimeline.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
duration? | number | Length in frames. Default 120. | ui/timeline.ts:82 |
fontFamily? | string | Font family of the frame numbers. Default system-ui, -apple-system, Segoe UI, Roboto, sans-serif. | ui/timeline.ts:102 |
fontSize? | number | Font size of the frame numbers in local units. Default 9. | ui/timeline.ts:100 |
fps? | number | Playback speed in frames per second. Default 30. | ui/timeline.ts:84 |
height? | number | Height 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? | LabelFactory | Builds 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? | boolean | Frame 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? | number | Fewest frames the view can zoom in to. Default 8. | ui/timeline.ts:96 |
onKeysChange? | (keys: TimelineKey[]) => void | Keys 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) => void | The playhead moved because of the user. Writes to state.time and playback do not call it. | ui/timeline.ts:117 |
playing? | boolean | Start 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? | number | How far the playhead stretches past either end while scrubbing, in pixels. Default 28. | ui/timeline.ts:94 |
snap? | number | Snap keys and the playhead to multiples of this many frames. 0 for none. Default 1. | ui/timeline.ts:88 |
textStyle? | TextStyleOptions | Style 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 | null | Ticker driving playback and animation. Default Ticker.shared. null for manual MiniTimeline.tick. | ui/timeline.ts:115 |
width? | number | Width in local units. Default 440. | ui/timeline.ts:78 |