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

pieces function

Where the pieces of radius turn are at `progress` (0 the word leaving, flat; 1 the word coming, flat), back to front.

View as Markdown
import { pieces } from '@dioramajs/text/rotator'

. height is the element's box height. Under reduced motion the words fade.

function pieces(
  style: Style,
  axis: Axis,
  t: number,
  around: Around,
  height: number,
  reduced?: boolean,
  perspective?: number,
): Piece[]

Parameters

NameTypeDescription
styleStyle
axisAxis
tnumber
aroundAround
heightnumber
reduced?boolean

Default false.

perspective?number

Default 0.

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