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

RenderOptions interface

Options of the `render` plugin.

View as Markdown
import type { RenderOptions } from '@dioramajs/diorama/render'
interface RenderOptions

Members

NameTypeDescription
readonly antialiasboolean | 'auto'

MSAA. 'auto' takes it when the pixel ratio at start is below 2, where it is worth its memory.

readonly backgroundstring | number | null

Clear colour, a number or any CSS colour. Default null keeps the canvas transparent for a canvas over the page. Use an opaque colour for a canvas behind transparent page content.

readonly distancenumber

Camera distance in CSS px. Smaller means stronger perspective. Default 1000.

readonly environment'none' | 'room'

Image-based light for lit materials: 'room' (three's RoomEnvironment through PMREM, made on the first lease) or 'none' (default).

readonly forceWebGLboolean

Use the WebGL 2 backend even where WebGPU is available. Default false: WebGPU when the browser gives an adapter, else WebGL 2, chosen before the renderer is made.

readonly maxPixelsnumber

Upper bound for the drawing buffer, in device pixels. The pixel ratio drops to fit, so a large high-DPI screen cannot demand gigabytes of GPU memory. Default 4 million.

Also exported from @dioramajs/render.

Defined in packages/render/src/index.ts.