API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classRenderingContext
Owns rendering orchestration: builds, optimizes and plays the internal RenderPlan for a RenderNode subtree, manages render-target/view state for off-screen capture, and exposes the low-level backend as an escape hatch. The conceptual model is "the context renders the node": context.render(node) // into the active target (canvas by default) context.render(node, { view }) // override view (the world view, screenView, etc.) context.renderTo(node, { target }) // into a caller-owned off-screen target (per-frame) context.capture(node, { width, height }) // into a freshly allocated RenderTexture
import { RenderingContext } from '@codexo/exojs'Owns rendering orchestration: builds, optimizes and plays the internal RenderPlan for a RenderNode subtree, manages render-target/view state for off-screen capture, and exposes the low-level backend as an escape hatch.
The conceptual model is "the context renders the node": context.render(node) // into the active target (canvas by default) context.render(node, { view }) // override view (the world view, screenView, etc.) context.renderTo(node, { target }) // into a caller-owned off-screen target (per-frame) context.capture(node, { width, height }) // into a freshly allocated RenderTexture
new(backend: RenderBackend): RenderingContextcapture(node: RenderNodeSceneNode that can produce visual output. Adds the rendering pipeline features on top of the structural transform/bounds carried by SceneNode: post-process `fi…, options: CaptureOptionsOptions for RenderingContext.capture - allocates a new RenderTexture.): RenderTextureAn off-screen render target that can also be sampled as a texture. Combines RenderTarget (framebuffer attachment) with the sampler parameters of a Texture (sca…createPixelReader(source: RenderTextureAn off-screen render target that can also be sampled as a texture. Combines RenderTarget (framebuffer attachment) with the sampler parameters of a Texture (sca…, options: PixelReaderOptionsOptions for RenderingContext.createPixelReader.): PixelReaderA standing, non-blocking readback of one rectangle of one render texture, for callers who read repeatedly: a picker, an analysis pass, a shader that produces d…drawGeometry(geometry: GeometryNon-renderable geometry data object used by advanced rendering paths. Geometry owns only vertex/index data and its layout metadata; it is not a scene node, has…, transform: MatrixMutable 3×3 row-major affine transformation matrix used throughout the rendering and physics pipeline. Layout (row, column): ``` | a b x | | c d y | | e f z |…, options: DrawGeometryOptionsOptions for RenderingContext.drawGeometry.): voidreadPixels(source: RenderTextureAn off-screen render target that can also be sampled as a texture. Combines RenderTarget (framebuffer attachment) with the sampler parameters of a Texture (sca…, options: ReadPixelsOptionsOptions for RenderingContext.readPixels.): Promise<PixelDataThe pixels RenderingContext.readPixels read, shaped for `ImageData`.>renderTo(node: RenderNodeSceneNode that can produce visual output. Adds the rendering pipeline features on top of the structural transform/bounds carried by SceneNode: post-process `fi…, options: RenderToOptionsOptions for DrawContext.renderTo: a caller-owned, per-frame off-screen target, reused across frames (no per-call allocation). Unlike RenderingContext.capture,…): voidresize(width: number, height: number): voidbackend: RenderBackend