API

Interface EffectRendererOptions

Options for createEffectRenderer.

interface EffectRendererOptions {
    clear?: boolean;
    clearColor?: GPUColorDict;
    name?: string;
    update?: (deltaMs: number) => void;
}
Index
clear?: boolean

Whether to clear the swapchain before drawing. Defaults to true.

clearColor?: GPUColorDict

Clear colour. Defaults to opaque black.

name?: string

Label for GPU resources. Defaults to the effect's own name.

update?: (deltaMs: number) => void

Per-frame callback invoked just before the effect is drawn, receiving the frame delta in milliseconds. Use it to update uniforms (e.g. time, animation state). This is the effect-path equivalent of a scene's onBeforeRender.