API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classRenderTarget
Renderable destination - either the on-screen canvas (the `root` target owned by the backend) or an offscreen texture (a RenderTexture). Owns a default View that controls the camera transform and viewport, and emits a destroy event so backends can release backing GPU resources. Set `view` to swap cameras for this target; call `resize(w, h)` when the underlying canvas / texture dimensions change. An assigned view is caller-owned: swapping it out or destroying the target leaves it alive, so destroy the views you create yourself.
import { RenderTarget } from '@codexo/exojs'Renderable destination - either the on-screen canvas (the `root` target owned by the backend) or an offscreen texture (a RenderTexture). Owns a default View that controls the camera transform and viewport, and emits a destroy event so backends can release backing GPU resources.
Set `view` to swap cameras for this target; call `resize(w, h)` when the underlying canvas / texture dimensions change. An assigned view is caller-owned: swapping it out or destroying the target leaves it alive, so destroy the views you create yourself.
new(width: number, height: number, root: boolean): RenderTarget_enableDepthTexture(): void_syncDepthSize(): void_touch(): voidaddDestroyListener(listener: () => void): thisdestroy(): voidgetViewport(view: View2D camera that defines what region of the world is visible on screen. Maintains a center position, a visible area size, a rotation, and an optional zoom level.…): RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…mapCoordsToPixel(point: VectorConcrete mutable 2D vector with full AbstractVector arithmetic and Collidable collision support (treated as a point collider). `Vector.temp` provides a shared…, view: View2D camera that defines what region of the world is visible on screen. Maintains a center position, a visible area size, a rotation, and an optional zoom level.…): VectorConcrete mutable 2D vector with full AbstractVector arithmetic and Collidable collision support (treated as a point collider). `Vector.temp` provides a shared…mapPixelToCoords(point: VectorConcrete mutable 2D vector with full AbstractVector arithmetic and Collidable collision support (treated as a point collider). `Vector.temp` provides a shared…, view: View2D camera that defines what region of the world is visible on screen. Maintains a center position, a visible area size, a rotation, and an optional zoom level.…): VectorConcrete mutable 2D vector with full AbstractVector arithmetic and Collidable collision support (treated as a point collider). `Vector.temp` provides a shared…removeDestroyListener(listener: () => void): thisresize(width: number, height: number): thisupdateViewport(): thisneedsStencil: booleandestroyed: booleanheight: numberroot: booleanversion: numberwidth: number