Interface: ScrubbableOptions
Defined in: src/interaction/Scrubbable.ts:11
Options for Scrubbable / makeScrubbable.
Properties
autoRender?
optionalautoRender:boolean
Defined in: src/interaction/Scrubbable.ts:42
Render the scene after each value change. Default: true. Set false when a render loop (play(), wait() with updaters) is already running.
cursor?
optionalcursor:string
Defined in: src/interaction/Scrubbable.ts:37
CSS cursor on hover and while scrubbing. Default: 'ew-resize' / 'ns-resize'.
direction?
optionaldirection:"horizontal"|"vertical"
Defined in: src/interaction/Scrubbable.ts:16
Drag axis. 'horizontal' (default): drag right to increase. 'vertical': drag up to increase.
hitPadding?
optionalhitPadding:number
Defined in: src/interaction/Scrubbable.ts:35
Extra world-unit margin around the number that still starts a scrub. Default: 0.1.
max?
optionalmax:number
Defined in: src/interaction/Scrubbable.ts:27
Upper bound for the value. Default: +Infinity.
min?
optionalmin:number
Defined in: src/interaction/Scrubbable.ts:25
Lower bound for the value. Default: -Infinity.
onChange()?
optionalonChange: (value,decimal) =>void
Defined in: src/interaction/Scrubbable.ts:31
Called with the new value (and the number) each time the value changes.
Parameters
value
number
decimal
Returns
void
onScrubEnd()?
optionalonScrubEnd: (value,decimal) =>void
Defined in: src/interaction/Scrubbable.ts:33
Called once when a scrub gesture ends, with the final value.
Parameters
value
number
decimal
Returns
void
sensitivity?
optionalsensitivity:number
Defined in: src/interaction/Scrubbable.ts:23
Value change per screen pixel of drag. Default: step (0.01 when step is 0).
step?
optionalstep:number
Defined in: src/interaction/Scrubbable.ts:21
Snap increment for the value. 0 means continuous. Default: 10^-numDecimalPlaces, the smallest change the number displays.
tracker?
optionaltracker:ValueTracker
Defined in: src/interaction/Scrubbable.ts:29
ValueTracker to write each new value into.