@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
@@ -30,7 +30,7 @@ export class EXT_texture_avif {
30
30
  const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);
31
31
  return await this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {
32
32
  assign(babylonTexture);
33
- }, undefined, !texture._textureInfo.nonColorData);
33
+ }, undefined, !texture._textureInfo.nonColorData, texture);
34
34
  });
35
35
  }
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EXT_texture_avif.pure.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/EXT_texture_avif.pure.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAK3D,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEhG,MAAM,IAAI,GAAG,kBAAkB,CAAC;AAEhC;;;GAGG;AACH,gEAAgE;AAChE,MAAM,OAAO,gBAAgB;IASzB;;OAEG;IACH,YAAY,MAAkB;QAX9B,kCAAkC;QAClB,SAAI,GAAG,IAAI,CAAC;QAWxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,gBAAgB;IACT,OAAO;QACT,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,gDAAgD;IACzC,iBAAiB,CAAC,OAAe,EAAE,OAAiB,EAAE,MAA6C;QACtG,OAAO,UAAU,CAAC,kBAAkB,CAA+B,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE;YAClI,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YAC5J,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,gBAAgB,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YACtG,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,mBAAmB,CACzC,OAAO,EACP,OAAO,EACP,KAAK,EACL,CAAC,cAAc,EAAE,EAAE;gBACf,MAAM,CAAC,cAAc,CAAC,CAAC;YAC3B,CAAC,EACD,SAAS,EACT,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CACrC,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAED,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,gEAAgE;AAChE,MAAM,UAAU,wBAAwB;IACpC,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAE9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;AAChF,CAAC","sourcesContent":["import { type IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader.pure\";\r\nimport { type ITexture } from \"../glTFLoaderInterfaces\";\r\nimport { type BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport { type Nullable } from \"core/types\";\r\nimport { type IEXTTextureAVIF } from \"babylonjs-gltf2interface\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\n\r\nconst NAME = \"EXT_texture_avif\";\r\n\r\n/**\r\n * [glTF PR](https://github.com/KhronosGroup/glTF/pull/2235)\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_avif/README.md)\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class EXT_texture_avif implements IGLTFLoaderExtension {\r\n /** The name of this extension. */\r\n public readonly name = NAME;\r\n\r\n /** Defines whether this extension is enabled. */\r\n public enabled: boolean;\r\n\r\n private _loader: GLTFLoader;\r\n\r\n /**\r\n * @internal\r\n */\r\n constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n this.enabled = loader.isExtensionUsed(NAME);\r\n }\r\n\r\n /** @internal */\r\n public dispose() {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public _loadTextureAsync(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>> {\r\n return GLTFLoader.LoadExtensionAsync<IEXTTextureAVIF, BaseTexture>(context, texture, this.name, async (extensionContext, extension) => {\r\n const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);\r\n const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);\r\n return await this._loader._createTextureAsync(\r\n context,\r\n sampler,\r\n image,\r\n (babylonTexture) => {\r\n assign(babylonTexture);\r\n },\r\n undefined,\r\n !texture._textureInfo.nonColorData\r\n );\r\n });\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Registers the EXT_texture_avif glTF loader extension.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function RegisterEXT_texture_avif(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n unregisterGLTFExtension(NAME);\r\n\r\n registerGLTFExtension(NAME, true, (loader) => new EXT_texture_avif(loader));\r\n}\r\n"]}
1
+ {"version":3,"file":"EXT_texture_avif.pure.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/EXT_texture_avif.pure.ts"],"names":[],"mappings":"AACA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C,cAAc,CAAC,CAAC;YAC3B,CAAC,EACD,SAAS,EACT,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,EAClC,OAAO,CACV,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAED,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,gEAAgE;AAChE,MAAM,UAAU,wBAAwB;IACpC,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAE9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;AAChF,CAAC","sourcesContent":["import { type IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader.pure\";\r\nimport { type ITexture } from \"../glTFLoaderInterfaces\";\r\nimport { type BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport { type Nullable } from \"core/types\";\r\nimport { type IEXTTextureAVIF } from \"babylonjs-gltf2interface\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\n\r\nconst NAME = \"EXT_texture_avif\";\r\n\r\n/**\r\n * [glTF PR](https://github.com/KhronosGroup/glTF/pull/2235)\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_avif/README.md)\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class EXT_texture_avif implements IGLTFLoaderExtension {\r\n /** The name of this extension. */\r\n public readonly name = NAME;\r\n\r\n /** Defines whether this extension is enabled. */\r\n public enabled: boolean;\r\n\r\n private _loader: GLTFLoader;\r\n\r\n /**\r\n * @internal\r\n */\r\n constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n this.enabled = loader.isExtensionUsed(NAME);\r\n }\r\n\r\n /** @internal */\r\n public dispose() {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public _loadTextureAsync(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>> {\r\n return GLTFLoader.LoadExtensionAsync<IEXTTextureAVIF, BaseTexture>(context, texture, this.name, async (extensionContext, extension) => {\r\n const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);\r\n const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);\r\n return await this._loader._createTextureAsync(\r\n context,\r\n sampler,\r\n image,\r\n (babylonTexture) => {\r\n assign(babylonTexture);\r\n },\r\n undefined,\r\n !texture._textureInfo.nonColorData,\r\n texture\r\n );\r\n });\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Registers the EXT_texture_avif glTF loader extension.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function RegisterEXT_texture_avif(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n unregisterGLTFExtension(NAME);\r\n\r\n registerGLTFExtension(NAME, true, (loader) => new EXT_texture_avif(loader));\r\n}\r\n"]}
@@ -29,7 +29,7 @@ export class EXT_texture_webp {
29
29
  const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);
30
30
  return await this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {
31
31
  assign(babylonTexture);
32
- }, undefined, !texture._textureInfo.nonColorData);
32
+ }, undefined, !texture._textureInfo.nonColorData, texture);
33
33
  });
34
34
  }
35
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EXT_texture_webp.pure.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/EXT_texture_webp.pure.ts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E;gBACf,MAAM,CAAC,cAAc,CAAC,CAAC;YAC3B,CAAC,EACD,SAAS,EACT,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CACrC,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAED,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,gEAAgE;AAChE,MAAM,UAAU,wBAAwB;IACpC,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAE9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;AAChF,CAAC","sourcesContent":["import { type IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader.pure\";\r\nimport { type ITexture } from \"../glTFLoaderInterfaces\";\r\nimport { type BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport { type Nullable } from \"core/types\";\r\nimport { type IEXTTextureWebP } from \"babylonjs-gltf2interface\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\n\r\nconst NAME = \"EXT_texture_webp\";\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_webp/README.md)\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class EXT_texture_webp implements IGLTFLoaderExtension {\r\n /** The name of this extension. */\r\n public readonly name = NAME;\r\n\r\n /** Defines whether this extension is enabled. */\r\n public enabled: boolean;\r\n\r\n private _loader: GLTFLoader;\r\n\r\n /**\r\n * @internal\r\n */\r\n constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n this.enabled = loader.isExtensionUsed(NAME);\r\n }\r\n\r\n /** @internal */\r\n public dispose() {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public _loadTextureAsync(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>> {\r\n return GLTFLoader.LoadExtensionAsync<IEXTTextureWebP, BaseTexture>(context, texture, this.name, async (extensionContext, extension) => {\r\n const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);\r\n const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);\r\n return await this._loader._createTextureAsync(\r\n context,\r\n sampler,\r\n image,\r\n (babylonTexture) => {\r\n assign(babylonTexture);\r\n },\r\n undefined,\r\n !texture._textureInfo.nonColorData\r\n );\r\n });\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Registers the EXT_texture_webp glTF loader extension.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function RegisterEXT_texture_webp(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n unregisterGLTFExtension(NAME);\r\n\r\n registerGLTFExtension(NAME, true, (loader) => new EXT_texture_webp(loader));\r\n}\r\n"]}
1
+ {"version":3,"file":"EXT_texture_webp.pure.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/EXT_texture_webp.pure.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAK3D,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEhG,MAAM,IAAI,GAAG,kBAAkB,CAAC;AAEhC;;GAEG;AACH,gEAAgE;AAChE,MAAM,OAAO,gBAAgB;IASzB;;OAEG;IACH,YAAY,MAAkB;QAX9B,kCAAkC;QAClB,SAAI,GAAG,IAAI,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,WAAW,GAAG,IAAI,CAAC;IAEnB,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAE9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;AAChF,CAAC","sourcesContent":["import { type IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader.pure\";\r\nimport { type ITexture } from \"../glTFLoaderInterfaces\";\r\nimport { type BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport { type Nullable } from \"core/types\";\r\nimport { type IEXTTextureWebP } from \"babylonjs-gltf2interface\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\n\r\nconst NAME = \"EXT_texture_webp\";\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_webp/README.md)\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class EXT_texture_webp implements IGLTFLoaderExtension {\r\n /** The name of this extension. */\r\n public readonly name = NAME;\r\n\r\n /** Defines whether this extension is enabled. */\r\n public enabled: boolean;\r\n\r\n private _loader: GLTFLoader;\r\n\r\n /**\r\n * @internal\r\n */\r\n constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n this.enabled = loader.isExtensionUsed(NAME);\r\n }\r\n\r\n /** @internal */\r\n public dispose() {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public _loadTextureAsync(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>> {\r\n return GLTFLoader.LoadExtensionAsync<IEXTTextureWebP, BaseTexture>(context, texture, this.name, async (extensionContext, extension) => {\r\n const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);\r\n const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);\r\n return await this._loader._createTextureAsync(\r\n context,\r\n sampler,\r\n image,\r\n (babylonTexture) => {\r\n assign(babylonTexture);\r\n },\r\n undefined,\r\n !texture._textureInfo.nonColorData,\r\n texture\r\n );\r\n });\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Registers the EXT_texture_webp glTF loader extension.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function RegisterEXT_texture_webp(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n unregisterGLTFExtension(NAME);\r\n\r\n registerGLTFExtension(NAME, true, (loader) => new EXT_texture_webp(loader));\r\n}\r\n"]}
@@ -3,11 +3,21 @@ import { FlowGraphBlockNames } from "@babylonjs/core/FlowGraph/Blocks/flowGraphB
3
3
  import { type ISerializedFlowGraphBlock, type ISerializedFlowGraphContext } from "@babylonjs/core/FlowGraph/typeDefinitions.js";
4
4
  import { type InteractivityGraphToFlowGraphParser } from "./interactivityGraphParser.js";
5
5
  import { type IGLTF } from "../../glTFLoaderInterfaces.js";
6
- interface IGLTFToFlowGraphMappingObject {
6
+ /**
7
+ * Describes how one KHR_interactivity configuration or socket property maps to FlowGraph.
8
+ *
9
+ * The same contract is used for fixed sockets, wildcard sockets, configuration validation,
10
+ * defaulting, and multi-block routing during strict graph lowering.
11
+ */
12
+ export interface IGLTFToFlowGraphMappingObject {
7
13
  /**
8
14
  * The name of the property in the FlowGraph block.
9
15
  */
10
16
  name: string;
17
+ /**
18
+ * Whether this socket mapping exists only for pre-ratification compatibility input.
19
+ */
20
+ compatibilityOnly?: boolean;
11
21
  /**
12
22
  * The type of the property in the glTF specs.
13
23
  * If not provided will be inferred.
@@ -40,7 +50,7 @@ interface IGLTFToFlowGraphMappingObject {
40
50
  * This is used if we generate more than one block for a single glTF node.
41
51
  * Defaults to the first block in the mapping.
42
52
  */
43
- toBlock?: FlowGraphBlockNames;
53
+ toBlock?: FlowGraphBlockNames | string;
44
54
  /**
45
55
  * Used in configuration values. If defined, this will be the default value, if no value is provided.
46
56
  */
@@ -54,6 +64,77 @@ interface IGLTFToFlowGraphMappingObject {
54
64
  * be fed by a `pointer/get` (e.g. the read-only `maxTime` animation pointer).
55
65
  */
56
66
  convertConnectedTimeToFrames?: boolean;
67
+ /**
68
+ * KHR configuration value type used by canonical validation.
69
+ */
70
+ configurationType?: "bool" | "int" | "int[]" | "string";
71
+ /**
72
+ * Whether this configuration entry exists only for canonical validation.
73
+ */
74
+ validationOnly?: boolean;
75
+ /**
76
+ * Whether an operation without a complete default configuration requires this property.
77
+ */
78
+ required?: boolean;
79
+ /**
80
+ * Graph array referenced by an integer configuration value.
81
+ */
82
+ indexSource?: "types" | "variables" | "events" | "nodes" | "assetNodes";
83
+ /**
84
+ * Minimum number of values required for an array configuration.
85
+ */
86
+ minItems?: number;
87
+ /**
88
+ * Whether the configured indices generate required input value sockets.
89
+ */
90
+ generatesInputValueSockets?: boolean;
91
+ /**
92
+ * Whether integer case values generate required input value sockets.
93
+ */
94
+ generatesCaseInputValueSockets?: boolean;
95
+ /**
96
+ * Whether this string configuration generates JSON Pointer Template sockets.
97
+ */
98
+ pointerTemplate?: boolean;
99
+ /**
100
+ * Whether an invalid value falls back to the operation's default configuration.
101
+ */
102
+ invalidUsesDefault?: boolean;
103
+ /**
104
+ * Allowed KHR type signatures for a type-index configuration.
105
+ */
106
+ allowedSignatures?: readonly ("bool" | "float" | "float2" | "float3" | "float4" | "float2x2" | "float3x3" | "float4x4" | "int" | "ref" | "custom")[];
107
+ /** Allowed literal values for this configuration property. */
108
+ allowedValues?: readonly (boolean | number | string)[];
109
+ /**
110
+ * Input socket whose effective type determines this output socket type.
111
+ */
112
+ typeSourceInput?: string;
113
+ /** Inclusive minimum for an integer configuration value. */
114
+ minimum?: number;
115
+ /** Inclusive maximum for an integer configuration value. */
116
+ maximum?: number;
117
+ /**
118
+ * Whether this configuration value generates numbered input flow sockets.
119
+ */
120
+ generatesInputFlowSockets?: boolean;
121
+ /**
122
+ * Whether this configuration array generates output flow sockets.
123
+ */
124
+ generatesOutputFlowSockets?: boolean;
125
+ /**
126
+ * Properties in the same group fall back to their defaults together when any member is
127
+ * missing or invalid.
128
+ */
129
+ configurationGroup?: string;
130
+ /**
131
+ * Whether duplicate array values are removed from the effective configuration.
132
+ */
133
+ uniqueValues?: boolean;
134
+ /**
135
+ * Whether a string configuration value is a `debug/log` message template.
136
+ */
137
+ debugLogTemplate?: boolean;
57
138
  }
58
139
  /**
59
140
  * Description of how a KHR_interactivity declaration (op such as
@@ -68,6 +149,13 @@ export interface IGLTFToFlowGraphMapping {
68
149
  * When adding blocks defined in this module use the KHR_interactivity prefix.
69
150
  */
70
151
  blocks: (FlowGraphBlockNames | string)[];
152
+ /**
153
+ * Exact value socket contract for an operation supplied by another extension.
154
+ */
155
+ declarationSchema?: {
156
+ inputValueSockets: Record<string, "bool" | "float" | "float2" | "float3" | "float4" | "float2x2" | "float3x3" | "float4x4" | "int" | "ref" | "custom">;
157
+ outputValueSockets: Record<string, "bool" | "float" | "float2" | "float3" | "float4" | "float2x2" | "float3x3" | "float4x4" | "int" | "ref" | "custom">;
158
+ };
71
159
  /**
72
160
  * The inputs of the glTF node mapped to the FlowGraph block.
73
161
  */
@@ -175,7 +263,26 @@ export interface IGLTFToFlowGraphMapping {
175
263
  extraProcessor?: (gltfBlock: IKHRInteractivity_Node, declaration: IKHRInteractivity_Declaration, mapping: IGLTFToFlowGraphMapping, parser: InteractivityGraphToFlowGraphParser, serializedObjects: ISerializedFlowGraphBlock[], context: ISerializedFlowGraphContext, globalGLTF?: IGLTF) => ISerializedFlowGraphBlock[];
176
264
  }
177
265
  export declare function getMappingForFullOperationName(fullOperationName: string): IGLTFToFlowGraphMapping | undefined;
266
+ /**
267
+ * Returns whether a KHR operation accepts the conventional `in` flow socket when the registry
268
+ * does not need a renamed or dynamic input mapping.
269
+ * @param operation full KHR operation name
270
+ * @returns true when the operation accepts the conventional input flow
271
+ */
272
+ export declare function HasDefaultInteractivityFlowInput(operation: string): boolean;
273
+ /**
274
+ * Normalizes serialized or runtime FlowGraph custom-event configuration for inverse comparison.
275
+ * @param value serialized event-data entries or the runtime event-data dictionary
276
+ * @returns stable event-data entries sorted by socket id
277
+ */
278
+ export declare function NormalizeInteractivityEventDataConfiguration(value: unknown): unknown;
178
279
  export declare function getMappingForDeclaration(declaration: IKHRInteractivity_Declaration, returnNoOpIfNotAvailable?: boolean): IGLTFToFlowGraphMapping | undefined;
280
+ /**
281
+ * Creates the typed no-op mapping required for an unsupported extension declaration.
282
+ * @param declaration unsupported extension declaration
283
+ * @returns a mapping that preserves the declared value sockets
284
+ */
285
+ export declare function getNoOpMappingForDeclaration(declaration: IKHRInteractivity_Declaration): IGLTFToFlowGraphMapping;
179
286
  /**
180
287
  * This function will add new mapping to glTF interactivity.
181
288
  * Other extensions can define new types of blocks, this is the way to let interactivity know how to parse them.
@@ -184,8 +291,41 @@ export declare function getMappingForDeclaration(declaration: IKHRInteractivity_
184
291
  * @param mapping The mapping object. See documentation or examples below.
185
292
  */
186
293
  export declare function addNewInteractivityFlowGraphMapping(key: string, extension: string, mapping: IGLTFToFlowGraphMapping): void;
294
+ /**
295
+ * One operation entry in the shared KHR_interactivity-to-FlowGraph registry.
296
+ */
297
+ export interface IKHRInteractivityOperationRegistryEntry {
298
+ /** Ratified operation identifier. */
299
+ op: string;
300
+ /** Extension defining the operation, when it is not a KHR_interactivity core operation. */
301
+ extension?: string;
302
+ /** Bidirectional structural mapping used by import and export. */
303
+ mapping: IGLTFToFlowGraphMapping;
304
+ }
305
+ /**
306
+ * Gets a deterministic snapshot of the registered KHR_interactivity operation mappings.
307
+ * Export analysis uses this same registry as import lowering so the two directions cannot
308
+ * independently drift.
309
+ * @returns registered mappings sorted by extension and operation
310
+ */
311
+ export declare function GetInteractivityOperationRegistry(): readonly IKHRInteractivityOperationRegistryEntry[];
312
+ /**
313
+ * Result of parsing a ratified `debug/log` message template.
314
+ */
315
+ export interface IDebugLogTemplateParseResult {
316
+ /** Whether all literal braces are doubled and every parameter is well formed. */
317
+ valid: boolean;
318
+ /** Unique parameter socket ids in first-occurrence order. */
319
+ sockets: string[];
320
+ }
321
+ /**
322
+ * Parses a ratified `debug/log` message template.
323
+ * Literal braces must be doubled; non-empty text inside a single brace pair defines a socket id.
324
+ * @param message message template to parse
325
+ * @returns template validity and its exact dynamic socket ids
326
+ */
327
+ export declare function ParseDebugLogTemplate(message: string): IDebugLogTemplateParseResult;
187
328
  export declare function getAllSupportedNativeNodeTypes(): string[];
188
- export {};
189
329
  /**
190
330
  *
191
331
  * These are the nodes from the specs: