Renderer · interface
TextStyle
Explained in Hello world.
interface TextStyleimport type { TextStyle } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
cellSizereadonly | number | Pixels per cell. A 5x7 glyph is 5x and 7x this. |
colorreadonly | Vec3 | |
glowreadonly | number | Self-illumination, 0 for matte and ~1 for something that reads as lit. |
alphareadonly | number | |
revealreadonly | number | 0 to 1 through the arrival animation. |
spinreadonly | number | Radians of entry spin. Zero for text that should not tumble in. |
punchreadonly | number | Extra scale at the moment of arrival. |
bobreadonly | number | Idle vertical bob, in pixels. |
charOffsetreadonlyoptional | number | Where this piece sits in a longer line, for the arrival stagger.MoreOnly needed when one line is drawn as several objects — words around a keycap. Left at the defaults, a piece staggers across itself, which is right for a line drawn in one go. |
charSpanreadonlyoptional | number |