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

wrap function

Lays 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.

View as Markdown
import { wrap } from '@dioramajs/text/orbit'

. 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.

function wrap(
  atlas: Atlas,
  style: Style,
  size: number,
  repeat: boolean,
  limit?: number,
): Wrapped

Parameters

NameTypeDescription
atlasAtlas
styleStyle
sizenumber
repeatboolean
limit?number

Default MAX_LETTERS.

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