Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

voxels function

Cubes where the ink covers enough of a grid cell, coloured by the ink under them.

View as Markdown
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,
): Voxels

Parameters

NameTypeDescription
layoutRaster
imageImageData | undefined
optionsVoxelOptions

Defined in packages/text/src/voxel.ts.