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

puddle function

The puddle around the text in a `width` by `height` box: a signed distance to its shore in px, negative in the water, rows top down, `scale` texels per px.

View as Markdown
import { puddle } from '@dioramajs/text/water'

. The shore wanders between SHORE ems past the glyphs and rounds off where it meets the box, so nothing marks the box.

function puddle(
  r: Raster,
  width: number,
  height: number,
  em: number,
  seed?: number,
): { data: Float32Array; height: number; scale: number; width: number }

Parameters

NameTypeDescription
rRaster
widthnumber
heightnumber
emnumber
seed?number

Default 3.

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