@babylonjs/loaders 9.26.1 → 9.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/SPLAT/gaussianSplattingStream.d.ts +79 -25
  2. package/SPLAT/gaussianSplattingStream.js +320 -95
  3. package/SPLAT/gaussianSplattingStream.js.map +1 -1
  4. package/glTF/2.0/Extensions/EXT_texture_avif.pure.js +1 -1
  5. package/glTF/2.0/Extensions/EXT_texture_avif.pure.js.map +1 -1
  6. package/glTF/2.0/Extensions/EXT_texture_webp.pure.js +1 -1
  7. package/glTF/2.0/Extensions/EXT_texture_webp.pure.js.map +1 -1
  8. package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.d.ts +143 -3
  9. package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js +622 -99
  10. package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js.map +1 -1
  11. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphEventReferenceBlock.d.ts +47 -0
  12. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphEventReferenceBlock.js +68 -0
  13. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphEventReferenceBlock.js.map +1 -0
  14. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphGLTFDataProvider.d.ts +2 -2
  15. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphGLTFDataProvider.js +1 -1
  16. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphGLTFDataProvider.js.map +1 -1
  17. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphObjectReferenceBlock.d.ts +24 -0
  18. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphObjectReferenceBlock.js +38 -0
  19. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphObjectReferenceBlock.js.map +1 -0
  20. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphUnsupportedInteractivityBlock.d.ts +41 -0
  21. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphUnsupportedInteractivityBlock.js +63 -0
  22. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphUnsupportedInteractivityBlock.js.map +1 -0
  23. package/glTF/2.0/Extensions/KHR_interactivity/index.d.ts +6 -0
  24. package/glTF/2.0/Extensions/KHR_interactivity/index.js +6 -0
  25. package/glTF/2.0/Extensions/KHR_interactivity/index.js.map +1 -1
  26. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphExporter.d.ts +243 -0
  27. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphExporter.js +2335 -0
  28. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphExporter.js.map +1 -0
  29. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphModel.d.ts +193 -0
  30. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphModel.js +919 -0
  31. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphModel.js.map +1 -0
  32. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.d.ts +30 -10
  33. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js +485 -54
  34. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js.map +1 -1
  35. package/glTF/2.0/Extensions/KHR_interactivity/interactivityHostResolver.d.ts +2 -1
  36. package/glTF/2.0/Extensions/KHR_interactivity/interactivityHostResolver.js +7 -2
  37. package/glTF/2.0/Extensions/KHR_interactivity/interactivityHostResolver.js.map +1 -1
  38. package/glTF/2.0/Extensions/KHR_interactivity/interactivityNodeState.d.ts +24 -0
  39. package/glTF/2.0/Extensions/KHR_interactivity/interactivityNodeState.js +89 -0
  40. package/glTF/2.0/Extensions/KHR_interactivity/interactivityNodeState.js.map +1 -0
  41. package/glTF/2.0/Extensions/KHR_interactivity/pure.d.ts +6 -0
  42. package/glTF/2.0/Extensions/KHR_interactivity/pure.js +6 -0
  43. package/glTF/2.0/Extensions/KHR_interactivity/pure.js.map +1 -1
  44. package/glTF/2.0/Extensions/KHR_interactivity.pure.d.ts +59 -1
  45. package/glTF/2.0/Extensions/KHR_interactivity.pure.js +129 -77
  46. package/glTF/2.0/Extensions/KHR_interactivity.pure.js.map +1 -1
  47. package/glTF/2.0/Extensions/KHR_interactivity.types.d.ts +18 -1
  48. package/glTF/2.0/Extensions/KHR_interactivity.types.js.map +1 -1
  49. package/glTF/2.0/Extensions/KHR_node_hoverability.pure.d.ts +2 -0
  50. package/glTF/2.0/Extensions/KHR_node_hoverability.pure.js +114 -56
  51. package/glTF/2.0/Extensions/KHR_node_hoverability.pure.js.map +1 -1
  52. package/glTF/2.0/Extensions/KHR_node_selectability.pure.d.ts +2 -0
  53. package/glTF/2.0/Extensions/KHR_node_selectability.pure.js +80 -35
  54. package/glTF/2.0/Extensions/KHR_node_selectability.pure.js.map +1 -1
  55. package/glTF/2.0/Extensions/KHR_texture_basisu.pure.js +1 -1
  56. package/glTF/2.0/Extensions/KHR_texture_basisu.pure.js.map +1 -1
  57. package/glTF/2.0/Extensions/interactivityRefPathToObjectConverter.js +3 -2
  58. package/glTF/2.0/Extensions/interactivityRefPathToObjectConverter.js.map +1 -1
  59. package/glTF/2.0/Extensions/objectModelMapping.d.ts +4 -2
  60. package/glTF/2.0/Extensions/objectModelMapping.js +33 -4
  61. package/glTF/2.0/Extensions/objectModelMapping.js.map +1 -1
  62. package/glTF/2.0/glTFLoader.pure.d.ts +3 -2
  63. package/glTF/2.0/glTFLoader.pure.js +50 -8
  64. package/glTF/2.0/glTFLoader.pure.js.map +1 -1
  65. package/glTF/2.0/glTFLoaderExtension.d.ts +2 -1
  66. package/glTF/2.0/glTFLoaderExtension.js.map +1 -1
  67. package/glTF/2.0/glTFLoaderInterfaces.d.ts +9 -0
  68. package/glTF/2.0/glTFLoaderInterfaces.js.map +1 -1
  69. package/package.json +3 -3
@@ -0,0 +1,193 @@
1
+ import { type IKHRInteractivity, type IKHRInteractivity_Declaration, type IKHRInteractivity_Graph, type IKHRInteractivity_OutputSocketReference, type IKHRInteractivity_Variable } from "babylonjs-gltf2interface";
2
+ import { FlowGraphTypes } from "@babylonjs/core/FlowGraph/flowGraphRichTypes.js";
3
+ /**
4
+ * Ratified KHR_interactivity specification baseline used by this importer.
5
+ */
6
+ export declare const KHR_INTERACTIVITY_SPECIFICATION_COMMIT = "f798712c5685bc9223a628140fba707db8889300";
7
+ /**
8
+ * Runtime representation of every ratified built-in KHR_interactivity type.
9
+ */
10
+ export declare const gltfTypeToBabylonType: {
11
+ [key: string]: {
12
+ length: number;
13
+ flowGraphType: FlowGraphTypes;
14
+ elementType: "number" | "boolean" | "string" | "any";
15
+ };
16
+ };
17
+ /**
18
+ * Classification of a KHR_interactivity declaration.
19
+ */
20
+ export type KHRInteractivityDeclarationSupport = "core" | "extension" | "unsupported-extension" | "unknown-core";
21
+ /**
22
+ * A structured KHR_interactivity import diagnostic.
23
+ */
24
+ export interface IKHRInteractivityDiagnostic {
25
+ /** JSON pointer identifying the source location. */
26
+ path: string;
27
+ /** Human-readable diagnostic text. */
28
+ message: string;
29
+ /** Diagnostic severity. */
30
+ severity: "error" | "warning";
31
+ }
32
+ /**
33
+ * Stable source identity retained on every FlowGraph block lowered from a KHR_interactivity node.
34
+ */
35
+ export interface IKHRInteractivityBlockProvenance {
36
+ /** Source graph index. */
37
+ graphIndex: number;
38
+ /** Source node index. */
39
+ nodeIndex: number;
40
+ /** Source declaration index. */
41
+ declarationIndex: number;
42
+ /** Full operation name. */
43
+ operation: string;
44
+ /** Role of this block in a one-to-many mapping. Negative roles identify generated helper blocks. */
45
+ role: number;
46
+ /** Stable JSON pointer to the source node. */
47
+ sourcePath: string;
48
+ /** Original and lowered configuration values used for safe inverse transforms. */
49
+ configuration?: Record<string, IKHRInteractivityConfigurationProvenance>;
50
+ /** Importer-generated primitive configuration that must remain unchanged for inverse export. */
51
+ generatedConfiguration?: Record<string, unknown>;
52
+ /** Runtime fingerprints for generated configuration that changes representation while parsing. */
53
+ generatedConfigurationRuntime?: Record<string, IKHRInteractivityInputDefaultProvenance>;
54
+ /** Importer-generated unconnected input defaults that have no authored KHR socket representation. */
55
+ generatedInputDefaults?: Record<string, IKHRInteractivityInputDefaultProvenance>;
56
+ }
57
+ /**
58
+ * Import-time value retained for an unconnected FlowGraph input that is not represented by an authored KHR socket.
59
+ */
60
+ export interface IKHRInteractivityInputDefaultProvenance {
61
+ /** Type-tagged JSON-stable fingerprint of the normalized runtime input value. */
62
+ runtimeValueFingerprint?: string;
63
+ /** Whether the import-time value could not be fingerprinted safely. */
64
+ unrepresentable?: true;
65
+ }
66
+ /**
67
+ * Provenance for a transformed KHR configuration value.
68
+ */
69
+ export interface IKHRInteractivityConfigurationProvenance {
70
+ /** Exact source configuration array. */
71
+ sourceValue?: unknown[];
72
+ /** Lowered FlowGraph configuration value immediately after import. */
73
+ runtimeValue?: unknown;
74
+ }
75
+ /** @internal */
76
+ export declare function _NormalizeKHRInteractivityRuntimeValue(value: unknown): unknown[] | undefined;
77
+ /** @internal */
78
+ export declare function _CreateKHRInteractivityRuntimeValueSnapshot(value: unknown): IKHRInteractivityInputDefaultProvenance;
79
+ /**
80
+ * Stable source identity retained on a FlowGraph connection lowered from a KHR_interactivity socket.
81
+ */
82
+ export interface IKHRInteractivitySocketProvenance extends IKHRInteractivityBlockProvenance {
83
+ /** Socket category. */
84
+ kind: "value" | "flow";
85
+ /** Whether the socket is consumed by or produced from the logical KHR node. */
86
+ direction: "input" | "output";
87
+ /** Exact source KHR socket identifier. */
88
+ socket: string;
89
+ /** Exact canonical source value, when this is an input value socket. */
90
+ sourceValue?: IKHRInteractivity_Variable | IKHRInteractivity_OutputSocketReference;
91
+ /** Lowered inline runtime value immediately after import. */
92
+ runtimeValue?: unknown[];
93
+ /** Type-tagged runtime fingerprint used to distinguish parsing precision changes from edits. */
94
+ runtimeValueSnapshot?: IKHRInteractivityInputDefaultProvenance;
95
+ }
96
+ /**
97
+ * Canonical source retained on a FlowGraph lowered from KHR_interactivity.
98
+ */
99
+ export interface IKHRInteractivityGraphProvenance {
100
+ /** Source graph index. */
101
+ graphIndex: number;
102
+ /** Ratified specification revision used by the importer. */
103
+ specificationCommit: string;
104
+ /** Detached canonical source graph. */
105
+ source: IKHRInteractivity_Graph;
106
+ /** Explicit editor-authored variable defaults keyed by canonical variable index. */
107
+ authoredVariableValues?: Record<number, unknown[]>;
108
+ /** Explicit editor-authored FlowGraph variable types keyed by canonical variable index. */
109
+ authoredVariableTypes?: Record<number, string>;
110
+ /** True when variables were explicitly added, renamed, or deleted in the editor. */
111
+ authoredVariableStructureChanged?: boolean;
112
+ }
113
+ /**
114
+ * Canonical declaration information retained during import.
115
+ */
116
+ export interface IKHRInteractivityDeclarationModel {
117
+ /** Declaration index in the source graph. */
118
+ index: number;
119
+ /** Full operation name, including the defining extension when present. */
120
+ operation: string;
121
+ /** Whether Babylon can execute the declaration. */
122
+ support: KHRInteractivityDeclarationSupport;
123
+ /** Exact source declaration. */
124
+ source: IKHRInteractivity_Declaration;
125
+ }
126
+ /**
127
+ * Canonical graph information retained during import.
128
+ */
129
+ export interface IKHRInteractivityGraphModel {
130
+ /** Graph index in the root extension. */
131
+ index: number;
132
+ /** Stable source path. */
133
+ path: string;
134
+ /** Human-readable graph name. */
135
+ name: string;
136
+ /** Exact source graph, including extension and extras payloads. */
137
+ source: IKHRInteractivity_Graph;
138
+ /** Executable graph with specification defaults and fallbacks applied. */
139
+ effectiveSource: IKHRInteractivity_Graph;
140
+ /** Canonical declarations in source order. */
141
+ declarations: IKHRInteractivityDeclarationModel[];
142
+ /** Validation diagnostics for this graph. */
143
+ diagnostics: IKHRInteractivityDiagnostic[];
144
+ /** Whether this graph is valid and can be lowered to FlowGraph. */
145
+ valid: boolean;
146
+ }
147
+ /**
148
+ * Lossless canonical representation of a KHR_interactivity root extension.
149
+ */
150
+ export interface IKHRInteractivityDocument {
151
+ /** Ratified specification revision used for validation. */
152
+ specificationCommit: string;
153
+ /** Exact source extension, including unknown extensions and extras. */
154
+ source: IKHRInteractivity;
155
+ /** Default graph index, or -1 when the source selection is invalid. */
156
+ defaultGraphIndex: number;
157
+ /** Canonical graph models in source order. */
158
+ graphs: IKHRInteractivityGraphModel[];
159
+ /** Root-level validation diagnostics. */
160
+ diagnostics: IKHRInteractivityDiagnostic[];
161
+ }
162
+ /**
163
+ * Creates a detached JSON copy of a KHR_interactivity graph.
164
+ * @param graph source graph
165
+ * @returns a lossless JSON copy
166
+ */
167
+ export declare function CloneKHRInteractivityGraph(graph: IKHRInteractivity_Graph): IKHRInteractivity_Graph;
168
+ /**
169
+ * Creates the executable graph view with all ratified configuration defaults and fallback rules
170
+ * applied without modifying the lossless source graph.
171
+ * @param graph source graph
172
+ * @param declarations canonical declarations
173
+ * @param assetNodeCount number of glTF nodes in the containing asset
174
+ * @returns normalized executable graph
175
+ */
176
+ export declare function CreateEffectiveKHRInteractivityGraph(graph: IKHRInteractivity_Graph, declarations: readonly IKHRInteractivityDeclarationModel[], assetNodeCount?: number): IKHRInteractivity_Graph;
177
+ /**
178
+ * Creates and validates a canonical copy of one KHR_interactivity graph.
179
+ * @param graph source graph
180
+ * @param index graph index in the root extension
181
+ * @param supportedExtensions enabled extensions that may provide executable operations
182
+ * @param assetNodeCount number of nodes in the containing glTF asset
183
+ * @returns the canonical graph model
184
+ */
185
+ export declare function CreateKHRInteractivityGraphModel(graph: IKHRInteractivity_Graph | null | undefined, index?: number, supportedExtensions?: ReadonlySet<string>, assetNodeCount?: number): IKHRInteractivityGraphModel;
186
+ /**
187
+ * Creates an immutable canonical KHR_interactivity document and validates all graph-local references.
188
+ * @param extension source extension object from the glTF document
189
+ * @param supportedExtensions enabled extensions that may provide executable operations
190
+ * @param assetNodeCount number of nodes in the containing glTF asset
191
+ * @returns the canonical document
192
+ */
193
+ export declare function CreateKHRInteractivityDocument(extension: IKHRInteractivity, supportedExtensions?: ReadonlySet<string>, assetNodeCount?: number): IKHRInteractivityDocument;