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/orbit

Exports of @dioramajs/text/orbit.

View as Markdown
On this page
import { default, MAX_LETTERS, wrap } from '@dioramajs/text/orbit'

Functions

wrapLays the letters of `atlas` round a form of radius `size` px: each line on a band (cylinder, ring) or a row of a globe (sphere), its first copy centred in front. With `repeat` a line is copied to fill its circle, its letters spread a little so the copies close up; a globe also fills its surface with rows of the lines from pole to pole. The form grows when a line would not fit.

Constants

defaultThe text wrapped round a 3D form that turns: a drum like a spinning label, a globe of rows or a tilted ring round the element's centre, passing in front of and behind its image. The letters bend with the form and are lit by their normals, so those turning away darken and the ones at the back show mirrored through the gaps, dimmed by depth. The turn follows the scroll, a drag with inertia or runs by itself. The DOM text stays once for screen readers.
MAX_LETTERSMost letters drawn, copies included.

Interfaces

WrappedThe letters laid out on the form.

Types