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

slot function

The pose of a card at a whole depth in the pile: 0 is the top, which sits on the box.

View as Markdown
import { slot } from '@dioramajs/media/stack'

width and height are the box, rotate in degrees, offset in px.

function slot(
  style: StackStyle,
  depth: number,
  jitter: readonly [number, number, number],
  width: number,
  height: number,
  rotate: number,
  offset: number,
): Pose

Parameters

NameTypeDescription
styleStackStyle
depthnumber
jitterreadonly [number, number, number]
widthnumber
heightnumber
rotatenumber
offsetnumber

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