RenderContext
The services a renderer implementation gets from the engine: coordinate
Interface: RenderContext
Defined in: packages/renderer/src/EntityRenderer.ts:79
The services a renderer implementation gets from the engine: coordinate conversion, viewport size, async registration, and the shared text and image actors.
Properties
height
readonly height: number;Defined in: packages/renderer/src/EntityRenderer.ts:93
Current viewport height in scene units.
images
readonly images: Images;Defined in: packages/renderer/src/EntityRenderer.ts:107
Decoded image textures, cached for the renderer's scope.
text
readonly text: Text;Defined in: packages/renderer/src/EntityRenderer.ts:105
The shared SDF text actor: registered fonts, the glyph atlas, layout.
toThree
readonly toThree: (x, y, z) => Vector3;Defined in: packages/renderer/src/EntityRenderer.ts:89
Convert scene coordinates to three coordinates.
Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
z | number |
Returns
Vector3
Remarks
The two spaces are axis-identical (x right, y up, origin at the viewport center), so this is the identity — kept as the one named boundary seam. Always position objects through this rather than assuming the equivalence at call sites.
waitFor
readonly waitFor: (work) => void;Defined in: packages/renderer/src/EntityRenderer.ts:103
Register async work the frame must not be drawn without.
Parameters
| Parameter | Type |
|---|---|
work | Effect<unknown, EffectMotionError> |
Returns
void
Remarks
build and update are synchronous, but some content is not ready
immediately — a glyph layout, a texture decode. Hand that work here and
the render path waits for it before presenting, so a frame never ships
half-built. Failures surface in the render call's error channel.
width
readonly width: number;Defined in: packages/renderer/src/EntityRenderer.ts:91
Current viewport width in scene units.