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

floorOf function

Where the row at `share` of a picture's height (from its top) lands in the box, as box UV with y up, under the element's object-fit and object-position.

View as Markdown
import { floorOf } from '@dioramajs/media/reflection'

. Clamped to the box.

function floorOf(
  options: FitOptions,
  natural: readonly [number, number],
  box: readonly [number, number],
  share: number,
): number

Parameters

NameTypeDescription
optionsFitOptions
naturalreadonly [number, number]
boxreadonly [number, number]
sharenumber

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