Sign interface
The letters of the sign drawn once: distance field, light atlas and one instance per piece.
import type { Sign } from '@dioramajs/text/neon'interface SignMembers
| Name | Type | Description |
|---|---|---|
readonly atlas | HTMLCanvasElement | Per piece, square-rooted: the tubes blurred tight (bloom and shadow) in red, the light they throw on the wall near them in green and far in blue. |
readonly bloom | number | px the bloom reaches past a tube. |
readonly cells | Float32Array | Per piece: its cell in the atlas, u0, v top, u1, v bottom. |
readonly cores | Float32Array | Per piece, box px: the tube's quad. |
readonly em | number | Largest font size, px. |
readonly field | { readonly data: Uint16Array; readonly height: number; readonly width: number } | Half floats, rows bottom up, per pixel: signed distance to the glyph edge in px (negative inside), the unit direction away from the edge (x right, y down) and 0. |
readonly fieldFrame | readonly [number, number, number, number] | The field in box px: x, y, width, height. |
readonly glow | number | Glow radius it was built for, px. |
readonly halos | Float32Array | Per piece, box px: the quad of its light on the wall. |
readonly keys | readonly number[] | Per piece: its unit in reading order. |
readonly radius | number | Radius of the tube's round section, px: half a stroke, or the outline tube. |
Defined in packages/text/src/neon.ts.