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.
Properties
Section titled “Properties”namespace
Section titled “namespace”
readonlynamespace:string
Defined in: Inspector.ts:180
Stable key the facet is attached under (e.g. "render").
Methods
Section titled “Methods”inspectComponent()
Section titled “inspectComponent()”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.
Parameters
Section titled “Parameters”component
Section titled “component”Returns
Section titled “Returns”unknown
inspectEntity()?
Section titled “inspectEntity()?”
optionalinspectEntity(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.
Parameters
Section titled “Parameters”componentFacets
Section titled “componentFacets”readonly unknown[]
Returns
Section titled “Returns”unknown