RingSkin
pixi-wheels / index / RingSkin
Interface: RingSkin
Defined in: skins/RingSkin.ts:32
How a ring looks. The ring owns the motion (rotation, sections, pointers);
a skin owns the pixels. Swap GraphicsRingSkin for TextureRingSkin or a
Spine skin and nothing about the spin changes.
attach() is called once at build; layout() whenever the geometry
changes (a dynamic-section transition calls it every frame, so keep it
proportional to the section count).
Extends#
Properties#
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
isDestroyed | readonly | boolean | Disposable.isDestroyed | utils/Disposable.ts:9 |
Methods#
attach()#
attach(ctx: RingSkinContext): void;
Defined in: skins/RingSkin.ts:33
Parameters#
| Parameter | Type |
|---|---|
ctx | RingSkinContext |
Returns#
void
destroy()#
destroy(): void;
Defined in: utils/Disposable.ts:8
Returns#
void
Inherited from#
highlight()?#
optional highlight(sectionId: string | null): void;
Defined in: skins/RingSkin.ts:38
Turn a highlight on one section (or off with null).
Parameters#
| Parameter | Type |
|---|---|
sectionId | string | null |
Returns#
void
layout()#
layout(): void;
Defined in: skins/RingSkin.ts:34
Returns#
void
onLanded()?#
optional onLanded(section: ResolvedSection): void;
Defined in: skins/RingSkin.ts:42
Parameters#
| Parameter | Type |
|---|---|
section | ResolvedSection |
Returns#
void
onSpinStart()?#
optional onSpinStart(): void;
Defined in: skins/RingSkin.ts:40
Hooks the ring calls from its own event stream, for skins with spin / win states.
Returns#
void
onSpinStop()?#
optional onSpinStop(): void;
Defined in: skins/RingSkin.ts:41
Returns#
void
syncRotation()?#
optional syncRotation(rotationDeg: number): void;
Defined in: skins/RingSkin.ts:36
Every frame, the disc rotation in degrees. For upright labels and bone-driven skins.
Parameters#
| Parameter | Type |
|---|---|
rotationDeg | number |
Returns#
void