packStyle
import { packStyle } from 'pixi-silk/i18n';
function packStyle(
style: ThemeStyle,
out: Float32Array,
offset?: number
): void;
Packs a resolved style into one style row of STYLE_FLOATS floats at offset:
| texel | x | y | z | w |
|---|---|---|---|---|
| 0 | fill r | g | b | a |
| 1 | outline r | g | b | a |
| 2 | glow r | g | b | a |
| 3 | shadow r | g | b | a |
| 4 | outline width (px) | glow width (px) | shadow softness (0 to 1) | weight bias (em) |
| 5 | shadow offset x (px) | y (px) | underline thickness (em) | underline offset (em) |
| 6 | line r | g | b | a |
| 7 | strike thickness (em) | strike offset (em) | flags | 0 |
Colours are straight (not premultiplied), with the style’s alpha multiplied in.
Parameters#
| Parameter | Type | Default value |
|---|---|---|
style | ThemeStyle | undefined |
out | Float32Array | undefined |
offset | number | 0 |
Returns#
void