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

FitOptions interface

Options of `ctx.fit`.

View as Markdown
import type { FitOptions } from '@dioramajs/diorama/effects'
interface FitOptions

Members

NameTypeDescription
readonly fit?'none' | 'cover' | 'contain' | 'fill' | 'scale-down'

CSS object-fit. Default 'cover'.

readonly position?readonly [number, number]

CSS object-position as fractions of the free space, [0.5, 0.5] is centre.

Also exported from @dioramajs/effects.

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