Skip to content

InspectorFacetContributor

Defined in: Inspector.ts:331

A plugin-registered contributor that augments component (and optionally entity) snapshots with a namespaced facet derived from live runtime state. This is how the renderer publishes 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): the owning plugin pushes capability in rather than core reaching out to grab it.

readonly namespace: string

Defined in: Inspector.ts:333

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

inspectComponent(component): unknown

Defined in: Inspector.ts:339

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:348

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

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/core.md.