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

build function

Builds the sign from a raster of the text: a distance field of the glyphs with its direction (the tubes' normals come from it), the shape of each piece's tube and its light blurred at three radii into an atlas cell of its own, so every letter lights up alone.

View as Markdown
import { build } from '@dioramajs/text/neon'

. Yields to the browser between steps.

function build(
  layout: Raster,
  style: Style,
  glowEm: number,
  ratio: number,
): Promise<Sign>

Parameters

NameTypeDescription
layoutRaster
styleStyle
glowEmnumber
rationumber

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