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

@dioramajs/text/pins

Exports of @dioramajs/text/pins.

View as Markdown
On this page
import { default, field, MAX_PINS } from '@dioramajs/text/pins'

Functions

fieldPins on a grid over a `width` by `height` box, a hex grid when `hex`. Each stands out by a smooth step of the distance to the glyph edge, so the letters rise as plateaus whose edges ramp over a pitch or so. With a `halo` only the pins that close to the glyphs are kept, fewer and fewer toward its edge, so the field takes the shape of the word. The pitch widens until the pins fit `max`. The wave reaches them left to right and a little top down.
pinShapeOne pin of `style` in pitches, its top at z 0: a thin shaft under a domed metal head, a square bar with a bevelled top, or a round button. `pinPart` says which vertices ride with the top and which belong to the head.
spanSeconds until the last pin has started to rise.

Constants

defaultThe element's box becomes a pin-art toy: a dense field of lit metal pins seen through the page camera, the ones inside the glyphs pushed toward the viewer so the text stands out in relief. On view the letters rise out of the flat field in a wave; the pointer presses the pins in (or pushes them out) in a soft circle and they spring back.
MAX_PINSMost pins at the high tier; past it the pitch widens.

Interfaces

FieldThe pins over a box and how far each stands out at rest.
FieldOptions