Skip to content
pixi-silk
GitHub repository
Function

updateNumberSlot

import { updateNumberSlot } from 'pixi-silk/i18n';
function updateNumberSlot(
   instances: Float32Array, 
   placement: SlotPlacement, 
   next: FormattedNumber
): boolean;

Rewrites the glyphs of a number slot in place when the new value has as many characters, each with the advance of the one it replaces (brief sec. 6.3, value-fast): no layout, no allocation beyond the formatting. Returns false when the caller must lay out again.

Parameters#

ParameterType
instancesFloat32Array
placementSlotPlacement
nextFormattedNumber

Returns#

boolean