API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classCallbackRenderPass

@codexo/exojs / rendering / stable

Runs a user callback as one pass. The callback receives the RenderingContext (high-level: `context.render(node)`, `context.backend` immediate draws, etc.). Set `options.target` to redirect the callback's output into an off-screen RenderTexture (immediate-mode "scene" → texture). To run a low-level BackendRenderPass inside a pipeline, bridge it here: `new CallbackRenderPass((context) => context.backend.execute(myBackendPass))`. `view`/`target`/`clear` are fixed at construction; the off-screen redirect is built once and reused every frame (no per-frame allocation). `execute` is not re-entrant — a callback must not re-run the same pass instance; the reentrancy guard keeps the redirect's active context from being clobbered. If your callback closes over owned GPU resources, subclass RenderPass instead so you can override `destroy()`.

2
props
3
methods
0
events
Import
import { CallbackRenderPass } from '@codexo/exojs'

Runs a user callback as one pass. The callback receives the RenderingContext (high-level: `context.render(node)`, `context.backend` immediate draws, etc.). Set `options.target` to redirect the callback's output into an off-screen RenderTexture (immediate-mode "scene" → texture).

To run a low-level BackendRenderPass inside a pipeline, bridge it here: `new CallbackRenderPass((context) => context.backend.execute(myBackendPass))`.

`view`/`target`/`clear` are fixed at construction; the off-screen redirect is built once and reused every frame (no per-frame allocation). `execute` is not re-entrant — a callback must not re-run the same pass instance; the reentrancy guard keeps the redirect's active context from being clobbered. If your callback closes over owned GPU resources, subclass RenderPass instead so you can override `destroy()`.

Constructors 1
new(callback: object, options?: CallbackRenderPassOptions): CallbackRenderPass
Methods 3
destroy(): void
execute(context: RenderingContext): void
resize(_width: number, _height: number): void
Properties 2
enabled: boolean
label: string
Source