API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classCallbackRenderPass
Runs a user callback as one pass. The callback receives a PassContext scoped to the active target: `pass.render(node)`, `pass.clear(color)`, `pass.drawGeometry(...)`, `pass.renderTo(...)`, and `pass.backend` for raw draws. Set `options.target` to redirect the callback's output into an off-screen RenderTexture (immediate-mode "scene" → texture); inside that redirect every `pass.*` verb operates on the texture. To run a low-level BackendRenderPass inside a pipeline, bridge it here: `new CallbackRenderPass((pass) => pass.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()`.
import { CallbackRenderPass } from '@codexo/exojs'Runs a user callback as one pass. The callback receives a PassContext scoped to the active target: `pass.render(node)`, `pass.clear(color)`, `pass.drawGeometry(...)`, `pass.renderTo(...)`, and `pass.backend` for raw draws. Set `options.target` to redirect the callback's output into an off-screen RenderTexture (immediate-mode "scene" → texture); inside that redirect every `pass.*` verb operates on the texture.
To run a low-level BackendRenderPass inside a pipeline, bridge it here: `new CallbackRenderPass((pass) => pass.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()`.
new(callback: (pass: PassContextPass-scoped DrawContext: the active render target and view for a CallbackRenderPass callback. `clear`/`render`/`renderTo` route through the owning RenderingCon…) => void, options?: CallbackRenderPassOptionsOptions for CallbackRenderPass.): CallbackRenderPassdestroy(): voidresize(_width: number, _height: number): voidenabled: booleanlabel: string