ReadonlytimeReadonlydeltaReadonlypixelReadonlyresolutionCanvas resolution, physical px.
ReadonlymouseMouse position on the element (element-local, bottom-left origin).
ReadonlymouseMouse position on the canvas (canvas-local, bottom-left origin).
ReadonlyintersectionReadonlyenterReadonlyleaveReadonlysrcElement capture texture (read-only input for the first stage).
ReadonlytargetDestination assigned to this stage. null means the canvas.
ReadonlyuniformsUser-defined uniforms from VFXProps.uniforms
Values are re-evaluated every frame efore update().
Built-in uniforms (time etc) are exposed as top-level ctx fields instead.
ReadonlyvfxReadonlydimsPer-stage layout snapshot — same shape as Effect.outputRect's
dims argument. Fresh in update and render; in init it
holds placeholder values until the first frame resolves.
ReadonlyquadDefault fullscreen quad (NDC -1..1), mapped to the target's viewport.
ReadonlyglRaw WebGL2 context, for low-level operations
(DataTexture upload, extensions, MRT, etc).
Resources allocated here are the caller's responsibility: free in
dispose(), rebuild in onContextRestored(cb).
Wrap an externally-produced texture for use as a uniform.
Each call allocates a new GPU texture (no caching), so call this
once in init() and reuse the result across frames.
WebGLTexture: you must pass opts.size, and you must re-wraponContextRestored(cb).autoUpdate defaults to true for HTMLVideoElement,
HTMLCanvasElement, and OffscreenCanvas, and false for
everything else.
Optionalopts: {Run a draw call.
Only valid during Effect.render(); other calls are ignored.
Subscribe to webglcontextrestored to rebuild resources allocated
via raw ctx.gl. High-level API resources (createRenderTarget,
wrapTexture, EffectGeometry) are restored automatically.
Returns an unsubscribe function; auto-unsubscribed on dispose.
Context passed to each Effect lifecycle hook.
Fields are updated each frame automatically.