You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BREAKING: unifies the System.update protocol across all managers and removes a
dead internal rendering barrel.
3a — System.update(delta: Time): void across all 5 app systems. InputManager
update(): this -> update(_delta: Time): void (fluent return removed);
InteractionManager + AudioManager gain the param. Tween/RenderingContext were
already conform. 0 external call-sites broke. The param is `_delta` (unused but
required by the System contract; lint:strict forbids unused non-_ args, the
spec's "lint allows it" assumption was empirically wrong).
3b — registerSerializer + Prefab.from/instantiate gain an optional `registry`
param (per-app serialization; default = global). New @internal
_resetDefaultSerializers() + SerializationRegistry.clear() close a cross-suite
global-registry leak (serialization.test.ts:273); afterEach reset + 2 new tests.
3d — deleted dead internal barrel src/rendering/index.ts (0 static imports;
migrated its one dynamic test import to #rendering/public). Documented the
abstract-vs-concrete renderer boundary in renderer-sdk.ts + custom-renderers guide.
api-mdx regenerated (audio/input/interaction-manager, prefab). 3395 tests pass.
Copy file name to clipboardExpand all lines: site/src/content/guide/debugging/custom-renderers.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,6 +129,8 @@ Direct backend access is deliberately unabstracted — you are writing raw WebGP
129
129
130
130
ExoJS resolves a renderer for each drawable type through the `RendererRegistry` (available from `@codexo/exojs/renderer-sdk`). You can register a custom renderer for an existing drawable type via `backend.rendererRegistry.registerRenderer(drawableConstructor, renderer)`. A renderer implements `connect(backend)`, `disconnect()`, `render(drawable)`, and `flush()` — these map to GPU resource acquisition, release, per-drawable recording, and batch submission respectively.
131
131
132
+
In practice you build a custom renderer by extending one of the **abstract** base renderers from `@codexo/exojs/renderer-sdk` — `AbstractWebGl2Renderer` / `AbstractWebGl2BatchedRenderer` (WebGL2) or `AbstractWebGpuRenderer` (WebGPU) — which is exactly how the `@codexo/exojs-particles` and `@codexo/exojs-tilemap` packages build theirs. The engine's built-in *concrete* renderers (e.g. `WebGl2SpriteRenderer`) are internal: coupled to internal sprite/mesh data paths and intentionally not part of the SDK surface, so don't subclass them directly.
133
+
132
134
Registering a custom renderer is an advanced extension point. For most custom rendering needs — procedural geometry between draws, a single custom shape that doesn't fit `Mesh` — `CallbackRenderPass` is the simpler and more intentional path.
@@ -132,8 +133,8 @@ export class AudioManager implements System {
132
133
});
133
134
}
134
135
135
-
/** Called once per frame from Application.update(). */
136
-
publicupdate(): void{
136
+
/** Called once per frame from Application.update(). The frame delta is unused here (hence `_delta`); present for {@link System} contract compliance. */
0 commit comments