Skip to main content

Interface: SliderOptions

Defined in: src/interaction/Slider.ts:14

Options for creating a Slider.

Properties​

autoRender?​

optional autoRender: boolean

Defined in: src/interaction/Slider.ts:45

Re-render the scene after each drag update. Default: true. Set false when a render loop (play(), wait() with updaters) is already running.


center?​

optional center: Vector3Tuple

Defined in: src/interaction/Slider.ts:26

World position of the track center. Default: [0, 0, 0].


color?​

optional color: string

Defined in: src/interaction/Slider.ts:28

Handle color as a CSS color string. Default: BLUE.


handleRadius?​

optional handleRadius: number

Defined in: src/interaction/Slider.ts:32

Handle radius. Default: 0.12.


length?​

optional length: number

Defined in: src/interaction/Slider.ts:24

Track length in world units. Default: 4.


max?​

optional max: number

Defined in: src/interaction/Slider.ts:18

Maximum value at the right end of the track. Default: 1.


min?​

optional min: number

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

Minimum value at the left end of the track. Default: 0.


numDecimalPlaces?​

optional numDecimalPlaces: number

Defined in: src/interaction/Slider.ts:38

Decimal places for the label. Default: 2.


onChange()?​

optional onChange: (value) => void

Defined in: src/interaction/Slider.ts:40

Called with the new value whenever the slider moves.

Parameters​

value​

number

Returns​

void


showLabel?​

optional showLabel: boolean

Defined in: src/interaction/Slider.ts:36

Show a numeric label above the handle. Default: false.


step?​

optional step: number

Defined in: src/interaction/Slider.ts:20

Step to snap values to. 0 means continuous. Default: 0.


trackColor?​

optional trackColor: string

Defined in: src/interaction/Slider.ts:30

Track color as a CSS color string. Default: GRAY.


tracker?​

optional tracker: ValueTracker

Defined in: src/interaction/Slider.ts:34

ValueTracker to bind the slider value to. One is created when omitted.


value?​

optional value: number

Defined in: src/interaction/Slider.ts:22

Initial value. Default: min.