API

Interface FgEnv

Per-graph RESOLVED capabilities, wired by the loader. Read-mostly.

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

Scene-object accessors resolved from JSON pointers, keyed by pointer id.

animations: readonly AnimationGroup[]

Animation handles by glTF animation index.

Scene-owned capabilities blocks may invoke without a scene reference.

defs: Record<string, FgBlockDef>

Block defs resolved up-front (awaited dynamic imports), type → def.

events: FgEventBus

Event bus the scene driver feeds (shared across graphs in a scene).

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

Resolve a JSON pointer whose effective path depends on live graph data.