effect-motion
API ReferencethreeNamespacesRendererFunctions

make

function make(options?): Effect<Renderer, ThreeException, Scope>;

Function: make()

function make(options?): Effect<Renderer, ThreeException, Scope>;

Defined in: packages/three/src/Renderer.ts:143

Acquire a renderer, initialization already awaited.

Parameters

ParameterTypeDescription
optionsMakeOptionsRenderer parameters plus optional initial sizing.

Returns

Effect<Renderer, ThreeException, Scope>

A renderer, valid for the current scope.

Remarks

Scoped: on close the renderer waits for in-flight GPU work to land, drains the queue, and disposes. A failure during that teardown is logged rather than raised, so it never masks the scope's real outcome.

Without a canvas, three creates one. For headless use, pass the canvas and device from @effect-motion/three/node.

Example

const renderer = yield* Renderer.make({ width: 640, height: 360 });

On this page