Skip to content
pixi-silk
GitHub repository
Entry point

pixi-silk/ui/halo

ContextHalo: a ring of actions around a selected object.

import { ContextHalo } from 'pixi-silk/ui/halo';

Classes#

ClassDescription
ContextHaloAction buttons orbiting the selected object. It follows the target every frame from its bounds, so it tracks drags, tweens and camera moves. The buttons sit on an arc hugging the target’s box, on the preferred side. When that side would leave bounds the arc turns to the side with the most room. Buttons pop in with a stagger and pop out on detach().

Interfaces#

InterfaceDescription
ContextHaloOptionsOptions of ContextHalo. Lengths are in the halo’s local units.
HaloBoundsRectangle in the halo’s coordinates (its parent’s, while the halo sits at 0, 0 unscaled).
HaloItemOne action of a ContextHalo.
HaloStateThe reactive state of a ContextHalo.
HaloThemeColours of a ContextHalo (any Pixi colour).

Type Aliases#

Type AliasDescription
HaloPhaseWhere a ContextHalo is in its pop cycle.

Variables#

VariableDescription
HALO_THEMEDefault theme: light buttons with a blue hover.