Skip to content

RendererBackend

Defined in: packages/threeplay/src/plugins/render/types.ts:12

Wraps a three.js renderer. The engine never talks to three’s renderers directly, so a new backend only has to implement this.

dispose(): void

Defined in: packages/threeplay/src/plugins/render/types.ts:23

void


init(): Promise<void>

Defined in: packages/threeplay/src/plugins/render/types.ts:19

Async setup (WebGPU needs it). Called once by the render plugin.

Promise<void>


render(scene, camera): void

Defined in: packages/threeplay/src/plugins/render/types.ts:22

Scene

Camera

void


setSize(width, height, pixelRatio): void

Defined in: packages/threeplay/src/plugins/render/types.ts:21

Drawing buffer size in CSS pixels plus the pixel ratio.

number

number

number

void

readonly canvas: HTMLCanvasElement | null

Defined in: packages/threeplay/src/plugins/render/types.ts:15

The canvas, or null for the headless backend.


readonly kind: RendererKind

Defined in: packages/threeplay/src/plugins/render/types.ts:13


readonly three: unknown

Defined in: packages/threeplay/src/plugins/render/types.ts:17

The underlying three.js renderer (escape hatch), or null.