API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceRendererBinding
Binds one or more drawable constructors to a renderer factory. Pure descriptor - no active renderer, no GPU resources, no side effects until `create` is called once per backend during Application construction. `targets` must contain at least one entry. All targets share the single renderer instance produced by `create`. Returning `undefined` from `create` means the backend is unsupported; the entire binding is skipped for that backend. The declared type erases the pairing between `targets` and what `create` returns, so write bindings with `defineRendererBinding` (`@codexo/exojs/renderer-sdk`), which infers the drawable union from `targets` and rejects a renderer that does not handle it.
import { RendererBinding } from '@codexo/exojs/extensions'Binds one or more drawable constructors to a renderer factory. Pure descriptor - no active renderer, no GPU resources, no side effects until `create` is called once per backend during Application construction.
`targets` must contain at least one entry. All targets share the single renderer instance produced by `create`. Returning `undefined` from `create` means the backend is unsupported; the entire binding is skipped for that backend.
The declared type erases the pairing between `targets` and what `create` returns, so write bindings with `defineRendererBinding` (`@codexo/exojs/renderer-sdk`), which infers the drawable union from `targets` and rejects a renderer that does not handle it.
create(backend: RenderBackend): Renderer<RenderBackend, Target> | undefinedtargets: readonly DrawableConstructor<Target>[]