Skip to content

InspectorFacetContributor

Defined in: Inspector.ts:178

A plugin-registered contributor that augments component (and optionally entity) snapshots with a namespaced facet derived from live, non-serialized state — the seam that lets the renderer publish rendered geometry without core taking a dependency on, or knowing anything about, the renderer.

Register via Inspector.registerFacetContributor. Mirrors the contributor pattern used elsewhere in the engine (DebugContributor, save’s SnapshotContributor): the owning plugin pushes capability in, rather than core reaching out to grab it.

readonly namespace: string

Defined in: Inspector.ts:180

Stable key the facet is attached under (e.g. "render").

inspectComponent(component): unknown

Defined in: Inspector.ts:186

Facet for a single component, or undefined/null to contribute nothing. Called once per component per snapshot. Throwing is tolerated (the facet is simply omitted), but returning undefined is preferred.

Component

unknown


optional inspectEntity(componentFacets): unknown

Defined in: Inspector.ts:195

Optional entity-level facet, derived from the per-component facets this contributor produced for the entity, in add() insertion order (including undefined gaps for components that contributed nothing). Lets the owning plugin decide how to surface one representative facet at the entity level — e.g. the renderer picks the first painted component. Return undefined/null to contribute no entity-level facet.

readonly unknown[]

unknown