import { type GLTFLoader } from "../glTFLoader.pure.js"; import { type IGLTFLoaderExtension } from "../glTFLoaderExtension.js"; import { FlowGraphCoordinator } from "@babylonjs/core/FlowGraph/flowGraphCoordinator.js"; import { type Scene } from "@babylonjs/core/scene.js"; import { CompositePathToObjectConverter } from "./compositePathToObjectConverter.js"; import { InteractivityHostResolver } from "./KHR_interactivity/interactivityHostResolver.js"; import { type IObjectAccessor, type ISerializedFlowGraph } from "@babylonjs/core/FlowGraph/typeDefinitions.js"; import { type IKHRInteractivityDiagnostic, type IKHRInteractivityDocument, type IKHRInteractivityGraphModel } from "./KHR_interactivity/interactivityGraphModel.js"; import { type FlowGraph } from "@babylonjs/core/FlowGraph/flowGraph.js"; export * from "./KHR_interactivity/interactivityGraphExporter.js"; export { _CaptureKHRInteractivityRuntimeInputDefaults } from "./KHR_interactivity/interactivityGraphParser.js"; /** * Runtime projection of one canonical KHR_interactivity graph. */ export interface IKHRInteractivityGraphImportResult { /** Canonical source graph and diagnostics. */ graph: IKHRInteractivityGraphModel; /** Executable FlowGraph serialization when lowering succeeded. */ serializedFlowGraph?: ISerializedFlowGraph; /** Runtime FlowGraph when runtime construction was requested. */ flowGraph?: FlowGraph; /** Coordinator that owns the runtime FlowGraph. */ coordinator?: FlowGraphCoordinator; /** Additional lowering/runtime diagnostics. */ diagnostics: IKHRInteractivityDiagnostic[]; } /** * Completed KHR_interactivity import result associated with a loaded scene. */ export interface IKHRInteractivityImportResult { /** Stable zero-based identity of this interactivity asset among assets appended to the scene. */ assetIndex: number; /** Canonical, lossless source document. */ document: IKHRInteractivityDocument; /** Graph import results in source order. */ graphs: IKHRInteractivityGraphImportResult[]; /** Shared path converter required by pointer blocks. */ pathConverter: CompositePathToObjectConverter; /** Live glTF loader data used by glTF data-provider blocks. */ glTF: GLTFLoader["gltf"]; /** Scene that owns the imported asset and its runtime object mappings, when retained by the importer. */ scene?: Scene; /** Host resolver that supplies KHR reference semantics to executable graphs. */ hostResolver: InteractivityHostResolver; } /** * Gets the completed KHR_interactivity import result for a loaded scene. * @param scene scene loaded from the glTF asset * @returns the import result, or undefined when the scene has no KHR_interactivity data */ export declare function GetKHRInteractivityImportResult(scene: Scene): IKHRInteractivityImportResult | undefined; /** * Gets every completed KHR_interactivity import result appended to a loaded scene. * Results remain in asset load order and each result has a stable {@link IKHRInteractivityImportResult.assetIndex}. * @param scene scene containing the loaded glTF assets * @returns the scene's import results, or an empty array when it has no KHR_interactivity data */ export declare function GetKHRInteractivityImportResults(scene: Scene): readonly IKHRInteractivityImportResult[]; /** * Loader extension for KHR_interactivity */ export declare class KHR_interactivity implements IGLTFLoaderExtension { private _loader; /** * The name of this extension. */ readonly name = "KHR_interactivity"; /** Runs after extensions that contribute interactivity operations and object state. */ readonly order = 200; /** * Defines whether this extension is enabled. */ enabled: boolean; private _gltfPathConverter?; private _pathConverter?; /** * @internal * @param _loader */ constructor(_loader: GLTFLoader); private _initializePathConverter; dispose(): void; onReady(): Promise; } /** * @internal * populates the object model with the interactivity extension */ export declare function _AddInteractivityObjectModel(scene: Scene, targetFps: number, mapping: object): void; /** * @internal * Registers KHR_interactivity runtime dependencies without changing the extension registry. */ export declare function _RegisterKHRInteractivityRuntime(): void; /** * Registers the KHR_interactivity glTF loader extension. * Safe to call multiple times; only the first call has an effect. */ export declare function RegisterKHR_interactivity(): void;