1681-engine / index / FloatingTextOptions
Interface: FloatingTextOptions ​
Defined in: src/fx/FloatingText.ts:11
Properties ​
depth? ​
optional depth?: number;Defined in: src/fx/FloatingText.ts:25
Depth given to every label taken (default: left as made).
fontFamily ​
fontFamily: string;Defined in: src/fx/FloatingText.ts:13
A font already loaded (document.fonts.load), or the glyphs bake in the fallback.
glyphs? ​
optional glyphs?: string;Defined in: src/fx/FloatingText.ts:23
Letters beyond ASCII the labels print (see installLabelFont), baked with each style's font.
keepPerStyle? ​
optional keepPerStyle?: number;Defined in: src/fx/FloatingText.ts:21
Spent labels of one style kept for reuse; the rest are destroyed (default 24).
parent? ​
optional parent?: Container<ContainerChild>;Defined in: src/fx/FloatingText.ts:30
Where new labels are added (default the stage's world layer). Give a scene's root and the labels live and die with the scene: on the world layer they outlive it, and a label still floating when the scene changes stays.
resolution? ​
optional resolution?: number;Defined in: src/fx/FloatingText.ts:19
Rasterising resolution (default 4, crisp under a zoomed camera).
stroke? ​
optional stroke?: string;Defined in: src/fx/FloatingText.ts:15
Outline colour (default near-black).
strokeWidth? ​
optional strokeWidth?: (size) => number;Defined in: src/fx/FloatingText.ts:17
Outline width for a size (default a fifth of it, at least 2).
Parameters ​
| Parameter | Type |
|---|---|
size | number |
Returns ​
number