API reference

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

C

classRenderTarget

@codexo/exojs / rendering / stable

Renderable destination — either the on-screen canvas (the `root` target owned by the backend) or an offscreen texture (a RenderTexture). Owns a 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.

7
props
10
methods
0
events
Import
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 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.

Constructors 1
new(width: number, height: number, root: boolean): RenderTarget
Methods 10
_touch(): void
addDestroyListener(listener: object): this
destroy(): void
getViewport(view: View): Rectangle
mapCoordsToPixel(point: Vector, view: View): Vector
mapPixelToCoords(point: Vector, view: View): Vector
removeDestroyListener(listener: object): this
resize(width: number, height: number): this
setView(view: View | null): this
updateViewport(): this
Properties 7
needsStencil: boolean
height: number
root: boolean
size: Size
version: number
view: View
width: number
Source