Skip to content
pixi-silk
GitHub repository
Class

IslandGauge

import { IslandGauge } from 'pixi-silk/ui/island';

A progress ring with an icon in the middle and a caption under it, for quotas, levels and loading. Its box is size wide and size + 24 high with the caption, from (0, 0). The ring eases to new values and redraws only while it moves.

Extends#

  • Container

Constructors#

Constructor#

new IslandGauge(options?: IslandGaugeOptions): IslandGauge;

Parameters#

ParameterType
optionsIslandGaugeOptions

Returns#

IslandGauge

Overrides#

Container.constructor

Properties#

PropertyModifierTypeDescriptionDefined in
statereadonly{ value: Signal<number>; }value is 0..1. Set it to move the ring.packages/pixi-silk/src/ui/island/gauge.ts:40
state.valuepublicSignal<number>-packages/pixi-silk/src/ui/island/gauge.ts:40

Methods#

destroy()#

destroy(options?: DestroyOptions): void;

Removes all internal references and listeners as well as removes children from the display list. Do not use a Container after calling destroy.

Parameters#

ParameterTypeDescription
options?DestroyOptionsOptions parameter. A boolean will act as if all options have been set to that value

Returns#

void

Example#

container.destroy();
container.destroy(true);
container.destroy({ children: true });
container.destroy({ children: true, texture: true, textureSource: true });

Overrides#

Container.destroy

tick()#

tick(dt: number): boolean;

Advances the easing by dt seconds (for ticker: null). Returns true while it moves.

Parameters#

ParameterType
dtnumber

Returns#

boolean