API

Interface FgWiring

Pre-resolved inputs to createFgEnv. Everything scene-dependent is wired here by the loader; the runtime only resolves block defs from these + the registry.

interface FgWiring {
    accessors?: Record<string, FgAccessor>;
    animations?: readonly AnimationGroup[];
    caps?: FgCapabilities;
    defs?: Record<string, FgBlockDef>;
    events?: FgEventBus;
    resolveAccessor?: (pointer: string) => FgAccessor | null;
}
Index
accessors?: Record<string, FgAccessor>
animations?: readonly AnimationGroup[]
defs?: Record<string, FgBlockDef>

Pre-supplied defs by type — bypasses the dynamic-import registry. Used by tests (hand-built defs) and to override/extend the registry.

events?: FgEventBus

Shared scene/coordinator bus. A fresh one is created if omitted.

resolveAccessor?: (pointer: string) => FgAccessor | null