Skip to content
pixi-silk
GitHub repository
Interface

JogDialOptions

import type { JogDialOptions } from 'pixi-silk/ui/dial';

Options of JogDial.

Properties#

PropertyTypeDescriptionDefined in
fine?numberHow fast precision grows with distance. Past the ring the speed is (radius / distance) ** fine, so the pointer far out moves the value slowly. 0 turns it off. Default 1.ui/dial.ts:73
format?(value: number) => stringFormats the readout. Default: the value with the step’s decimals.ui/dial.ts:83
friction?numberHow quickly a flick slows down, about 1 / seconds. Default 3.5.ui/dial.ts:79
inertia?booleanKeep spinning after a flick. Default true.ui/dial.ts:77
max?numberUpper limit. Default Infinity (no limit).ui/dial.ts:64
min?numberLower limit. Default -Infinity (no limit).ui/dial.ts:62
onChange?(value: number) => voidCalled on every change of the snapped value, also while dragging.ui/dial.ts:93
onCommit?(value: number) => voidThe value once the dial comes to rest after a drag or a flick.ui/dial.ts:95
profiles?Partial<Record<InputKind, Partial<InputProfile>>>Per pointer kind overrides of slop, the movement a tap may have.ui/dial.ts:89
radius?numberRadius of the ring, at its centre line. Default 64.ui/dial.ts:56
readout?booleanShows the value in the middle. Default true.ui/dial.ts:81
rubber?numberHow far the value can stretch past a limit, as a fraction of one turn. Default 0.12.ui/dial.ts:75
step?numberSnap step. 0 turns snapping off. Default 0.ui/dial.ts:66
textStyle?TextStyleOptionsStyle of the readout text.ui/dial.ts:85
theme?Partial<DialTheme>Colours that replace parts of DIAL_THEME.ui/dial.ts:87
thickness?numberThickness of the ring. Default 14.ui/dial.ts:58
ticker?Ticker | nullTicker driving the animation. Default Ticker.shared. null for manual JogDial.tick.ui/dial.ts:91
turn?numberValue change for one full turn near the ring. Default: the range between min and max, else 1.ui/dial.ts:68
value?numberStart value, clamped and snapped. Default 0.ui/dial.ts:60