@babylonjs/loaders 9.31.0 → 9.31.1

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 (59) hide show
  1. package/SPLAT/gaussianSplattingDownloadManager.d.ts +10 -9
  2. package/SPLAT/gaussianSplattingDownloadManager.js +64 -53
  3. package/SPLAT/gaussianSplattingDownloadManager.js.map +1 -1
  4. package/SPLAT/gaussianSplattingResidencyPages.d.ts +49 -0
  5. package/SPLAT/gaussianSplattingResidencyPages.js +93 -0
  6. package/SPLAT/gaussianSplattingResidencyPages.js.map +1 -0
  7. package/SPLAT/gaussianSplattingStream.d.ts +154 -15
  8. package/SPLAT/gaussianSplattingStream.js +407 -25
  9. package/SPLAT/gaussianSplattingStream.js.map +1 -1
  10. package/SPLAT/gaussianSplattingWorkBuffer.d.ts +3 -1
  11. package/SPLAT/gaussianSplattingWorkBuffer.js +51 -14
  12. package/SPLAT/gaussianSplattingWorkBuffer.js.map +1 -1
  13. package/SPLAT/gaussianSplattingWorkBufferShaders.d.ts +6 -6
  14. package/SPLAT/gaussianSplattingWorkBufferShaders.js +12 -6
  15. package/SPLAT/gaussianSplattingWorkBufferShaders.js.map +1 -1
  16. package/glTF/2.0/Extensions/KHR_animation_pointer.data.pure.js +24 -9
  17. package/glTF/2.0/Extensions/KHR_animation_pointer.data.pure.js.map +1 -1
  18. package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.d.ts +6 -1
  19. package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js +66 -40
  20. package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js.map +1 -1
  21. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphDelayReferenceBlock.d.ts +26 -0
  22. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphDelayReferenceBlock.js +44 -0
  23. package/glTF/2.0/Extensions/KHR_interactivity/flowGraphDelayReferenceBlock.js.map +1 -0
  24. package/glTF/2.0/Extensions/KHR_interactivity/index.d.ts +1 -0
  25. package/glTF/2.0/Extensions/KHR_interactivity/index.js +1 -0
  26. package/glTF/2.0/Extensions/KHR_interactivity/index.js.map +1 -1
  27. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphExporter.js +7 -1
  28. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphExporter.js.map +1 -1
  29. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphModel.d.ts +2 -1
  30. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphModel.js +75 -6
  31. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphModel.js.map +1 -1
  32. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.d.ts +9 -0
  33. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js +35 -5
  34. package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js.map +1 -1
  35. package/glTF/2.0/Extensions/KHR_interactivity/pure.d.ts +1 -0
  36. package/glTF/2.0/Extensions/KHR_interactivity/pure.js +1 -0
  37. package/glTF/2.0/Extensions/KHR_interactivity/pure.js.map +1 -1
  38. package/glTF/2.0/Extensions/KHR_interactivity.pure.js +27 -6
  39. package/glTF/2.0/Extensions/KHR_interactivity.pure.js.map +1 -1
  40. package/glTF/2.0/Extensions/KHR_node_hoverability.pure.js +2 -0
  41. package/glTF/2.0/Extensions/KHR_node_hoverability.pure.js.map +1 -1
  42. package/glTF/2.0/Extensions/KHR_node_selectability.pure.js +11 -0
  43. package/glTF/2.0/Extensions/KHR_node_selectability.pure.js.map +1 -1
  44. package/glTF/2.0/Extensions/gltfAreaLightDimensions.d.ts +26 -0
  45. package/glTF/2.0/Extensions/gltfAreaLightDimensions.js +49 -0
  46. package/glTF/2.0/Extensions/gltfAreaLightDimensions.js.map +1 -0
  47. package/glTF/2.0/Extensions/gltfPathToObjectConverter.js +3 -0
  48. package/glTF/2.0/Extensions/gltfPathToObjectConverter.js.map +1 -1
  49. package/glTF/2.0/Extensions/interactivityAssetPathToObjectConverter.d.ts +1 -1
  50. package/glTF/2.0/Extensions/interactivityAssetPathToObjectConverter.js +5 -2
  51. package/glTF/2.0/Extensions/interactivityAssetPathToObjectConverter.js.map +1 -1
  52. package/glTF/2.0/Extensions/interactivityRefPathToObjectConverter.js +1 -2
  53. package/glTF/2.0/Extensions/interactivityRefPathToObjectConverter.js.map +1 -1
  54. package/glTF/2.0/Extensions/objectModelMapping.d.ts +16 -13
  55. package/glTF/2.0/Extensions/objectModelMapping.js +157 -108
  56. package/glTF/2.0/Extensions/objectModelMapping.js.map +1 -1
  57. package/glTF/2.0/glTFLoaderInterfaces.d.ts +2 -0
  58. package/glTF/2.0/glTFLoaderInterfaces.js.map +1 -1
  59. package/package.json +3 -3
@@ -0,0 +1,26 @@
1
+ import { FlowGraphBlock, type IFlowGraphBlockConfiguration } from "@babylonjs/core/FlowGraph/flowGraphBlock.js";
2
+ import { type FlowGraphContext } from "@babylonjs/core/FlowGraph/flowGraphContext.js";
3
+ import { type FlowGraphDataConnection } from "@babylonjs/core/FlowGraph/flowGraphDataConnection.pure.js";
4
+ import { FlowGraphInteger } from "@babylonjs/core/FlowGraph/CustomTypes/flowGraphInteger.pure.js";
5
+ /**
6
+ * Configuration for adapting runtime delay indices to opaque references.
7
+ */
8
+ export interface IFlowGraphDelayReferenceBlockConfiguration extends IFlowGraphBlockConfiguration {
9
+ /** Whether to decode a reference into an index rather than encode an index. */
10
+ decode?: boolean;
11
+ }
12
+ /**
13
+ * Loader-local conversion between FlowGraph delay indices and KHR_interactivity references.
14
+ */
15
+ export declare class FlowGraphDelayReferenceBlock extends FlowGraphBlock {
16
+ config: IFlowGraphDelayReferenceBlockConfiguration;
17
+ /** Delay index or reference to convert. */
18
+ readonly input: FlowGraphDataConnection<unknown>;
19
+ /** Converted reference or delay index; invalid references decode to -1. */
20
+ readonly value: FlowGraphDataConnection<string | FlowGraphInteger>;
21
+ constructor(config: IFlowGraphDelayReferenceBlockConfiguration);
22
+ /** @internal */
23
+ _updateOutputs(context: FlowGraphContext): void;
24
+ /** @returns the serialized class name */
25
+ getClassName(): string;
26
+ }
@@ -0,0 +1,44 @@
1
+ import { FlowGraphBlock } from "@babylonjs/core/FlowGraph/flowGraphBlock.js";
2
+ import { RichTypeAny } from "@babylonjs/core/FlowGraph/flowGraphRichTypes.pure.js";
3
+ import { FlowGraphInteger } from "@babylonjs/core/FlowGraph/CustomTypes/flowGraphInteger.pure.js";
4
+ import { DelayReferencePrefix } from "./interactivityReferences.js";
5
+ /**
6
+ * Loader-local conversion between FlowGraph delay indices and KHR_interactivity references.
7
+ */
8
+ export class FlowGraphDelayReferenceBlock extends FlowGraphBlock {
9
+ constructor(config) {
10
+ super(config);
11
+ this.config = config;
12
+ this.input = this.registerDataInput("input", RichTypeAny);
13
+ this.value = this.registerDataOutput("value", RichTypeAny, config.decode ? new FlowGraphInteger(-1) : "");
14
+ }
15
+ /** @internal */
16
+ _updateOutputs(context) {
17
+ const input = this.input.getValue(context);
18
+ if (this.config.decode) {
19
+ let index = -1;
20
+ if (input instanceof FlowGraphInteger) {
21
+ index = input.value;
22
+ }
23
+ else if (typeof input === "string" && input.startsWith(DelayReferencePrefix)) {
24
+ const tail = input.substring(DelayReferencePrefix.length);
25
+ if (/^(0|[1-9]\d*)$/.test(tail)) {
26
+ const parsed = Number(tail);
27
+ if (Number.isSafeInteger(parsed) && parsed <= 2147483647) {
28
+ index = parsed;
29
+ }
30
+ }
31
+ }
32
+ this.value.setValue(new FlowGraphInteger(index), context);
33
+ }
34
+ else {
35
+ const index = input instanceof FlowGraphInteger ? input.value : -1;
36
+ this.value.setValue(index < 0 ? "" : DelayReferencePrefix + index, context);
37
+ }
38
+ }
39
+ /** @returns the serialized class name */
40
+ getClassName() {
41
+ return "FlowGraphDelayReferenceBlock";
42
+ }
43
+ }
44
+ //# sourceMappingURL=flowGraphDelayReferenceBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flowGraphDelayReferenceBlock.js","sourceRoot":"","sources":["../../../../../../../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,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;oBAC5B,IAAI,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,UAAU,EAAE,CAAC;wBACvD,KAAK,GAAG,MAAM,CAAC;oBACnB,CAAC;gBACL,CAAC;YACL,CAAC;YACD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;QAC9D,CAAC;aAAM,CAAC;YACJ,MAAM,KAAK,GAAG,KAAK,YAAY,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACnE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,oBAAoB,GAAG,KAAK,EAAE,OAAO,CAAC,CAAC;QAChF,CAAC;IACL,CAAC;IAED,yCAAyC;IACzB,YAAY;QACxB,OAAO,8BAA8B,CAAC;IAC1C,CAAC;CACJ","sourcesContent":["import { FlowGraphBlock, type IFlowGraphBlockConfiguration } from \"core/FlowGraph/flowGraphBlock\";\nimport { type FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\nimport { type FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection.pure\";\nimport { RichTypeAny } from \"core/FlowGraph/flowGraphRichTypes.pure\";\nimport { FlowGraphInteger } from \"core/FlowGraph/CustomTypes/flowGraphInteger.pure\";\nimport { DelayReferencePrefix } from \"./interactivityReferences\";\n\n/**\n * Configuration for adapting runtime delay indices to opaque references.\n */\nexport interface IFlowGraphDelayReferenceBlockConfiguration extends IFlowGraphBlockConfiguration {\n /** Whether to decode a reference into an index rather than encode an index. */\n decode?: boolean;\n}\n\n/**\n * Loader-local conversion between FlowGraph delay indices and KHR_interactivity references.\n */\nexport class FlowGraphDelayReferenceBlock extends FlowGraphBlock {\n /** Delay index or reference to convert. */\n public readonly input: FlowGraphDataConnection<unknown>;\n /** Converted reference or delay index; invalid references decode to -1. */\n public readonly value: FlowGraphDataConnection<string | FlowGraphInteger>;\n\n constructor(public override config: IFlowGraphDelayReferenceBlockConfiguration) {\n super(config);\n this.input = this.registerDataInput(\"input\", RichTypeAny);\n this.value = this.registerDataOutput<string | FlowGraphInteger>(\"value\", RichTypeAny, config.decode ? new FlowGraphInteger(-1) : \"\");\n }\n\n /** @internal */\n public override _updateOutputs(context: FlowGraphContext): void {\n const input = this.input.getValue(context);\n if (this.config.decode) {\n let index = -1;\n if (input instanceof FlowGraphInteger) {\n index = input.value;\n } else if (typeof input === \"string\" && input.startsWith(DelayReferencePrefix)) {\n const tail = input.substring(DelayReferencePrefix.length);\n if (/^(0|[1-9]\\d*)$/.test(tail)) {\n const parsed = Number(tail);\n if (Number.isSafeInteger(parsed) && parsed <= 2147483647) {\n index = parsed;\n }\n }\n }\n this.value.setValue(new FlowGraphInteger(index), context);\n } else {\n const index = input instanceof FlowGraphInteger ? input.value : -1;\n this.value.setValue(index < 0 ? \"\" : DelayReferencePrefix + index, context);\n }\n }\n\n /** @returns the serialized class name */\n public override getClassName(): string {\n return \"FlowGraphDelayReferenceBlock\";\n }\n}\n"]}
@@ -2,6 +2,7 @@ export * from "./declarationMapper.js";
2
2
  export * from "./interactivityGraphParser.js";
3
3
  export * from "./flowGraphGLTFDataProvider.js";
4
4
  export * from "./flowGraphEventReferenceBlock.js";
5
+ export * from "./flowGraphDelayReferenceBlock.js";
5
6
  export * from "./flowGraphObjectReferenceBlock.js";
6
7
  export * from "./flowGraphUnsupportedInteractivityBlock.js";
7
8
  export * from "./interactivityGraphModel.js";
@@ -2,6 +2,7 @@ export * from "./declarationMapper.js";
2
2
  export * from "./interactivityGraphParser.js";
3
3
  export * from "./flowGraphGLTFDataProvider.js";
4
4
  export * from "./flowGraphEventReferenceBlock.js";
5
+ export * from "./flowGraphDelayReferenceBlock.js";
5
6
  export * from "./flowGraphObjectReferenceBlock.js";
6
7
  export * from "./flowGraphUnsupportedInteractivityBlock.js";
7
8
  export * from "./interactivityGraphModel.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_interactivity/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AACzD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC","sourcesContent":["export * from \"./declarationMapper\";\nexport * from \"./interactivityGraphParser\";\nexport * from \"./flowGraphGLTFDataProvider\";\nexport * from \"./flowGraphEventReferenceBlock\";\nexport * from \"./flowGraphObjectReferenceBlock\";\nexport * from \"./flowGraphUnsupportedInteractivityBlock\";\nexport * from \"./interactivityGraphModel\";\nexport * from \"./interactivityGraphExporter\";\nexport * from \"./interactivityNodeState\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_interactivity/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AACzD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC","sourcesContent":["export * from \"./declarationMapper\";\nexport * from \"./interactivityGraphParser\";\nexport * from \"./flowGraphGLTFDataProvider\";\nexport * from \"./flowGraphEventReferenceBlock\";\nexport * from \"./flowGraphDelayReferenceBlock\";\nexport * from \"./flowGraphObjectReferenceBlock\";\nexport * from \"./flowGraphUnsupportedInteractivityBlock\";\nexport * from \"./interactivityGraphModel\";\nexport * from \"./interactivityGraphExporter\";\nexport * from \"./interactivityNodeState\";\n"]}
@@ -1,4 +1,5 @@
1
1
  import { FlowGraphExecutionBlock } from "@babylonjs/core/FlowGraph/flowGraphExecutionBlock.js";
2
+ import { defaultValueParseFunction } from "@babylonjs/core/FlowGraph/serialization.js";
2
3
  import { Matrix } from "@babylonjs/core/Maths/math.vector.pure.js";
3
4
  import { GetInteractivityOperationRegistry, getMappingForDeclaration, HasDefaultInteractivityFlowInput, NormalizeInteractivityEventDataConfiguration, ParseDebugLogTemplate, } from "./declarationMapper.js";
4
5
  import { _CreateKHRInteractivityRuntimeValueSnapshot, _NormalizeKHRInteractivityRuntimeValue, CloneKHRInteractivityGraph, CreateKHRInteractivityGraphModel, gltfTypeToBabylonType, } from "./interactivityGraphModel.js";
@@ -906,7 +907,12 @@ export class KHRInteractivityExportPlan {
906
907
  block.executionSignals?.length ??
907
908
  block.config?.[key])
908
909
  : block.config?.[key];
909
- const runtimeExpected = _GetOwn(blockProvenance?.generatedConfigurationRuntime, key) ?? (key === "eventData" ? _CreateEventSchemaRuntimeSnapshot(expected) : undefined);
910
+ const runtimeExpected = _GetOwn(blockProvenance?.generatedConfigurationRuntime, key) ??
911
+ (key === "eventData"
912
+ ? _CreateEventSchemaRuntimeSnapshot(expected)
913
+ : key === "invalidValue"
914
+ ? _CreateKHRInteractivityRuntimeValueSnapshot(defaultValueParseFunction(key, { [key]: expected }, this._flowGraphs[graphIndex].scene, this._flowGraphs[graphIndex].scene))
915
+ : undefined);
910
916
  const currentRuntime = runtimeExpected
911
917
  ? key === "eventData"
912
918
  ? _CreateEventSchemaRuntimeSnapshot(current)