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/blocks/beam

Exports of @dioramajs/blocks/beam.

View as Markdown
On this page
import { default, perimeter, pulseAt } from '@dioramajs/blocks/beam'

Functions

perimeterLength in px of the border of a box `width` x `height` with corner radius `r`.
pulseAtWhere the two pulse beams are `clock` s into the loop: the distance each has run from the top middle, px, and their opacity. They run half the border, meet at the bottom and rest.
radiusOfThe largest corner radius of an element in px, at most half its shorter side.

Constants

defaultA short bright beam with a soft trail runs around the element's rounded border, like the border beam of SaaS feature cards and highlighted inputs: all the time, in pulses from the top, or while hovered and focused. The element stays DOM; the light draws over its edge.