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

@dioramajs/render

WebGPU renderer with the WebGL 2 fallback.

View as Markdown
On this page
import { cssColor, render } from '@dioramajs/render'

Functions

cssColorAny CSS colour as '#rrggbb', which three's `Color.setStyle` parses. Alpha is dropped. Hex, rgb() and hsl() in both syntaxes and colour names are parsed here; other colour spaces go through a canvas, so they need a browser. Undefined for what is not a colour.

Constants

renderThree.js on the stage canvas. At z = 0 one world unit is one CSS pixel, so objects line up with the DOM and depth still reads as real perspective.

Interfaces

BoxA viewport box in CSS px, as anchors report it.
EnvironmentLeaseA lease on `scene.environment`, see `RenderApi.environment`.
RenderApiThe `render` service: the three.js renderer, scene and camera.
RenderOptionsOptions of the `render` plugin.