RenderOptions interface
Options of the `render` plugin.
import type { RenderOptions } from '@dioramajs/diorama/render'interface RenderOptionsMembers
| Name | Type | Description |
|---|---|---|
readonly antialias | boolean | 'auto' | MSAA. 'auto' takes it when the pixel ratio at start is below 2, where it is worth its memory. |
readonly background | string | number | null | Clear colour, a number or any CSS colour. Default |
readonly distance | number | 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 forceWebGL | boolean | 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 maxPixels | number | 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.