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

toBox function

A point in client px, such as an event's `clientX` and `clientY`, in px of `box` from its bottom left: the units of the shader's `box` times `u.size`.

View as Markdown
import { toBox } from '@dioramajs/diorama/kit'

. Pass input as the box in the update, since the page may scroll under a still pointer. Writes into out when given.

function toBox(
  point: { readonly x: number; readonly y: number },
  box: ClientBox,
  out?: { x: number; y: number },
): { x: number; y: number }

Parameters

NameTypeDescription
point{ readonly x: number; readonly y: number }
boxClientBox
out?{ x: number; y: number }

Default ....

Also exported from @dioramajs/effects/kit.

Defined in packages/effects/src/kit.ts.