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

place function

Phrase `i` with the camera at `t`: in focus (t = i) it lies flat where the DOM has it; further back it moves onto the floor or ceiling of the tunnel or the helix, leaning towards the axis, and fades into the fog; nearer it grows, blurs and fades out before it reaches the eye.

View as Markdown
import { place } from '@dioramajs/text/tunnel'

. Given the phrase in focus (focus, the one at round(t)), a phrase behind that would cross it on screen fades out while that one holds. Undefined when unseen.

function place(
  i: number,
  t: number,
  rest: Rest,
  s: Scene,
  focus?: Rest,
): Placed | undefined

Parameters

NameTypeDescription
inumber
tnumber
restRest
sScene
focus?Rest

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