# RenderOptions

interface in `@dioramajs/diorama/render`

```ts
import type { RenderOptions } from '@dioramajs/diorama/render'
```

Options of the `render` plugin.

```ts
interface RenderOptions
```

## Members

| Name | Type | Description |
| --- | --- | --- |
| `antialias` | `boolean \| 'auto'` | MSAA. 'auto' takes it when the pixel ratio at start is below 2, where it is worth its memory. |
| `background` | `string \| 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. |
| `distance` | `number` | Camera distance in CSS px. Smaller means stronger perspective. Default 1000. |
| `environment` | `'none' \| 'room'` | Image-based light for lit materials: 'room' (three's RoomEnvironment through PMREM, made on the first lease) or 'none' (default). |
| `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. |
| `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](https://github.com/MasterKurosava/diorama/blob/main/packages/render/src/index.ts#L45).
