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

layout function

Where the prints lie on a `width` x `height` table, the same for a seed on every load.

View as Markdown
import { layout } from '@dioramajs/media/polaroids'

sizes are the prints, at the centres of their images in the page (for grid). rotate in degrees, spread 0..1 how far they stray from their places.

function layout(
  style: PolaroidsStyle,
  sizes: readonly ({ … })[],
  at: readonly ({ … })[],
  width: number,
  height: number,
  seed: number,
  rotate: number,
  spread: number,
): Spot[]

Parameters

NameTypeDescription
stylePolaroidsStyle
sizesreadonly ({ … })[]
atreadonly ({ … })[]
widthnumber
heightnumber
seednumber
rotatenumber
spreadnumber

Defined in packages/media/src/polaroids.ts.