Skip to content
pixi-silk
GitHub repository
Class

ColorSlider

import { ColorSlider } from 'pixi-silk/ui/color';

A gradient track for one channel. The track shows what each position would give with the rest of the colour unchanged, so moving the hue recolours the saturation track and so on.

Extends#

Constructors#

Constructor#

new ColorSlider(options: ColorSliderOptions): ColorSlider;

Parameters#

ParameterType
optionsColorSliderOptions

Returns#

ColorSlider

Overrides#

ColorPicker.constructor

Properties#

PropertyModifierTypeDescriptionInherited fromDefined in
channelreadonlyColorChannelThe channel this track edits.-ui/color/ColorSlider.ts:126
modelreadonlyColorModelThe colour this picker edits. Share it to link pickers.ColorPicker.modelui/color/ColorPicker.ts:36
statereadonlyColorPickerStateSignals to read. See ColorPickerState.ColorPicker.stateui/color/ColorPicker.ts:38

Accessors#

length#

Get Signature#

get length(): number;

Track length in local units.

Returns

number


thickness#

Get Signature#

get thickness(): number;

Track thickness in local units.

Returns

number

Methods#

destroy()#

destroy(options?: DestroyOptions): void;

Stops the animation and unsubscribes from the model. The model stays usable. Destroys children by default.

Parameters#

ParameterType
options?DestroyOptions

Returns#

void

Inherited from#

ColorPicker.destroy


tick()#

tick(dt: number): boolean;

Advances the animation by dt seconds (only needed with ticker: null). Returns true while moving.

Parameters#

ParameterType
dtnumber

Returns#

boolean

Inherited from#

ColorPicker.tick