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

membrane function

The radius of the round profile over a signed distance field `dist` (CSS px, positive inside, `cols` by `rows` cells of `cell` px), written d below.

View as Markdown
import { membrane } from '@dioramajs/text/inflate'

. The letters are inflated like a membrane under pressure: u solves Poisson's equation, zero on the glyph edge, coarse to fine. Where a stroke of half-width a is straight, u = d (2a - d) / 2, so the radius u / d + d / 2 is a, and the height sqrt(d (2a - d)) is a round tube; a dot becomes a dome and a joint bulges. Cells outside get the radius of the edge next to them.

function membrane(
  dist: Float32Array,
  cols: number,
  rows: number,
  cell: number,
  pause?: Pause,
): Promise<Float32Array<ArrayBufferLike>>

Parameters

NameTypeDescription
distFloat32Array
colsnumber
rowsnumber
cellnumber
pause?Pause

Default ....

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