A TokenRing is constructed by providing a reference to a Token object.
Static
baseToken Rings sprite sheet base texture.
Static
effectsThe effects which could be applied to a token ring (using bitwise operations).
Static
texturesRings and background textures UVs and center offset.
Static
tokenThe token ring shader class definition.
Reference to the token that should be animated.
Static
initializedIs 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.
Optional
mesh: 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.
Optional
options: { fit?: string } = {}Optional
fit?: stringThe desired fit mode
Configure the token ring visuals properties.
Flash the ring briefly with a certain color.
Color to flash.
Options to customize the animation.
Static
createCreate texture UVs for each asset into the token rings sprite sheet.
Static
createCreate an easing function that spikes in the center. Ideal duration is around 1600ms.
Optional
spikePct: number = 0.5Position on [0,1] where the spike occurs.
Static
easeSoft ping pong curve for photosensitive people.
The proportional animation timing on [0,1].
The eased animation progress on [0,1].
Static
easeEasing 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].
Static
getGet ring and background names for a given size.
The size to match (grid size dimension)
Static
getGet the UVs array for a given texture name and scale correction.
Name of the texture we want to get UVs.
Optional
scaleCorrection: number = 1The scale correction applied to UVs.
Static
initializeInitialize the Token Rings system, registering the batch plugin and patching PrimaryCanvasGroup#addToken.
Dynamic Token Ring Manager.