A TokenRing is constructed by providing a reference to a Token object.
StaticbaseToken Rings sprite sheet base texture.
StaticeffectsThe effects which could be applied to a token ring (using bitwise operations).
StatictexturesRings and background textures UVs and center offset.
StatictokenThe token ring shader class definition.
Reference to the token that should be animated.
StaticinitializedIs the token rings framework enabled? Will be null if the system hasn't initialized yet.
Clear configuration pertaining to token ring from the mesh.
Configure the sprite mesh.
Optionalmesh: anyThe mesh to which TokenRing functionality is configured (default to token.mesh)
Configure token ring size according to mesh texture, token dimensions, fit mode, and dynamic ring fit mode.
Optionaloptions: { fit?: string; scaleMultiplier?: number } = {}Optionalfit?: stringThe desired fit mode
OptionalscaleMultiplier?: numberA custom scale multiplier applied on scale correction
Configure the token ring visuals properties.
Flash the ring briefly with a certain color.
Color to flash.
Options to customize the animation.
StaticcreateCreate texture UVs for each asset into the token rings sprite sheet.
StaticcreateCreate an easing function that spikes in the center. Ideal duration is around 1600ms.
OptionalspikePct: number = 0.5Position on [0,1] where the spike occurs.
StaticeaseSoft ping pong curve for photosensitive people.
The proportional animation timing on [0,1].
The eased animation progress on [0,1].
StaticeaseEasing function that produces two peaks before returning to the original value. Ideal duration is around 500ms.
The proportional animation timing on [0,1].
The eased animation progress on [0,1].
StaticgetGet ring and background names for a given size.
The size to match (grid size dimension)
StaticgetGet the UVs array for a given texture name and scale correction.
Name of the texture we want to get UVs.
OptionalscaleCorrection: number = 1The scale correction applied to UVs.
StaticinitializeInitialize the Token Rings system, registering the batch plugin and patching PrimaryCanvasGroup#addToken.
Dynamic Token Ring Manager.