voxels function
Cubes where the ink covers enough of a grid cell, coloured by the ink under them.
import { voxels } from '@dioramajs/text/voxel'The grid widens until they fit max. With bricks, neighbours in a row pair up into bricks, the pairs shifted by a cell on every other row like a wall. Each cube gets its place in the build wave: left to right, lower rows a little earlier, each line a little after the one above.
function voxels(
layout: Raster,
image: ImageData | undefined,
options: VoxelOptions,
): VoxelsParameters
| Name | Type | Description |
|---|---|---|
layout | Raster | |
image | ImageData | undefined | |
options | VoxelOptions |
Defined in packages/text/src/voxel.ts.