@babylonjs/loaders 5.0.0-rc.1 → 5.0.0-rc.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. package/OBJ/index.d.ts +4 -4
  2. package/OBJ/index.js +4 -4
  3. package/OBJ/index.js.map +1 -1
  4. package/OBJ/mtlFileLoader.d.ts +41 -40
  5. package/OBJ/mtlFileLoader.js +232 -231
  6. package/OBJ/mtlFileLoader.js.map +1 -1
  7. package/OBJ/objFileLoader.d.ts +126 -133
  8. package/OBJ/objFileLoader.js +296 -300
  9. package/OBJ/objFileLoader.js.map +1 -1
  10. package/OBJ/objLoadingOptions.d.ts +43 -43
  11. package/OBJ/objLoadingOptions.js +1 -1
  12. package/OBJ/objLoadingOptions.js.map +1 -1
  13. package/OBJ/solidParser.d.ts +154 -153
  14. package/OBJ/solidParser.js +693 -699
  15. package/OBJ/solidParser.js.map +1 -1
  16. package/STL/index.d.ts +1 -1
  17. package/STL/index.js +1 -1
  18. package/STL/index.js.map +1 -1
  19. package/STL/stlFileLoader.d.ts +64 -71
  20. package/STL/stlFileLoader.js +233 -239
  21. package/STL/stlFileLoader.js.map +1 -1
  22. package/glTF/1.0/glTFBinaryExtension.d.ts +13 -13
  23. package/glTF/1.0/glTFBinaryExtension.js +60 -61
  24. package/glTF/1.0/glTFBinaryExtension.js.map +1 -1
  25. package/glTF/1.0/glTFLoader.d.ts +136 -106
  26. package/glTF/1.0/glTFLoader.js +1814 -1696
  27. package/glTF/1.0/glTFLoader.js.map +1 -1
  28. package/glTF/1.0/glTFLoaderInterfaces.d.ts +412 -412
  29. package/glTF/1.0/glTFLoaderInterfaces.js +95 -95
  30. package/glTF/1.0/glTFLoaderInterfaces.js.map +1 -1
  31. package/glTF/1.0/glTFLoaderUtils.d.ts +63 -62
  32. package/glTF/1.0/glTFLoaderUtils.js +250 -232
  33. package/glTF/1.0/glTFLoaderUtils.js.map +1 -1
  34. package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +10 -10
  35. package/glTF/1.0/glTFMaterialsCommonExtension.js +129 -127
  36. package/glTF/1.0/glTFMaterialsCommonExtension.js.map +1 -1
  37. package/glTF/1.0/index.d.ts +5 -5
  38. package/glTF/1.0/index.js +5 -5
  39. package/glTF/1.0/index.js.map +1 -1
  40. package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +43 -36
  41. package/glTF/2.0/Extensions/EXT_lights_image_based.js +117 -110
  42. package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -1
  43. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +36 -28
  44. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +88 -80
  45. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -1
  46. package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +34 -27
  47. package/glTF/2.0/Extensions/EXT_meshopt_compression.js +49 -42
  48. package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -1
  49. package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +29 -21
  50. package/glTF/2.0/Extensions/EXT_texture_webp.js +40 -32
  51. package/glTF/2.0/Extensions/EXT_texture_webp.js.map +1 -1
  52. package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +50 -32
  53. package/glTF/2.0/Extensions/ExtrasAsMetadata.js +73 -55
  54. package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -1
  55. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +39 -31
  56. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +112 -101
  57. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -1
  58. package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +36 -28
  59. package/glTF/2.0/Extensions/KHR_lights_punctual.js +89 -81
  60. package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -1
  61. package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +39 -31
  62. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +94 -86
  63. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
  64. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +38 -30
  65. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +53 -45
  66. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
  67. package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +42 -34
  68. package/glTF/2.0/Extensions/KHR_materials_ior.js +62 -54
  69. package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
  70. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +38 -30
  71. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +80 -72
  72. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -1
  73. package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +39 -31
  74. package/glTF/2.0/Extensions/KHR_materials_sheen.js +84 -76
  75. package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
  76. package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +38 -30
  77. package/glTF/2.0/Extensions/KHR_materials_specular.js +74 -66
  78. package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
  79. package/glTF/2.0/Extensions/KHR_materials_translucency.d.ts +39 -31
  80. package/glTF/2.0/Extensions/KHR_materials_translucency.js +83 -76
  81. package/glTF/2.0/Extensions/KHR_materials_translucency.js.map +1 -1
  82. package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +38 -30
  83. package/glTF/2.0/Extensions/KHR_materials_transmission.js +288 -277
  84. package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
  85. package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +38 -30
  86. package/glTF/2.0/Extensions/KHR_materials_unlit.js +73 -65
  87. package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
  88. package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +87 -76
  89. package/glTF/2.0/Extensions/KHR_materials_variants.js +254 -243
  90. package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -1
  91. package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +39 -31
  92. package/glTF/2.0/Extensions/KHR_materials_volume.js +85 -78
  93. package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
  94. package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +22 -19
  95. package/glTF/2.0/Extensions/KHR_mesh_quantization.js +23 -21
  96. package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +1 -1
  97. package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +29 -21
  98. package/glTF/2.0/Extensions/KHR_texture_basisu.js +40 -32
  99. package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +1 -1
  100. package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +33 -25
  101. package/glTF/2.0/Extensions/KHR_texture_transform.js +61 -53
  102. package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -1
  103. package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +32 -29
  104. package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +49 -46
  105. package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +1 -1
  106. package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +54 -38
  107. package/glTF/2.0/Extensions/MSFT_audio_emitter.js +240 -216
  108. package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -1
  109. package/glTF/2.0/Extensions/MSFT_lod.d.ts +109 -75
  110. package/glTF/2.0/Extensions/MSFT_lod.js +369 -333
  111. package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -1
  112. package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +14 -14
  113. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +36 -36
  114. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
  115. package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +14 -14
  116. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +36 -36
  117. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
  118. package/glTF/2.0/Extensions/index.d.ts +26 -26
  119. package/glTF/2.0/Extensions/index.js +26 -26
  120. package/glTF/2.0/Extensions/index.js.map +1 -1
  121. package/glTF/2.0/glTFLoader.d.ts +406 -357
  122. package/glTF/2.0/glTFLoader.js +2366 -2266
  123. package/glTF/2.0/glTFLoader.js.map +1 -1
  124. package/glTF/2.0/glTFLoaderExtension.d.ts +152 -152
  125. package/glTF/2.0/glTFLoaderExtension.js +1 -1
  126. package/glTF/2.0/glTFLoaderExtension.js.map +1 -1
  127. package/glTF/2.0/glTFLoaderInterfaces.d.ts +211 -209
  128. package/glTF/2.0/glTFLoaderInterfaces.js +1 -1
  129. package/glTF/2.0/glTFLoaderInterfaces.js.map +1 -1
  130. package/glTF/2.0/index.d.ts +4 -4
  131. package/glTF/2.0/index.js +5 -4
  132. package/glTF/2.0/index.js.map +1 -1
  133. package/glTF/glTFFileLoader.d.ts +433 -373
  134. package/glTF/glTFFileLoader.js +927 -870
  135. package/glTF/glTFFileLoader.js.map +1 -1
  136. package/glTF/glTFValidation.d.ts +29 -29
  137. package/glTF/glTFValidation.js +123 -121
  138. package/glTF/glTFValidation.js.map +1 -1
  139. package/glTF/index.d.ts +5 -5
  140. package/glTF/index.js +6 -5
  141. package/glTF/index.js.map +1 -1
  142. package/index.d.ts +3 -3
  143. package/index.js +4 -3
  144. package/index.js.map +1 -1
  145. package/legacy/legacy-glTF.d.ts +2 -2
  146. package/legacy/legacy-glTF.js +18 -18
  147. package/legacy/legacy-glTF.js.map +1 -1
  148. package/legacy/legacy-glTF1.d.ts +2 -2
  149. package/legacy/legacy-glTF1.js +15 -14
  150. package/legacy/legacy-glTF1.js.map +1 -1
  151. package/legacy/legacy-glTF1FileLoader.d.ts +2 -2
  152. package/legacy/legacy-glTF1FileLoader.js +3 -2
  153. package/legacy/legacy-glTF1FileLoader.js.map +1 -1
  154. package/legacy/legacy-glTF2.d.ts +2 -2
  155. package/legacy/legacy-glTF2.js +33 -32
  156. package/legacy/legacy-glTF2.js.map +1 -1
  157. package/legacy/legacy-glTF2FileLoader.d.ts +2 -2
  158. package/legacy/legacy-glTF2FileLoader.js +3 -2
  159. package/legacy/legacy-glTF2FileLoader.js.map +1 -1
  160. package/legacy/legacy-glTFFileLoader.d.ts +3 -3
  161. package/legacy/legacy-glTFFileLoader.js +4 -3
  162. package/legacy/legacy-glTFFileLoader.js.map +1 -1
  163. package/legacy/legacy-objFileLoader.d.ts +1 -1
  164. package/legacy/legacy-objFileLoader.js +13 -12
  165. package/legacy/legacy-objFileLoader.js.map +1 -1
  166. package/legacy/legacy-stlFileLoader.d.ts +1 -1
  167. package/legacy/legacy-stlFileLoader.js +13 -12
  168. package/legacy/legacy-stlFileLoader.js.map +1 -1
  169. package/legacy/legacy.d.ts +6 -6
  170. package/legacy/legacy.js +8 -6
  171. package/legacy/legacy.js.map +1 -1
  172. package/license.md +71 -0
  173. package/package.json +37 -193
  174. package/readme.md +2 -2
@@ -1,27 +1,34 @@
1
- import { Nullable } from "@babylonjs/core/types";
2
- import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
3
- import { GLTFLoader } from "../glTFLoader";
4
- import { IBufferView } from "../glTFLoaderInterfaces";
5
- /**
6
- * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression)
7
- *
8
- * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js
9
- * @since 5.0.0
10
- */
11
- export declare class EXT_meshopt_compression implements IGLTFLoaderExtension {
12
- /**
13
- * The name of this extension.
14
- */
15
- readonly name = "EXT_meshopt_compression";
16
- /**
17
- * Defines whether this extension is enabled.
18
- */
19
- enabled: boolean;
20
- private _loader;
21
- /** @hidden */
22
- constructor(loader: GLTFLoader);
23
- /** @hidden */
24
- dispose(): void;
25
- /** @hidden */
26
- loadBufferViewAsync(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>>;
27
- }
1
+ import type { Nullable } from "@babylonjs/core/types.js";
2
+ import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
3
+ import { GLTFLoader } from "../glTFLoader";
4
+ import type { IBufferView } from "../glTFLoaderInterfaces";
5
+ /**
6
+ * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression)
7
+ *
8
+ * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js
9
+ * @since 5.0.0
10
+ */
11
+ export declare class EXT_meshopt_compression implements IGLTFLoaderExtension {
12
+ /**
13
+ * The name of this extension.
14
+ */
15
+ readonly name = "EXT_meshopt_compression";
16
+ /**
17
+ * Defines whether this extension is enabled.
18
+ */
19
+ enabled: boolean;
20
+ private _loader;
21
+ /**
22
+ * @param loader
23
+ * @hidden
24
+ */
25
+ constructor(loader: GLTFLoader);
26
+ /** @hidden */
27
+ dispose(): void;
28
+ /**
29
+ * @param context
30
+ * @param bufferView
31
+ * @hidden
32
+ */
33
+ loadBufferViewAsync(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>>;
34
+ }
@@ -1,43 +1,50 @@
1
- import { ArrayItem, GLTFLoader } from "../glTFLoader.js";
2
- import { MeshoptCompression } from "@babylonjs/core/Meshes/Compression/meshoptCompression.js";
3
- var NAME = "EXT_meshopt_compression";
4
- /**
5
- * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression)
6
- *
7
- * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js
8
- * @since 5.0.0
9
- */
10
- var EXT_meshopt_compression = /** @class */ (function () {
11
- /** @hidden */
12
- function EXT_meshopt_compression(loader) {
13
- /**
14
- * The name of this extension.
15
- */
16
- this.name = NAME;
17
- this.enabled = loader.isExtensionUsed(NAME);
18
- this._loader = loader;
19
- }
20
- /** @hidden */
21
- EXT_meshopt_compression.prototype.dispose = function () {
22
- this._loader = null;
23
- };
24
- /** @hidden */
25
- EXT_meshopt_compression.prototype.loadBufferViewAsync = function (context, bufferView) {
26
- var _this = this;
27
- return GLTFLoader.LoadExtensionAsync(context, bufferView, this.name, function (extensionContext, extension) {
28
- var bufferViewMeshopt = bufferView;
29
- if (bufferViewMeshopt._meshOptData) {
30
- return bufferViewMeshopt._meshOptData;
31
- }
32
- var buffer = ArrayItem.Get("".concat(context, "/buffer"), _this._loader.gltf.buffers, extension.buffer);
33
- bufferViewMeshopt._meshOptData = _this._loader.loadBufferAsync("/buffers/".concat(buffer.index), buffer, (extension.byteOffset || 0), extension.byteLength).then(function (buffer) {
34
- return MeshoptCompression.Default.decodeGltfBufferAsync(buffer, extension.count, extension.byteStride, extension.mode, extension.filter);
35
- });
36
- return bufferViewMeshopt._meshOptData;
37
- });
38
- };
39
- return EXT_meshopt_compression;
40
- }());
41
- export { EXT_meshopt_compression };
42
- GLTFLoader.RegisterExtension(NAME, function (loader) { return new EXT_meshopt_compression(loader); });
1
+ import { ArrayItem, GLTFLoader } from "../glTFLoader";
2
+ import { MeshoptCompression } from "@babylonjs/core/Meshes/Compression/meshoptCompression.js";
3
+ var NAME = "EXT_meshopt_compression";
4
+ /**
5
+ * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression)
6
+ *
7
+ * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js
8
+ * @since 5.0.0
9
+ */
10
+ var EXT_meshopt_compression = /** @class */ (function () {
11
+ /**
12
+ * @param loader
13
+ * @hidden
14
+ */
15
+ function EXT_meshopt_compression(loader) {
16
+ /**
17
+ * The name of this extension.
18
+ */
19
+ this.name = NAME;
20
+ this.enabled = loader.isExtensionUsed(NAME);
21
+ this._loader = loader;
22
+ }
23
+ /** @hidden */
24
+ EXT_meshopt_compression.prototype.dispose = function () {
25
+ this._loader = null;
26
+ };
27
+ /**
28
+ * @param context
29
+ * @param bufferView
30
+ * @hidden
31
+ */
32
+ EXT_meshopt_compression.prototype.loadBufferViewAsync = function (context, bufferView) {
33
+ var _this = this;
34
+ return GLTFLoader.LoadExtensionAsync(context, bufferView, this.name, function (extensionContext, extension) {
35
+ var bufferViewMeshopt = bufferView;
36
+ if (bufferViewMeshopt._meshOptData) {
37
+ return bufferViewMeshopt._meshOptData;
38
+ }
39
+ var buffer = ArrayItem.Get("".concat(context, "/buffer"), _this._loader.gltf.buffers, extension.buffer);
40
+ bufferViewMeshopt._meshOptData = _this._loader.loadBufferAsync("/buffers/".concat(buffer.index), buffer, extension.byteOffset || 0, extension.byteLength).then(function (buffer) {
41
+ return MeshoptCompression.Default.decodeGltfBufferAsync(buffer, extension.count, extension.byteStride, extension.mode, extension.filter);
42
+ });
43
+ return bufferViewMeshopt._meshOptData;
44
+ });
45
+ };
46
+ return EXT_meshopt_compression;
47
+ }());
48
+ export { EXT_meshopt_compression };
49
+ GLTFLoader.RegisterExtension(NAME, function (loader) { return new EXT_meshopt_compression(loader); });
43
50
  //# sourceMappingURL=EXT_meshopt_compression.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EXT_meshopt_compression.js","sourceRoot":"","sources":["../../../../../sourceES6/loaders/src/glTF/2.0/Extensions/EXT_meshopt_compression.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAE3F,IAAM,IAAI,GAAG,yBAAyB,CAAC;AAMvC;;;;;GAKG;AACH;IAaI,cAAc;IACd,iCAAY,MAAkB;QAb9B;;WAEG;QACa,SAAI,GAAG,IAAI,CAAC;QAWxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED,cAAc;IACP,yCAAO,GAAd;QACK,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED,cAAc;IACP,qDAAmB,GAA1B,UAA2B,OAAe,EAAE,UAAuB;QAAnE,iBAcC;QAbG,OAAO,UAAU,CAAC,kBAAkB,CAA0C,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE,UAAC,gBAAgB,EAAE,SAAS;YACtI,IAAM,iBAAiB,GAAG,UAAgC,CAAC;YAC3D,IAAI,iBAAiB,CAAC,YAAY,EAAE;gBAChC,OAAO,iBAAiB,CAAC,YAAY,CAAC;aACzC;YAED,IAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,UAAG,OAAO,YAAS,EAAE,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YAC/F,iBAAiB,CAAC,YAAY,GAAG,KAAI,CAAC,OAAO,CAAC,eAAe,CAAC,mBAAY,MAAM,CAAC,KAAK,CAAE,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,UAAC,MAAM;gBAC7J,OAAO,kBAAkB,CAAC,OAAO,CAAC,qBAAqB,CAAC,MAAoB,EAAE,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YAC3J,CAAC,CAAC,CAAC;YAEH,OAAO,iBAAiB,CAAC,YAAY,CAAC;QAC1C,CAAC,CAAC,CAAC;IACP,CAAC;IACL,8BAAC;AAAD,CAAC,AAxCD,IAwCC;;AAED,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,UAAC,MAAM,IAAK,OAAA,IAAI,uBAAuB,CAAC,MAAM,CAAC,EAAnC,CAAmC,CAAC,CAAC","sourcesContent":["import { Nullable } from \"@babylonjs/core/types\";\nimport { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\nimport { ArrayItem, GLTFLoader } from \"../glTFLoader\";\nimport { IBufferView } from \"../glTFLoaderInterfaces\";\nimport { IEXTMeshoptCompression } from \"babylonjs-gltf2interface\";\nimport { MeshoptCompression } from \"@babylonjs/core/Meshes/Compression/meshoptCompression\";\n\nconst NAME = \"EXT_meshopt_compression\";\n\ninterface IBufferViewMeshopt extends IBufferView {\n _meshOptData?: Promise<ArrayBufferView>;\n}\n\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression)\n *\n * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js\n * @since 5.0.0\n */\nexport class EXT_meshopt_compression implements IGLTFLoaderExtension {\n /**\n * The name of this extension.\n */\n public readonly name = NAME;\n\n /**\n * Defines whether this extension is enabled.\n */\n public enabled: boolean;\n\n private _loader: GLTFLoader;\n\n /** @hidden */\n constructor(loader: GLTFLoader) {\n this.enabled = loader.isExtensionUsed(NAME);\n this._loader = loader;\n }\n\n /** @hidden */\n public dispose() {\n (this._loader as any) = null;\n }\n\n /** @hidden */\n public loadBufferViewAsync(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>> {\n return GLTFLoader.LoadExtensionAsync<IEXTMeshoptCompression, ArrayBufferView>(context, bufferView, this.name, (extensionContext, extension) => {\n const bufferViewMeshopt = bufferView as IBufferViewMeshopt;\n if (bufferViewMeshopt._meshOptData) {\n return bufferViewMeshopt._meshOptData;\n }\n\n const buffer = ArrayItem.Get(`${context}/buffer`, this._loader.gltf.buffers, extension.buffer);\n bufferViewMeshopt._meshOptData = this._loader.loadBufferAsync(`/buffers/${buffer.index}`, buffer, (extension.byteOffset || 0), extension.byteLength).then((buffer) => {\n return MeshoptCompression.Default.decodeGltfBufferAsync(buffer as Uint8Array, extension.count, extension.byteStride, extension.mode, extension.filter);\n });\n\n return bufferViewMeshopt._meshOptData;\n });\n }\n}\n\nGLTFLoader.RegisterExtension(NAME, (loader) => new EXT_meshopt_compression(loader));\n"]}
1
+ {"version":3,"file":"EXT_meshopt_compression.js","sourceRoot":"","sources":["../../../../../../../lts/loaders/generated/glTF/2.0/Extensions/EXT_meshopt_compression.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,kBAAkB,EAAE,iEAAmD;AAEhF,IAAM,IAAI,GAAG,yBAAyB,CAAC;AAMvC;;;;;GAKG;AACH;IAaI;;;OAGG;IACH,iCAAY,MAAkB;QAhB9B;;WAEG;QACa,SAAI,GAAG,IAAI,CAAC;QAcxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED,cAAc;IACP,yCAAO,GAAd;QACK,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACI,qDAAmB,GAA1B,UAA2B,OAAe,EAAE,UAAuB;QAAnE,iBAcC;QAbG,OAAO,UAAU,CAAC,kBAAkB,CAA0C,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE,UAAC,gBAAgB,EAAE,SAAS;YACtI,IAAM,iBAAiB,GAAG,UAAgC,CAAC;YAC3D,IAAI,iBAAiB,CAAC,YAAY,EAAE;gBAChC,OAAO,iBAAiB,CAAC,YAAY,CAAC;aACzC;YAED,IAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,UAAG,OAAO,YAAS,EAAE,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YAC/F,iBAAiB,CAAC,YAAY,GAAG,KAAI,CAAC,OAAO,CAAC,eAAe,CAAC,mBAAY,MAAM,CAAC,KAAK,CAAE,EAAE,MAAM,EAAE,SAAS,CAAC,UAAU,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,UAAC,MAAM;gBAC3J,OAAO,kBAAkB,CAAC,OAAO,CAAC,qBAAqB,CAAC,MAAoB,EAAE,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YAC3J,CAAC,CAAC,CAAC;YAEH,OAAO,iBAAiB,CAAC,YAAY,CAAC;QAC1C,CAAC,CAAC,CAAC;IACP,CAAC;IACL,8BAAC;AAAD,CAAC,AA/CD,IA+CC;;AAED,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,UAAC,MAAM,IAAK,OAAA,IAAI,uBAAuB,CAAC,MAAM,CAAC,EAAnC,CAAmC,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { Nullable } from \"core/types\";\r\nimport type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { ArrayItem, GLTFLoader } from \"../glTFLoader\";\r\nimport type { IBufferView } from \"../glTFLoaderInterfaces\";\r\nimport type { IEXTMeshoptCompression } from \"babylonjs-gltf2interface\";\r\nimport { MeshoptCompression } from \"core/Meshes/Compression/meshoptCompression\";\r\n\r\nconst NAME = \"EXT_meshopt_compression\";\r\n\r\ninterface IBufferViewMeshopt extends IBufferView {\r\n _meshOptData?: Promise<ArrayBufferView>;\r\n}\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression)\r\n *\r\n * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js\r\n * @since 5.0.0\r\n */\r\nexport class EXT_meshopt_compression implements IGLTFLoaderExtension {\r\n /**\r\n * The name of this extension.\r\n */\r\n public readonly name = NAME;\r\n\r\n /**\r\n * Defines whether this extension is enabled.\r\n */\r\n public enabled: boolean;\r\n\r\n private _loader: GLTFLoader;\r\n\r\n /**\r\n * @param loader\r\n * @hidden\r\n */\r\n constructor(loader: GLTFLoader) {\r\n this.enabled = loader.isExtensionUsed(NAME);\r\n this._loader = loader;\r\n }\r\n\r\n /** @hidden */\r\n public dispose() {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @param context\r\n * @param bufferView\r\n * @hidden\r\n */\r\n public loadBufferViewAsync(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>> {\r\n return GLTFLoader.LoadExtensionAsync<IEXTMeshoptCompression, ArrayBufferView>(context, bufferView, this.name, (extensionContext, extension) => {\r\n const bufferViewMeshopt = bufferView as IBufferViewMeshopt;\r\n if (bufferViewMeshopt._meshOptData) {\r\n return bufferViewMeshopt._meshOptData;\r\n }\r\n\r\n const buffer = ArrayItem.Get(`${context}/buffer`, this._loader.gltf.buffers, extension.buffer);\r\n bufferViewMeshopt._meshOptData = this._loader.loadBufferAsync(`/buffers/${buffer.index}`, buffer, extension.byteOffset || 0, extension.byteLength).then((buffer) => {\r\n return MeshoptCompression.Default.decodeGltfBufferAsync(buffer as Uint8Array, extension.count, extension.byteStride, extension.mode, extension.filter);\r\n });\r\n\r\n return bufferViewMeshopt._meshOptData;\r\n });\r\n }\r\n}\r\n\r\nGLTFLoader.RegisterExtension(NAME, (loader) => new EXT_meshopt_compression(loader));\r\n"]}
@@ -1,21 +1,29 @@
1
- import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
2
- import { GLTFLoader } from "../glTFLoader";
3
- import { ITexture } from "../glTFLoaderInterfaces";
4
- import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture";
5
- import { Nullable } from "@babylonjs/core/types";
6
- /**
7
- * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Vendor/EXT_texture_webp/)
8
- */
9
- export declare class EXT_texture_webp implements IGLTFLoaderExtension {
10
- /** The name of this extension. */
11
- readonly name = "EXT_texture_webp";
12
- /** Defines whether this extension is enabled. */
13
- enabled: boolean;
14
- private _loader;
15
- /** @hidden */
16
- constructor(loader: GLTFLoader);
17
- /** @hidden */
18
- dispose(): void;
19
- /** @hidden */
20
- _loadTextureAsync(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
21
- }
1
+ import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
2
+ import { GLTFLoader } from "../glTFLoader";
3
+ import type { ITexture } from "../glTFLoaderInterfaces";
4
+ import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
5
+ import type { Nullable } from "@babylonjs/core/types.js";
6
+ /**
7
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Vendor/EXT_texture_webp/)
8
+ */
9
+ export declare class EXT_texture_webp implements IGLTFLoaderExtension {
10
+ /** The name of this extension. */
11
+ readonly name = "EXT_texture_webp";
12
+ /** Defines whether this extension is enabled. */
13
+ enabled: boolean;
14
+ private _loader;
15
+ /**
16
+ * @param loader
17
+ * @hidden
18
+ */
19
+ constructor(loader: GLTFLoader);
20
+ /** @hidden */
21
+ dispose(): void;
22
+ /**
23
+ * @param context
24
+ * @param texture
25
+ * @param assign
26
+ * @hidden
27
+ */
28
+ _loadTextureAsync(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
29
+ }
@@ -1,33 +1,41 @@
1
- import { GLTFLoader, ArrayItem } from "../glTFLoader.js";
2
- var NAME = "EXT_texture_webp";
3
- /**
4
- * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Vendor/EXT_texture_webp/)
5
- */
6
- var EXT_texture_webp = /** @class */ (function () {
7
- /** @hidden */
8
- function EXT_texture_webp(loader) {
9
- /** The name of this extension. */
10
- this.name = NAME;
11
- this._loader = loader;
12
- this.enabled = loader.isExtensionUsed(NAME);
13
- }
14
- /** @hidden */
15
- EXT_texture_webp.prototype.dispose = function () {
16
- this._loader = null;
17
- };
18
- /** @hidden */
19
- EXT_texture_webp.prototype._loadTextureAsync = function (context, texture, assign) {
20
- var _this = this;
21
- return GLTFLoader.LoadExtensionAsync(context, texture, this.name, function (extensionContext, extension) {
22
- var sampler = (texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get("".concat(context, "/sampler"), _this._loader.gltf.samplers, texture.sampler));
23
- var image = ArrayItem.Get("".concat(extensionContext, "/source"), _this._loader.gltf.images, extension.source);
24
- return _this._loader._createTextureAsync(context, sampler, image, function (babylonTexture) {
25
- assign(babylonTexture);
26
- }, undefined, !texture._textureInfo.nonColorData);
27
- });
28
- };
29
- return EXT_texture_webp;
30
- }());
31
- export { EXT_texture_webp };
32
- GLTFLoader.RegisterExtension(NAME, function (loader) { return new EXT_texture_webp(loader); });
1
+ import { GLTFLoader, ArrayItem } from "../glTFLoader";
2
+ var NAME = "EXT_texture_webp";
3
+ /**
4
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Vendor/EXT_texture_webp/)
5
+ */
6
+ var EXT_texture_webp = /** @class */ (function () {
7
+ /**
8
+ * @param loader
9
+ * @hidden
10
+ */
11
+ function EXT_texture_webp(loader) {
12
+ /** The name of this extension. */
13
+ this.name = NAME;
14
+ this._loader = loader;
15
+ this.enabled = loader.isExtensionUsed(NAME);
16
+ }
17
+ /** @hidden */
18
+ EXT_texture_webp.prototype.dispose = function () {
19
+ this._loader = null;
20
+ };
21
+ /**
22
+ * @param context
23
+ * @param texture
24
+ * @param assign
25
+ * @hidden
26
+ */
27
+ EXT_texture_webp.prototype._loadTextureAsync = function (context, texture, assign) {
28
+ var _this = this;
29
+ return GLTFLoader.LoadExtensionAsync(context, texture, this.name, function (extensionContext, extension) {
30
+ var sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get("".concat(context, "/sampler"), _this._loader.gltf.samplers, texture.sampler);
31
+ var image = ArrayItem.Get("".concat(extensionContext, "/source"), _this._loader.gltf.images, extension.source);
32
+ return _this._loader._createTextureAsync(context, sampler, image, function (babylonTexture) {
33
+ assign(babylonTexture);
34
+ }, undefined, !texture._textureInfo.nonColorData);
35
+ });
36
+ };
37
+ return EXT_texture_webp;
38
+ }());
39
+ export { EXT_texture_webp };
40
+ GLTFLoader.RegisterExtension(NAME, function (loader) { return new EXT_texture_webp(loader); });
33
41
  //# sourceMappingURL=EXT_texture_webp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EXT_texture_webp.js","sourceRoot":"","sources":["../../../../../sourceES6/loaders/src/glTF/2.0/Extensions/EXT_texture_webp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAMtD,IAAM,IAAI,GAAG,kBAAkB,CAAC;AAEhC;;GAEG;AACH;IASI,cAAc;IACd,0BAAY,MAAkB;QAT9B,kCAAkC;QAClB,SAAI,GAAG,IAAI,CAAC;QASxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,cAAc;IACP,kCAAO,GAAd;QACK,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED,cAAc;IACP,4CAAiB,GAAxB,UAAyB,OAAe,EAAE,OAAiB,EAAE,MAA6C;QAA1G,iBAQC;QAPG,OAAO,UAAU,CAAC,kBAAkB,CAA+B,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,UAAC,gBAAgB,EAAE,SAAS;YACxH,IAAM,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAG,OAAO,aAAU,EAAE,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;YAC9J,IAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,UAAG,gBAAgB,YAAS,EAAE,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YACtG,OAAO,KAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,UAAC,cAAc;gBAC5E,MAAM,CAAC,cAAc,CAAC,CAAC;YAC3B,CAAC,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;IACP,CAAC;IACL,uBAAC;AAAD,CAAC,AA9BD,IA8BC;;AAED,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,UAAC,MAAM,IAAK,OAAA,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAA5B,CAA4B,CAAC,CAAC","sourcesContent":["import { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\r\nimport { ITexture } from \"../glTFLoaderInterfaces\";\r\nimport { BaseTexture } from \"@babylonjs/core/Materials/Textures/baseTexture\";\r\nimport { Nullable } from \"@babylonjs/core/types\";\r\nimport { IEXTTextureWebP } from 'babylonjs-gltf2interface';\r\n\r\nconst NAME = \"EXT_texture_webp\";\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Vendor/EXT_texture_webp/)\r\n */\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 /** @hidden */\r\n constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n this.enabled = loader.isExtensionUsed(NAME);\r\n }\r\n\r\n /** @hidden */\r\n public dispose() {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /** @hidden */\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, (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 this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {\r\n assign(babylonTexture);\r\n }, undefined, !texture._textureInfo.nonColorData);\r\n });\r\n }\r\n}\r\n\r\nGLTFLoader.RegisterExtension(NAME, (loader) => new EXT_texture_webp(loader));\r\n"]}
1
+ {"version":3,"file":"EXT_texture_webp.js","sourceRoot":"","sources":["../../../../../../../lts/loaders/generated/glTF/2.0/Extensions/EXT_texture_webp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAMtD,IAAM,IAAI,GAAG,kBAAkB,CAAC;AAEhC;;GAEG;AACH;IASI;;;OAGG;IACH,0BAAY,MAAkB;QAZ9B,kCAAkC;QAClB,SAAI,GAAG,IAAI,CAAC;QAYxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,cAAc;IACP,kCAAO,GAAd;QACK,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACI,4CAAiB,GAAxB,UAAyB,OAAe,EAAE,OAAiB,EAAE,MAA6C;QAA1G,iBAeC;QAdG,OAAO,UAAU,CAAC,kBAAkB,CAA+B,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,UAAC,gBAAgB,EAAE,SAAS;YACxH,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAG,OAAO,aAAU,EAAE,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YAC5J,IAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,UAAG,gBAAgB,YAAS,EAAE,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YACtG,OAAO,KAAI,CAAC,OAAO,CAAC,mBAAmB,CACnC,OAAO,EACP,OAAO,EACP,KAAK,EACL,UAAC,cAAc;gBACX,MAAM,CAAC,cAAc,CAAC,CAAC;YAC3B,CAAC,EACD,SAAS,EACT,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CACrC,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;IACL,uBAAC;AAAD,CAAC,AA7CD,IA6CC;;AAED,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,UAAC,MAAM,IAAK,OAAA,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAA5B,CAA4B,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\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\n\r\nconst NAME = \"EXT_texture_webp\";\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Vendor/EXT_texture_webp/)\r\n */\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 * @param loader\r\n * @hidden\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 /** @hidden */\r\n public dispose() {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @param context\r\n * @param texture\r\n * @param assign\r\n * @hidden\r\n */\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, (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 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\nGLTFLoader.RegisterExtension(NAME, (loader) => new EXT_texture_webp(loader));\r\n"]}
@@ -1,32 +1,50 @@
1
- import { Nullable } from "@babylonjs/core/types";
2
- import { TransformNode } from "@babylonjs/core/Meshes/transformNode";
3
- import { Camera } from "@babylonjs/core/Cameras/camera";
4
- import { INode, ICamera, IMaterial } from "../glTFLoaderInterfaces";
5
- import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
6
- import { GLTFLoader } from "../glTFLoader";
7
- import { Material } from "@babylonjs/core/Materials/material";
8
- /**
9
- * Store glTF extras (if present) in BJS objects' metadata
10
- */
11
- export declare class ExtrasAsMetadata implements IGLTFLoaderExtension {
12
- /**
13
- * The name of this extension.
14
- */
15
- readonly name = "ExtrasAsMetadata";
16
- /**
17
- * Defines whether this extension is enabled.
18
- */
19
- enabled: boolean;
20
- private _loader;
21
- private _assignExtras;
22
- /** @hidden */
23
- constructor(loader: GLTFLoader);
24
- /** @hidden */
25
- dispose(): void;
26
- /** @hidden */
27
- loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
28
- /** @hidden */
29
- loadCameraAsync(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
30
- /** @hidden */
31
- createMaterial(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material>;
32
- }
1
+ import type { Nullable } from "@babylonjs/core/types.js";
2
+ import type { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
3
+ import type { Camera } from "@babylonjs/core/Cameras/camera.js";
4
+ import type { INode, ICamera, IMaterial } from "../glTFLoaderInterfaces";
5
+ import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
6
+ import { GLTFLoader } from "../glTFLoader";
7
+ import type { Material } from "@babylonjs/core/Materials/material.js";
8
+ /**
9
+ * Store glTF extras (if present) in BJS objects' metadata
10
+ */
11
+ export declare class ExtrasAsMetadata implements IGLTFLoaderExtension {
12
+ /**
13
+ * The name of this extension.
14
+ */
15
+ readonly name = "ExtrasAsMetadata";
16
+ /**
17
+ * Defines whether this extension is enabled.
18
+ */
19
+ enabled: boolean;
20
+ private _loader;
21
+ private _assignExtras;
22
+ /**
23
+ * @param loader
24
+ * @hidden
25
+ */
26
+ constructor(loader: GLTFLoader);
27
+ /** @hidden */
28
+ dispose(): void;
29
+ /**
30
+ * @param context
31
+ * @param node
32
+ * @param assign
33
+ * @hidden
34
+ */
35
+ loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
36
+ /**
37
+ * @param context
38
+ * @param camera
39
+ * @param assign
40
+ * @hidden
41
+ */
42
+ loadCameraAsync(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
43
+ /**
44
+ * @param context
45
+ * @param material
46
+ * @param babylonDrawMode
47
+ * @hidden
48
+ */
49
+ createMaterial(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material>;
50
+ }
@@ -1,56 +1,74 @@
1
- import { GLTFLoader } from "../glTFLoader.js";
2
- var NAME = "ExtrasAsMetadata";
3
- /**
4
- * Store glTF extras (if present) in BJS objects' metadata
5
- */
6
- var ExtrasAsMetadata = /** @class */ (function () {
7
- /** @hidden */
8
- function ExtrasAsMetadata(loader) {
9
- /**
10
- * The name of this extension.
11
- */
12
- this.name = NAME;
13
- /**
14
- * Defines whether this extension is enabled.
15
- */
16
- this.enabled = true;
17
- this._loader = loader;
18
- }
19
- ExtrasAsMetadata.prototype._assignExtras = function (babylonObject, gltfProp) {
20
- if (gltfProp.extras && Object.keys(gltfProp.extras).length > 0) {
21
- var metadata = (babylonObject.metadata = babylonObject.metadata || {});
22
- var gltf = (metadata.gltf = metadata.gltf || {});
23
- gltf.extras = gltfProp.extras;
24
- }
25
- };
26
- /** @hidden */
27
- ExtrasAsMetadata.prototype.dispose = function () {
28
- this._loader = null;
29
- };
30
- /** @hidden */
31
- ExtrasAsMetadata.prototype.loadNodeAsync = function (context, node, assign) {
32
- var _this = this;
33
- return this._loader.loadNodeAsync(context, node, function (babylonTransformNode) {
34
- _this._assignExtras(babylonTransformNode, node);
35
- assign(babylonTransformNode);
36
- });
37
- };
38
- /** @hidden */
39
- ExtrasAsMetadata.prototype.loadCameraAsync = function (context, camera, assign) {
40
- var _this = this;
41
- return this._loader.loadCameraAsync(context, camera, function (babylonCamera) {
42
- _this._assignExtras(babylonCamera, camera);
43
- assign(babylonCamera);
44
- });
45
- };
46
- /** @hidden */
47
- ExtrasAsMetadata.prototype.createMaterial = function (context, material, babylonDrawMode) {
48
- var babylonMaterial = this._loader.createMaterial(context, material, babylonDrawMode);
49
- this._assignExtras(babylonMaterial, material);
50
- return babylonMaterial;
51
- };
52
- return ExtrasAsMetadata;
53
- }());
54
- export { ExtrasAsMetadata };
55
- GLTFLoader.RegisterExtension(NAME, function (loader) { return new ExtrasAsMetadata(loader); });
1
+ import { GLTFLoader } from "../glTFLoader";
2
+ var NAME = "ExtrasAsMetadata";
3
+ /**
4
+ * Store glTF extras (if present) in BJS objects' metadata
5
+ */
6
+ var ExtrasAsMetadata = /** @class */ (function () {
7
+ /**
8
+ * @param loader
9
+ * @hidden
10
+ */
11
+ function ExtrasAsMetadata(loader) {
12
+ /**
13
+ * The name of this extension.
14
+ */
15
+ this.name = NAME;
16
+ /**
17
+ * Defines whether this extension is enabled.
18
+ */
19
+ this.enabled = true;
20
+ this._loader = loader;
21
+ }
22
+ ExtrasAsMetadata.prototype._assignExtras = function (babylonObject, gltfProp) {
23
+ if (gltfProp.extras && Object.keys(gltfProp.extras).length > 0) {
24
+ var metadata = (babylonObject.metadata = babylonObject.metadata || {});
25
+ var gltf = (metadata.gltf = metadata.gltf || {});
26
+ gltf.extras = gltfProp.extras;
27
+ }
28
+ };
29
+ /** @hidden */
30
+ ExtrasAsMetadata.prototype.dispose = function () {
31
+ this._loader = null;
32
+ };
33
+ /**
34
+ * @param context
35
+ * @param node
36
+ * @param assign
37
+ * @hidden
38
+ */
39
+ ExtrasAsMetadata.prototype.loadNodeAsync = function (context, node, assign) {
40
+ var _this = this;
41
+ return this._loader.loadNodeAsync(context, node, function (babylonTransformNode) {
42
+ _this._assignExtras(babylonTransformNode, node);
43
+ assign(babylonTransformNode);
44
+ });
45
+ };
46
+ /**
47
+ * @param context
48
+ * @param camera
49
+ * @param assign
50
+ * @hidden
51
+ */
52
+ ExtrasAsMetadata.prototype.loadCameraAsync = function (context, camera, assign) {
53
+ var _this = this;
54
+ return this._loader.loadCameraAsync(context, camera, function (babylonCamera) {
55
+ _this._assignExtras(babylonCamera, camera);
56
+ assign(babylonCamera);
57
+ });
58
+ };
59
+ /**
60
+ * @param context
61
+ * @param material
62
+ * @param babylonDrawMode
63
+ * @hidden
64
+ */
65
+ ExtrasAsMetadata.prototype.createMaterial = function (context, material, babylonDrawMode) {
66
+ var babylonMaterial = this._loader.createMaterial(context, material, babylonDrawMode);
67
+ this._assignExtras(babylonMaterial, material);
68
+ return babylonMaterial;
69
+ };
70
+ return ExtrasAsMetadata;
71
+ }());
72
+ export { ExtrasAsMetadata };
73
+ GLTFLoader.RegisterExtension(NAME, function (loader) { return new ExtrasAsMetadata(loader); });
56
74
  //# sourceMappingURL=ExtrasAsMetadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExtrasAsMetadata.js","sourceRoot":"","sources":["../../../../../sourceES6/loaders/src/glTF/2.0/Extensions/ExtrasAsMetadata.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,IAAM,IAAI,GAAG,kBAAkB,CAAC;AAMhC;;GAEG;AACH;IAwBI,cAAc;IACd,0BAAmB,MAAkB;QAxBrC;;WAEG;QACa,SAAI,GAAG,IAAI,CAAC;QAE5B;;WAEG;QACI,YAAO,GAAG,IAAI,CAAC;QAiBlB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAdO,wCAAa,GAArB,UACI,aAAiC,EACjC,QAAmB;QAEnB,IAAI,QAAQ,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5D,IAAM,QAAQ,GAAG,CAAC,aAAa,CAAC,QAAQ,GAAG,aAAa,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;YACzE,IAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;YACnD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;SACjC;IACL,CAAC;IAOD,cAAc;IACP,kCAAO,GAAd;QACK,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED,cAAc;IACP,wCAAa,GAApB,UACI,OAAe,EACf,IAAW,EACX,MAAqD;QAHzD,iBAaC;QARG,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAC7B,OAAO,EACP,IAAI,EACJ,UAAC,oBAAoB;YACjB,KAAI,CAAC,aAAa,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;YAC/C,MAAM,CAAC,oBAAoB,CAAC,CAAC;QACjC,CAAC,CACJ,CAAC;IACN,CAAC;IAED,cAAc;IACP,0CAAe,GAAtB,UACI,OAAe,EACf,MAAe,EACf,MAAuC;QAH3C,iBAaC;QARG,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAC/B,OAAO,EACP,MAAM,EACN,UAAC,aAAa;YACV,KAAI,CAAC,aAAa,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YAC1C,MAAM,CAAC,aAAa,CAAC,CAAC;QAC1B,CAAC,CACJ,CAAC;IACN,CAAC;IAED,cAAc;IACP,yCAAc,GAArB,UACI,OAAe,EACf,QAAmB,EACnB,eAAuB;QAEvB,IAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,CAC/C,OAAO,EACP,QAAQ,EACR,eAAe,CAClB,CAAC;QACF,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;QAC9C,OAAO,eAAe,CAAC;IAC3B,CAAC;IACL,uBAAC;AAAD,CAAC,AAhFD,IAgFC;;AAED,UAAU,CAAC,iBAAiB,CACxB,IAAI,EACJ,UAAC,MAAM,IAA2B,OAAA,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAA5B,CAA4B,CACjE,CAAC","sourcesContent":["import { Nullable } from \"@babylonjs/core/types\";\r\nimport { TransformNode } from \"@babylonjs/core/Meshes/transformNode\";\r\nimport { Camera } from \"@babylonjs/core/Cameras/camera\";\r\n\r\nimport { IProperty } from \"babylonjs-gltf2interface\";\r\nimport { INode, ICamera, IMaterial } from \"../glTFLoaderInterfaces\";\r\nimport { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader } from \"../glTFLoader\";\r\nimport { Material } from \"@babylonjs/core/Materials/material\";\r\n\r\nconst NAME = \"ExtrasAsMetadata\";\r\n\r\ninterface ObjectWithMetadata {\r\n metadata: any;\r\n}\r\n\r\n/**\r\n * Store glTF extras (if present) in BJS objects' metadata\r\n */\r\nexport class ExtrasAsMetadata implements IGLTFLoaderExtension {\r\n /**\r\n * The name of this extension.\r\n */\r\n public readonly name = NAME;\r\n\r\n /**\r\n * Defines whether this extension is enabled.\r\n */\r\n public enabled = true;\r\n\r\n private _loader: GLTFLoader;\r\n\r\n private _assignExtras(\r\n babylonObject: ObjectWithMetadata,\r\n gltfProp: IProperty\r\n ): void {\r\n if (gltfProp.extras && Object.keys(gltfProp.extras).length > 0) {\r\n const metadata = (babylonObject.metadata = babylonObject.metadata || {});\r\n const gltf = (metadata.gltf = metadata.gltf || {});\r\n gltf.extras = gltfProp.extras;\r\n }\r\n }\r\n\r\n /** @hidden */\r\n public constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n }\r\n\r\n /** @hidden */\r\n public dispose(): void {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /** @hidden */\r\n public loadNodeAsync(\r\n context: string,\r\n node: INode,\r\n assign: (babylonTransformNode: TransformNode) => void\r\n ): Nullable<Promise<TransformNode>> {\r\n return this._loader.loadNodeAsync(\r\n context,\r\n node,\r\n (babylonTransformNode): void => {\r\n this._assignExtras(babylonTransformNode, node);\r\n assign(babylonTransformNode);\r\n }\r\n );\r\n }\r\n\r\n /** @hidden */\r\n public loadCameraAsync(\r\n context: string,\r\n camera: ICamera,\r\n assign: (babylonCamera: Camera) => void\r\n ): Nullable<Promise<Camera>> {\r\n return this._loader.loadCameraAsync(\r\n context,\r\n camera,\r\n (babylonCamera): void => {\r\n this._assignExtras(babylonCamera, camera);\r\n assign(babylonCamera);\r\n }\r\n );\r\n }\r\n\r\n /** @hidden */\r\n public createMaterial(\r\n context: string,\r\n material: IMaterial,\r\n babylonDrawMode: number\r\n ): Nullable<Material> {\r\n const babylonMaterial = this._loader.createMaterial(\r\n context,\r\n material,\r\n babylonDrawMode\r\n );\r\n this._assignExtras(babylonMaterial, material);\r\n return babylonMaterial;\r\n }\r\n}\r\n\r\nGLTFLoader.RegisterExtension(\r\n NAME,\r\n (loader): IGLTFLoaderExtension => new ExtrasAsMetadata(loader)\r\n);\r\n"]}
1
+ {"version":3,"file":"ExtrasAsMetadata.js","sourceRoot":"","sources":["../../../../../../../lts/loaders/generated/glTF/2.0/Extensions/ExtrasAsMetadata.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,IAAM,IAAI,GAAG,kBAAkB,CAAC;AAMhC;;GAEG;AACH;IAqBI;;;OAGG;IACH,0BAAmB,MAAkB;QAxBrC;;WAEG;QACa,SAAI,GAAG,IAAI,CAAC;QAE5B;;WAEG;QACI,YAAO,GAAG,IAAI,CAAC;QAiBlB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAdO,wCAAa,GAArB,UAAsB,aAAiC,EAAE,QAAmB;QACxE,IAAI,QAAQ,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5D,IAAM,QAAQ,GAAG,CAAC,aAAa,CAAC,QAAQ,GAAG,aAAa,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;YACzE,IAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;YACnD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;SACjC;IACL,CAAC;IAUD,cAAc;IACP,kCAAO,GAAd;QACK,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACI,wCAAa,GAApB,UAAqB,OAAe,EAAE,IAAW,EAAE,MAAqD;QAAxG,iBAKC;QAJG,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,UAAC,oBAAoB;YAClE,KAAI,CAAC,aAAa,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;YAC/C,MAAM,CAAC,oBAAoB,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACI,0CAAe,GAAtB,UAAuB,OAAe,EAAE,MAAe,EAAE,MAAuC;QAAhG,iBAKC;QAJG,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,UAAC,aAAa;YAC/D,KAAI,CAAC,aAAa,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YAC1C,MAAM,CAAC,aAAa,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACI,yCAAc,GAArB,UAAsB,OAAe,EAAE,QAAmB,EAAE,eAAuB;QAC/E,IAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC;QACxF,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;QAC9C,OAAO,eAAe,CAAC;IAC3B,CAAC;IACL,uBAAC;AAAD,CAAC,AAvED,IAuEC;;AAED,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,UAAC,MAAM,IAA2B,OAAA,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAA5B,CAA4B,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { TransformNode } from \"core/Meshes/transformNode\";\r\nimport type { Camera } from \"core/Cameras/camera\";\r\n\r\nimport type { IProperty } from \"babylonjs-gltf2interface\";\r\nimport type { INode, ICamera, IMaterial } from \"../glTFLoaderInterfaces\";\r\nimport type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader } from \"../glTFLoader\";\r\nimport type { Material } from \"core/Materials/material\";\r\n\r\nconst NAME = \"ExtrasAsMetadata\";\r\n\r\ninterface ObjectWithMetadata {\r\n metadata: any;\r\n}\r\n\r\n/**\r\n * Store glTF extras (if present) in BJS objects' metadata\r\n */\r\nexport class ExtrasAsMetadata implements IGLTFLoaderExtension {\r\n /**\r\n * The name of this extension.\r\n */\r\n public readonly name = NAME;\r\n\r\n /**\r\n * Defines whether this extension is enabled.\r\n */\r\n public enabled = true;\r\n\r\n private _loader: GLTFLoader;\r\n\r\n private _assignExtras(babylonObject: ObjectWithMetadata, gltfProp: IProperty): void {\r\n if (gltfProp.extras && Object.keys(gltfProp.extras).length > 0) {\r\n const metadata = (babylonObject.metadata = babylonObject.metadata || {});\r\n const gltf = (metadata.gltf = metadata.gltf || {});\r\n gltf.extras = gltfProp.extras;\r\n }\r\n }\r\n\r\n /**\r\n * @param loader\r\n * @hidden\r\n */\r\n public constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n }\r\n\r\n /** @hidden */\r\n public dispose(): void {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @param context\r\n * @param node\r\n * @param assign\r\n * @hidden\r\n */\r\n public loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>> {\r\n return this._loader.loadNodeAsync(context, node, (babylonTransformNode): void => {\r\n this._assignExtras(babylonTransformNode, node);\r\n assign(babylonTransformNode);\r\n });\r\n }\r\n\r\n /**\r\n * @param context\r\n * @param camera\r\n * @param assign\r\n * @hidden\r\n */\r\n public loadCameraAsync(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>> {\r\n return this._loader.loadCameraAsync(context, camera, (babylonCamera): void => {\r\n this._assignExtras(babylonCamera, camera);\r\n assign(babylonCamera);\r\n });\r\n }\r\n\r\n /**\r\n * @param context\r\n * @param material\r\n * @param babylonDrawMode\r\n * @hidden\r\n */\r\n public createMaterial(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material> {\r\n const babylonMaterial = this._loader.createMaterial(context, material, babylonDrawMode);\r\n this._assignExtras(babylonMaterial, material);\r\n return babylonMaterial;\r\n }\r\n}\r\n\r\nGLTFLoader.RegisterExtension(NAME, (loader): IGLTFLoaderExtension => new ExtrasAsMetadata(loader));\r\n"]}