Skip to content
pixi-silk
GitHub repository
Interface

RunSprite

import type { RunSprite } from 'pixi-silk/i18n';

A text slot drawn by the dynamic path: a single-channel SDF bitmap of the whole value, drawn as one glyph with the slot’s style, plus the colour pixels of any emoji.

Properties#

PropertyTypeDescriptionDefined in
color?Uint8Array<ArrayBufferLike>RGBA pixels of colour glyphs (emoji), same size as pixels, or absent.packages/pixi-silk/src/i18n/backend.ts:37
heightnumberHeight in pixels.packages/pixi-silk/src/i18n/backend.ts:21
leftnumberLeft edge of the bitmap from the pen, in local pixels (negative: it starts before the pen).packages/pixi-silk/src/i18n/backend.ts:29
pixelsUint8ArrayOne byte per pixel, 0.5 on the edge.packages/pixi-silk/src/i18n/backend.ts:23
rangenumberDistance range in pixels.packages/pixi-silk/src/i18n/backend.ts:25
rownumberStyle row of the slot.packages/pixi-silk/src/i18n/backend.ts:33
scalenumberBitmap pixels per local pixel.packages/pixi-silk/src/i18n/backend.ts:27
sizenumberFont size in local pixels, for effects in em.packages/pixi-silk/src/i18n/backend.ts:35
topnumberTop edge of the bitmap above the baseline, in local pixels.packages/pixi-silk/src/i18n/backend.ts:31
widthnumberWidth in pixels (a multiple of 4: WebGL uploads single-byte rows with 4-byte alignment).packages/pixi-silk/src/i18n/backend.ts:19