effect-motion
API ReferencerendererNamespacesRendererFunctions

prewarm

function prewarm(renderer): Effect<void, ThreeException>;

Function: prewarm()

function prewarm(renderer): Effect<void, ThreeException>;

Defined in: packages/renderer/src/Renderer.ts:500

Compile shader pipelines ahead of showing anything.

Parameters

ParameterType
rendererRenderer

Returns

Effect<void, ThreeException>

Remarks

Call once after the first syncFrame and before revealing the canvas. WebGPU compiles a pipeline the first time it is used, which would otherwise land as a visible hitch on frame one; doing it here moves that cost into startup.

On this page