Interface: SliderOptions
Defined in: src/interaction/Slider.ts:14
Options for creating a Slider.
Properties
autoRender?
optionalautoRender: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?
optionalcenter:Vector3Tuple
Defined in: src/interaction/Slider.ts:26
World position of the track center. Default: [0, 0, 0].
color?
optionalcolor:string
Defined in: src/interaction/Slider.ts:28
Handle color as a CSS color string. Default: BLUE.
handleRadius?
optionalhandleRadius:number
Defined in: src/interaction/Slider.ts:32
Handle radius. Default: 0.12.
length?
optionallength:number
Defined in: src/interaction/Slider.ts:24
Track length in world units. Default: 4.
max?
optionalmax:number
Defined in: src/interaction/Slider.ts:18
Maximum value at the right end of the track. Default: 1.
min?
optionalmin:number
Defined in: src/interaction/Slider.ts:16
Minimum value at the left end of the track. Default: 0.
numDecimalPlaces?
optionalnumDecimalPlaces:number
Defined in: src/interaction/Slider.ts:38
Decimal places for the label. Default: 2.
onChange()?
optionalonChange: (value) =>void
Defined in: src/interaction/Slider.ts:40
Called with the new value whenever the slider moves.
Parameters
value
number
Returns
void
showLabel?
optionalshowLabel:boolean
Defined in: src/interaction/Slider.ts:36
Show a numeric label above the handle. Default: false.
step?
optionalstep:number
Defined in: src/interaction/Slider.ts:20
Step to snap values to. 0 means continuous. Default: 0.
trackColor?
optionaltrackColor:string
Defined in: src/interaction/Slider.ts:30
Track color as a CSS color string. Default: GRAY.
tracker?
optionaltracker:ValueTracker
Defined in: src/interaction/Slider.ts:34
ValueTracker to bind the slider value to. One is created when omitted.
value?
optionalvalue:number
Defined in: src/interaction/Slider.ts:22
Initial value. Default: min.