import type { World } from '@forgeax/engine-ecs'; import type { ComponentValuesMap, LocalEntityId, SceneAsset } from '@forgeax/engine-types'; import { type Handle, type Result } from '@forgeax/engine-types'; import type { SceneInstanceMount } from './runtime-types.js'; /** Numeric representation used only inside the Scene runtime. */ export interface CompiledSceneEntity { readonly localId: LocalEntityId; readonly components: Partial; } export interface CompiledSceneAsset { readonly kind: 'scene'; readonly entities: readonly CompiledSceneEntity[]; readonly mounts?: readonly SceneInstanceMount[]; readonly skinGuids?: readonly string[]; } export interface CompiledSceneResult { readonly asset: CompiledSceneAsset; readonly keyByLocalId: ReadonlyMap; readonly mountKeyByLocalId: ReadonlyMap; /** Private slots that attach directly to this scene's synthetic root. */ readonly rootLocalIds: readonly number[]; /** Effective private ChildOf edges, including nested scene attachment. */ readonly hierarchyParentByLocalId: ReadonlyMap; readonly resolveAddress: (address: unknown, field?: string) => number | undefined; } export interface KeyedSceneCompileContext { readonly resolveSource: (source: string, parent: Handle<'SceneAsset', 'shared'>) => Result, unknown>; readonly resolveAsset: (handle: Handle<'SceneAsset', 'shared'>) => Result; readonly stack: ReadonlySet; } /** * Compile keyed author data to the private numeric Scene representation. The * compiler establishes every local and nested address before the caller starts * spawning entities, so malformed references and recursive instances cannot * leave a partially usable World projection. */ export declare function compileKeyedSceneAsset(world: World, handle: Handle<'SceneAsset', 'shared'>, asset: SceneAsset, context: KeyedSceneCompileContext): Result; //# sourceMappingURL=keyed.d.ts.map