Voxels interface
Cubes on a grid over the glyphs of a raster.
import type { Voxels } from '@dioramajs/text/voxel'interface VoxelsMembers
| Name | Type | Description |
|---|---|---|
readonly at | Float32Array | Per cube: centre x, y in box px (y down), width in cells, and its place in the build wave, em. |
readonly cell | number | Grid step in box px: |
readonly color | Float32Array | Per cube: linear r, g, b of the text there, and a random 0..1. |
readonly count | number | |
readonly em | number | Median font size, px: the unit of the wave. |
readonly extra | number | Widest wave of the build past a cube's own column, em: rows and lines. |
readonly from | Float32Array | Per cube: where it starts as a share of |
readonly left | number | Left edge of the cubes, box px: where the wave starts. |
readonly near | Float32Array | Per cube: share of the cells beside it that hold cubes, left, right, above, below. |
readonly spin | Float32Array | Per cube: a unit axis it tumbles around and the angle it starts turned by, radians. |
readonly wave | number | The wave of the right-most column, em. |
Defined in packages/text/src/voxel.ts.