@dioramajs/render
WebGPU renderer with the WebGL 2 fallback.
On this page
import { cssColor, render } from '@dioramajs/render'Functions
cssColor | Any 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
render | Three.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
Box | A viewport box in CSS px, as anchors report it. |
EnvironmentLease | A lease on `scene.environment`, see `RenderApi.environment`. |
RenderApi | The `render` service: the three.js renderer, scene and camera. |
RenderOptions | Options of the `render` plugin. |