Skip to main content

Interface: ScrubbableOptions

Defined in: src/interaction/Scrubbable.ts:11

Options for Scrubbable / makeScrubbable.

Properties​

autoRender?​

optional autoRender: 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?​

optional cursor: string

Defined in: src/interaction/Scrubbable.ts:37

CSS cursor on hover and while scrubbing. Default: 'ew-resize' / 'ns-resize'.


direction?​

optional direction: "horizontal" | "vertical"

Defined in: src/interaction/Scrubbable.ts:16

Drag axis. 'horizontal' (default): drag right to increase. 'vertical': drag up to increase.


hitPadding?​

optional hitPadding: number

Defined in: src/interaction/Scrubbable.ts:35

Extra world-unit margin around the number that still starts a scrub. Default: 0.1.


max?​

optional max: number

Defined in: src/interaction/Scrubbable.ts:27

Upper bound for the value. Default: +Infinity.


min?​

optional min: number

Defined in: src/interaction/Scrubbable.ts:25

Lower bound for the value. Default: -Infinity.


onChange()?​

optional onChange: (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​

DecimalNumber

Returns​

void


onScrubEnd()?​

optional onScrubEnd: (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​

DecimalNumber

Returns​

void


sensitivity?​

optional sensitivity: number

Defined in: src/interaction/Scrubbable.ts:23

Value change per screen pixel of drag. Default: step (0.01 when step is 0).


step?​

optional step: 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?​

optional tracker: ValueTracker

Defined in: src/interaction/Scrubbable.ts:29

ValueTracker to write each new value into.