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

Sign interface

The letters of the sign drawn once: distance field, light atlas and one instance per piece.

View as Markdown
import type { Sign } from '@dioramajs/text/neon'
interface Sign

Members

NameTypeDescription
readonly atlasHTMLCanvasElement

Per piece, square-rooted: the tubes blurred tight (bloom and shadow) in red, the light they throw on the wall near them in green and far in blue.

readonly bloomnumber

px the bloom reaches past a tube.

readonly cellsFloat32Array

Per piece: its cell in the atlas, u0, v top, u1, v bottom.

readonly coresFloat32Array

Per piece, box px: the tube's quad.

readonly emnumber

Largest font size, px.

readonly field{ readonly data: Uint16Array; readonly height: number; readonly width: number }

Half floats, rows bottom up, per pixel: signed distance to the glyph edge in px (negative inside), the unit direction away from the edge (x right, y down) and 0.

readonly fieldFramereadonly [number, number, number, number]

The field in box px: x, y, width, height.

readonly glownumber

Glow radius it was built for, px.

readonly halosFloat32Array

Per piece, box px: the quad of its light on the wall.

readonly keysreadonly number[]

Per piece: its unit in reading order.

readonly radiusnumber

Radius of the tube's round section, px: half a stroke, or the outline tube.

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