@babylonjs/loaders 5.0.0-rc.2 → 5.0.0-rc.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. package/OBJ/index.js.map +1 -1
  2. package/OBJ/mtlFileLoader.d.ts +7 -6
  3. package/OBJ/mtlFileLoader.js +15 -14
  4. package/OBJ/mtlFileLoader.js.map +1 -1
  5. package/OBJ/objFileLoader.d.ts +11 -18
  6. package/OBJ/objFileLoader.js +19 -23
  7. package/OBJ/objFileLoader.js.map +1 -1
  8. package/OBJ/objLoadingOptions.d.ts +1 -1
  9. package/OBJ/objLoadingOptions.js.map +1 -1
  10. package/OBJ/solidParser.d.ts +6 -5
  11. package/OBJ/solidParser.js +15 -21
  12. package/OBJ/solidParser.js.map +1 -1
  13. package/STL/index.js.map +1 -1
  14. package/STL/stlFileLoader.d.ts +7 -14
  15. package/STL/stlFileLoader.js +15 -21
  16. package/STL/stlFileLoader.js.map +1 -1
  17. package/glTF/1.0/glTFBinaryExtension.d.ts +4 -4
  18. package/glTF/1.0/glTFBinaryExtension.js +4 -5
  19. package/glTF/1.0/glTFBinaryExtension.js.map +1 -1
  20. package/glTF/1.0/glTFLoader.d.ts +80 -50
  21. package/glTF/1.0/glTFLoader.js +265 -146
  22. package/glTF/1.0/glTFLoader.js.map +1 -1
  23. package/glTF/1.0/glTFLoaderInterfaces.d.ts +10 -10
  24. package/glTF/1.0/glTFLoaderInterfaces.js +3 -3
  25. package/glTF/1.0/glTFLoaderInterfaces.js.map +1 -1
  26. package/glTF/1.0/glTFLoaderUtils.d.ts +25 -25
  27. package/glTF/1.0/glTFLoaderUtils.js +70 -52
  28. package/glTF/1.0/glTFLoaderUtils.js.map +1 -1
  29. package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +2 -2
  30. package/glTF/1.0/glTFMaterialsCommonExtension.js +13 -11
  31. package/glTF/1.0/glTFMaterialsCommonExtension.js.map +1 -1
  32. package/glTF/1.0/index.js.map +1 -1
  33. package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +11 -4
  34. package/glTF/2.0/Extensions/EXT_lights_image_based.js +9 -2
  35. package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -1
  36. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +13 -5
  37. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +12 -4
  38. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -1
  39. package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +10 -3
  40. package/glTF/2.0/Extensions/EXT_meshopt_compression.js +10 -3
  41. package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -1
  42. package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +12 -4
  43. package/glTF/2.0/Extensions/EXT_texture_webp.js +11 -3
  44. package/glTF/2.0/Extensions/EXT_texture_webp.js.map +1 -1
  45. package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +26 -8
  46. package/glTF/2.0/Extensions/ExtrasAsMetadata.js +22 -4
  47. package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -1
  48. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +14 -6
  49. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +17 -6
  50. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -1
  51. package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +12 -4
  52. package/glTF/2.0/Extensions/KHR_lights_punctual.js +11 -3
  53. package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -1
  54. package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +12 -4
  55. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +10 -2
  56. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
  57. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +12 -4
  58. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +10 -2
  59. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
  60. package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +12 -4
  61. package/glTF/2.0/Extensions/KHR_materials_ior.js +10 -2
  62. package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
  63. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +12 -4
  64. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +10 -2
  65. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -1
  66. package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +12 -4
  67. package/glTF/2.0/Extensions/KHR_materials_sheen.js +11 -3
  68. package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
  69. package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +12 -4
  70. package/glTF/2.0/Extensions/KHR_materials_specular.js +11 -3
  71. package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
  72. package/glTF/2.0/Extensions/KHR_materials_translucency.d.ts +12 -4
  73. package/glTF/2.0/Extensions/KHR_materials_translucency.js +11 -4
  74. package/glTF/2.0/Extensions/KHR_materials_translucency.js.map +1 -1
  75. package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +12 -4
  76. package/glTF/2.0/Extensions/KHR_materials_transmission.js +24 -13
  77. package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
  78. package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +12 -4
  79. package/glTF/2.0/Extensions/KHR_materials_unlit.js +10 -2
  80. package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
  81. package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +17 -6
  82. package/glTF/2.0/Extensions/KHR_materials_variants.js +19 -8
  83. package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -1
  84. package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +12 -4
  85. package/glTF/2.0/Extensions/KHR_materials_volume.js +12 -5
  86. package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
  87. package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +4 -1
  88. package/glTF/2.0/Extensions/KHR_mesh_quantization.js +5 -3
  89. package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +1 -1
  90. package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +12 -4
  91. package/glTF/2.0/Extensions/KHR_texture_basisu.js +11 -3
  92. package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +1 -1
  93. package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +12 -4
  94. package/glTF/2.0/Extensions/KHR_texture_transform.js +10 -2
  95. package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -1
  96. package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +4 -1
  97. package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +4 -1
  98. package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +1 -1
  99. package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +23 -7
  100. package/glTF/2.0/Extensions/MSFT_audio_emitter.js +38 -14
  101. package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -1
  102. package/glTF/2.0/Extensions/MSFT_lod.d.ts +45 -11
  103. package/glTF/2.0/Extensions/MSFT_lod.js +44 -8
  104. package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -1
  105. package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +2 -2
  106. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
  107. package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +2 -2
  108. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
  109. package/glTF/2.0/Extensions/index.js.map +1 -1
  110. package/glTF/2.0/glTFLoader.d.ts +70 -22
  111. package/glTF/2.0/glTFLoader.js +180 -93
  112. package/glTF/2.0/glTFLoader.js.map +1 -1
  113. package/glTF/2.0/glTFLoaderExtension.d.ts +11 -11
  114. package/glTF/2.0/glTFLoaderExtension.js.map +1 -1
  115. package/glTF/2.0/glTFLoaderInterfaces.d.ts +7 -7
  116. package/glTF/2.0/glTFLoaderInterfaces.js.map +1 -1
  117. package/glTF/2.0/index.js.map +1 -1
  118. package/glTF/glTFFileLoader.d.ts +87 -27
  119. package/glTF/glTFFileLoader.js +102 -45
  120. package/glTF/glTFFileLoader.js.map +1 -1
  121. package/glTF/glTFValidation.d.ts +1 -1
  122. package/glTF/glTFValidation.js +12 -12
  123. package/glTF/glTFValidation.js.map +1 -1
  124. package/glTF/index.js.map +1 -1
  125. package/index.js.map +1 -1
  126. package/legacy/legacy-glTF.d.ts +2 -2
  127. package/legacy/legacy-glTF.js +5 -5
  128. package/legacy/legacy-glTF.js.map +1 -1
  129. package/legacy/legacy-glTF1.d.ts +1 -1
  130. package/legacy/legacy-glTF1.js +2 -2
  131. package/legacy/legacy-glTF1.js.map +1 -1
  132. package/legacy/legacy-glTF1FileLoader.js +1 -0
  133. package/legacy/legacy-glTF1FileLoader.js.map +1 -1
  134. package/legacy/legacy-glTF2.d.ts +1 -1
  135. package/legacy/legacy-glTF2.js +11 -11
  136. package/legacy/legacy-glTF2.js.map +1 -1
  137. package/legacy/legacy-glTF2FileLoader.js +1 -0
  138. package/legacy/legacy-glTF2FileLoader.js.map +1 -1
  139. package/legacy/legacy-glTFFileLoader.js +1 -0
  140. package/legacy/legacy-glTFFileLoader.js.map +1 -1
  141. package/legacy/legacy-objFileLoader.d.ts +1 -1
  142. package/legacy/legacy-objFileLoader.js +3 -3
  143. package/legacy/legacy-objFileLoader.js.map +1 -1
  144. package/legacy/legacy-stlFileLoader.d.ts +1 -1
  145. package/legacy/legacy-stlFileLoader.js +3 -3
  146. package/legacy/legacy-stlFileLoader.js.map +1 -1
  147. package/legacy/legacy.d.ts +1 -1
  148. package/legacy/legacy.js +2 -1
  149. package/legacy/legacy.js.map +1 -1
  150. package/package.json +23 -198
  151. package/readme.md +2 -2
@@ -1,16 +1,16 @@
1
- import { Nullable } from "@babylonjs/core/types";
2
- import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup";
3
- import { Material } from "@babylonjs/core/Materials/material";
4
- import { Camera } from "@babylonjs/core/Cameras/camera";
5
- import { Geometry } from "@babylonjs/core/Meshes/geometry";
6
- import { TransformNode } from "@babylonjs/core/Meshes/transformNode";
7
- import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture";
8
- import { Mesh } from "@babylonjs/core/Meshes/mesh";
9
- import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh";
10
- import { IDisposable } from "@babylonjs/core/scene";
1
+ import { Nullable } from "@babylonjs/core/types.js";
2
+ import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
3
+ import { Material } from "@babylonjs/core/Materials/material.js";
4
+ import { Camera } from "@babylonjs/core/Cameras/camera.js";
5
+ import { Geometry } from "@babylonjs/core/Meshes/geometry.js";
6
+ import { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
7
+ import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
8
+ import { Mesh } from "@babylonjs/core/Meshes/mesh.js";
9
+ import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
10
+ import { IDisposable } from "@babylonjs/core/scene.js";
11
11
  import { IScene, INode, IMesh, ISkin, ICamera, IMeshPrimitive, IMaterial, ITextureInfo, IAnimation, ITexture, IBufferView, IBuffer } from "./glTFLoaderInterfaces";
12
12
  import { IGLTFLoaderExtension as IGLTFBaseLoaderExtension } from "../glTFFileLoader";
13
- import { IProperty } from 'babylonjs-gltf2interface';
13
+ import { IProperty } from "babylonjs-gltf2interface";
14
14
  /**
15
15
  * Interface for a glTF loader extension.
16
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"glTFLoaderExtension.js","sourceRoot":"","sources":["../../../../sourceES6/loaders/src/glTF/2.0/glTFLoaderExtension.ts"],"names":[],"mappings":"","sourcesContent":["import { Nullable } from \"@babylonjs/core/types\";\r\nimport { AnimationGroup } from \"@babylonjs/core/Animations/animationGroup\";\r\nimport { Material } from \"@babylonjs/core/Materials/material\";\r\nimport { Camera } from \"@babylonjs/core/Cameras/camera\";\r\nimport { Geometry } from \"@babylonjs/core/Meshes/geometry\";\r\nimport { TransformNode } from \"@babylonjs/core/Meshes/transformNode\";\r\nimport { BaseTexture } from \"@babylonjs/core/Materials/Textures/baseTexture\";\r\nimport { Mesh } from \"@babylonjs/core/Meshes/mesh\";\r\nimport { AbstractMesh } from \"@babylonjs/core/Meshes/abstractMesh\";\r\nimport { IDisposable } from \"@babylonjs/core/scene\";\r\nimport { IScene, INode, IMesh, ISkin, ICamera, IMeshPrimitive, IMaterial, ITextureInfo, IAnimation, ITexture, IBufferView, IBuffer } from \"./glTFLoaderInterfaces\";\r\nimport { IGLTFLoaderExtension as IGLTFBaseLoaderExtension } from \"../glTFFileLoader\";\r\nimport { IProperty } from 'babylonjs-gltf2interface';\r\n\r\n/**\r\n * Interface for a glTF loader extension.\r\n */\r\nexport interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposable {\r\n /**\r\n * Called after the loader state changes to LOADING.\r\n */\r\n onLoading?(): void;\r\n\r\n /**\r\n * Called after the loader state changes to READY.\r\n */\r\n onReady?(): void;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading scenes.\r\n * @param context The context when loading the asset\r\n * @param scene The glTF scene property\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n loadSceneAsync?(context: string, scene: IScene): Nullable<Promise<void>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading nodes.\r\n * @param context The context when loading the asset\r\n * @param node The glTF node property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon transform node when the load is complete or null if not handled\r\n */\r\n loadNodeAsync?(context: string, node: INode, assign: (babylonMesh: TransformNode) => void): Nullable<Promise<TransformNode>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading cameras.\r\n * @param context The context when loading the asset\r\n * @param camera The glTF camera property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled\r\n */\r\n loadCameraAsync?(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading vertex data for mesh primitives.\r\n * @param context The context when loading the asset\r\n * @param primitive The glTF mesh primitive property\r\n * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled\r\n */\r\n _loadVertexDataAsync?(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading data for mesh primitives.\r\n * @param context The context when loading the asset\r\n * @param name The mesh name when loading the asset\r\n * @param node The glTF node when loading the asset\r\n * @param mesh The glTF mesh when loading the asset\r\n * @param primitive The glTF mesh primitive property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded mesh when the load is complete or null if not handled\r\n */\r\n _loadMeshPrimitiveAsync?(context: string, name: string, node: INode, mesh: IMesh, primitive: IMeshPrimitive, assign: (babylonMesh: AbstractMesh) => void): Nullable<Promise<AbstractMesh>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled\r\n */\r\n _loadMaterialAsync?(context: string, material: IMaterial, babylonMesh: Nullable<Mesh>, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when creating materials.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param babylonDrawMode The draw mode for the Babylon material\r\n * @returns The Babylon material or null if not handled\r\n */\r\n createMaterial?(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading material properties.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param babylonMaterial The Babylon material\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n loadMaterialPropertiesAsync?(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading texture infos.\r\n * @param context The context when loading the asset\r\n * @param textureInfo The glTF texture info property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled\r\n */\r\n loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading textures.\r\n * @param context The context when loading the asset\r\n * @param texture The glTF texture property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled\r\n */\r\n _loadTextureAsync?(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading animations.\r\n * @param context The context when loading the asset\r\n * @param animation The glTF animation property\r\n * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled\r\n */\r\n loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading skins.\r\n * @param context The context when loading the asset\r\n * @param node The glTF node property\r\n * @param skin The glTF skin property\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n _loadSkinAsync?(context: string, node: INode, skin: ISkin): Nullable<Promise<void>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading uris.\r\n * @param context The context when loading the asset\r\n * @param property The glTF property associated with the uri\r\n * @param uri The uri to load\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n _loadUriAsync?(context: string, property: IProperty, uri: string): Nullable<Promise<ArrayBufferView>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading buffer views.\r\n * @param context The context when loading the asset\r\n * @param bufferView The glTF buffer view property\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n loadBufferViewAsync?(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading buffers.\r\n * @param context The context when loading the asset\r\n * @param buffer The glTF buffer property\r\n * @param byteOffset The byte offset to load\r\n * @param byteLength The byte length to load\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n loadBufferAsync?(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Nullable<Promise<ArrayBufferView>>;\r\n}\r\n"]}
1
+ {"version":3,"file":"glTFLoaderExtension.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/glTFLoaderExtension.ts"],"names":[],"mappings":"","sourcesContent":["import { Nullable } from \"core/types\";\r\nimport { AnimationGroup } from \"core/Animations/animationGroup\";\r\nimport { Material } from \"core/Materials/material\";\r\nimport { Camera } from \"core/Cameras/camera\";\r\nimport { Geometry } from \"core/Meshes/geometry\";\r\nimport { TransformNode } from \"core/Meshes/transformNode\";\r\nimport { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport { Mesh } from \"core/Meshes/mesh\";\r\nimport { AbstractMesh } from \"core/Meshes/abstractMesh\";\r\nimport { IDisposable } from \"core/scene\";\r\nimport { IScene, INode, IMesh, ISkin, ICamera, IMeshPrimitive, IMaterial, ITextureInfo, IAnimation, ITexture, IBufferView, IBuffer } from \"./glTFLoaderInterfaces\";\r\nimport { IGLTFLoaderExtension as IGLTFBaseLoaderExtension } from \"../glTFFileLoader\";\r\nimport { IProperty } from \"babylonjs-gltf2interface\";\r\n\r\n/**\r\n * Interface for a glTF loader extension.\r\n */\r\nexport interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposable {\r\n /**\r\n * Called after the loader state changes to LOADING.\r\n */\r\n onLoading?(): void;\r\n\r\n /**\r\n * Called after the loader state changes to READY.\r\n */\r\n onReady?(): void;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading scenes.\r\n * @param context The context when loading the asset\r\n * @param scene The glTF scene property\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n loadSceneAsync?(context: string, scene: IScene): Nullable<Promise<void>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading nodes.\r\n * @param context The context when loading the asset\r\n * @param node The glTF node property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon transform node when the load is complete or null if not handled\r\n */\r\n loadNodeAsync?(context: string, node: INode, assign: (babylonMesh: TransformNode) => void): Nullable<Promise<TransformNode>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading cameras.\r\n * @param context The context when loading the asset\r\n * @param camera The glTF camera property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled\r\n */\r\n loadCameraAsync?(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading vertex data for mesh primitives.\r\n * @param context The context when loading the asset\r\n * @param primitive The glTF mesh primitive property\r\n * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled\r\n */\r\n _loadVertexDataAsync?(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading data for mesh primitives.\r\n * @param context The context when loading the asset\r\n * @param name The mesh name when loading the asset\r\n * @param node The glTF node when loading the asset\r\n * @param mesh The glTF mesh when loading the asset\r\n * @param primitive The glTF mesh primitive property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded mesh when the load is complete or null if not handled\r\n */\r\n _loadMeshPrimitiveAsync?(\r\n context: string,\r\n name: string,\r\n node: INode,\r\n mesh: IMesh,\r\n primitive: IMeshPrimitive,\r\n assign: (babylonMesh: AbstractMesh) => void\r\n ): Nullable<Promise<AbstractMesh>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled\r\n */\r\n _loadMaterialAsync?(\r\n context: string,\r\n material: IMaterial,\r\n babylonMesh: Nullable<Mesh>,\r\n babylonDrawMode: number,\r\n assign: (babylonMaterial: Material) => void\r\n ): Nullable<Promise<Material>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when creating materials.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param babylonDrawMode The draw mode for the Babylon material\r\n * @returns The Babylon material or null if not handled\r\n */\r\n createMaterial?(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading material properties.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param babylonMaterial The Babylon material\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n loadMaterialPropertiesAsync?(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading texture infos.\r\n * @param context The context when loading the asset\r\n * @param textureInfo The glTF texture info property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled\r\n */\r\n loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading textures.\r\n * @param context The context when loading the asset\r\n * @param texture The glTF texture property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled\r\n */\r\n _loadTextureAsync?(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading animations.\r\n * @param context The context when loading the asset\r\n * @param animation The glTF animation property\r\n * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled\r\n */\r\n loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading skins.\r\n * @param context The context when loading the asset\r\n * @param node The glTF node property\r\n * @param skin The glTF skin property\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n _loadSkinAsync?(context: string, node: INode, skin: ISkin): Nullable<Promise<void>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading uris.\r\n * @param context The context when loading the asset\r\n * @param property The glTF property associated with the uri\r\n * @param uri The uri to load\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n _loadUriAsync?(context: string, property: IProperty, uri: string): Nullable<Promise<ArrayBufferView>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading buffer views.\r\n * @param context The context when loading the asset\r\n * @param bufferView The glTF buffer view property\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n loadBufferViewAsync?(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading buffers.\r\n * @param context The context when loading the asset\r\n * @param buffer The glTF buffer property\r\n * @param byteOffset The byte offset to load\r\n * @param byteLength The byte length to load\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n loadBufferAsync?(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Nullable<Promise<ArrayBufferView>>;\r\n}\r\n"]}
@@ -1,10 +1,10 @@
1
- import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup";
2
- import { Skeleton } from "@babylonjs/core/Bones/skeleton";
3
- import { Material } from "@babylonjs/core/Materials/material";
4
- import { TransformNode } from "@babylonjs/core/Meshes/transformNode";
5
- import { Buffer, VertexBuffer } from "@babylonjs/core/Buffers/buffer";
6
- import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh";
7
- import { Mesh } from "@babylonjs/core/Meshes/mesh";
1
+ import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
2
+ import { Skeleton } from "@babylonjs/core/Bones/skeleton.js";
3
+ import { Material } from "@babylonjs/core/Materials/material.js";
4
+ import { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
5
+ import { Buffer, VertexBuffer } from "@babylonjs/core/Buffers/buffer.js";
6
+ import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
7
+ import { Mesh } from "@babylonjs/core/Meshes/mesh.js";
8
8
  import * as GLTF2 from "babylonjs-gltf2interface";
9
9
  /**
10
10
  * Loader interface with an index field.
@@ -1 +1 @@
1
- {"version":3,"file":"glTFLoaderInterfaces.js","sourceRoot":"","sources":["../../../../sourceES6/loaders/src/glTF/2.0/glTFLoaderInterfaces.ts"],"names":[],"mappings":"","sourcesContent":["import { AnimationGroup } from \"@babylonjs/core/Animations/animationGroup\";\r\nimport { Skeleton } from \"@babylonjs/core/Bones/skeleton\";\r\nimport { Material } from \"@babylonjs/core/Materials/material\";\r\nimport { TransformNode } from \"@babylonjs/core/Meshes/transformNode\";\r\nimport { Buffer, VertexBuffer } from \"@babylonjs/core/Buffers/buffer\";\r\nimport { AbstractMesh } from \"@babylonjs/core/Meshes/abstractMesh\";\r\nimport { Mesh } from \"@babylonjs/core/Meshes/mesh\";\r\n\r\nimport * as GLTF2 from \"babylonjs-gltf2interface\";\r\n\r\n/**\r\n * Loader interface with an index field.\r\n */\r\nexport interface IArrayItem {\r\n /**\r\n * The index of this item in the array.\r\n */\r\n index: number;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAccessor extends GLTF2.IAccessor, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n\r\n /** @hidden */\r\n _babylonVertexBuffer?: { [kind: string]: Promise<VertexBuffer>; };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {\r\n}\r\n\r\n/** @hidden */\r\nexport interface _IAnimationSamplerData {\r\n input: Float32Array;\r\n interpolation: GLTF2.AnimationSamplerInterpolation;\r\n output: Float32Array;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<_IAnimationSamplerData>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimation extends GLTF2.IAnimation, IArrayItem {\r\n channels: IAnimationChannel[];\r\n samplers: IAnimationSampler[];\r\n\r\n /** @hidden */\r\n _babylonAnimationGroup?: AnimationGroup;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IBuffer extends GLTF2.IBuffer, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IBufferView extends GLTF2.IBufferView, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n\r\n /** @hidden */\r\n _babylonBuffer?: Promise<Buffer>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ICamera extends GLTF2.ICamera, IArrayItem {\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IImage extends GLTF2.IImage, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {\r\n baseColorTexture?: ITextureInfo;\r\n metallicRoughnessTexture?: ITextureInfo;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterial extends GLTF2.IMaterial, IArrayItem {\r\n pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;\r\n normalTexture?: IMaterialNormalTextureInfo;\r\n occlusionTexture?: IMaterialOcclusionTextureInfo;\r\n emissiveTexture?: ITextureInfo;\r\n\r\n /** @hidden */\r\n _data?: {\r\n [babylonDrawMode: number]: {\r\n babylonMaterial: Material;\r\n babylonMeshes: AbstractMesh[];\r\n promise: Promise<void>;\r\n }\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMesh extends GLTF2.IMesh, IArrayItem {\r\n primitives: IMeshPrimitive[];\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {\r\n /** @hidden */\r\n _instanceData?: {\r\n babylonSourceMesh: Mesh;\r\n promise: Promise<any>;\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface INode extends GLTF2.INode, IArrayItem {\r\n /**\r\n * The parent glTF node.\r\n */\r\n parent?: INode;\r\n\r\n /** @hidden */\r\n _babylonTransformNode?: TransformNode;\r\n\r\n /** @hidden */\r\n _babylonTransformNodeForSkin?: TransformNode;\r\n\r\n /** @hidden */\r\n _primitiveBabylonMeshes?: AbstractMesh[];\r\n\r\n /** @hidden */\r\n _numMorphTargets?: number;\r\n}\r\n\r\n/** @hidden */\r\nexport interface _ISamplerData {\r\n noMipMaps: boolean;\r\n samplingMode: number;\r\n wrapU: number;\r\n wrapV: number;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ISampler extends GLTF2.ISampler, IArrayItem {\r\n /** @hidden */\r\n _data?: _ISamplerData;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IScene extends GLTF2.IScene, IArrayItem {\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ISkin extends GLTF2.ISkin, IArrayItem {\r\n /** @hidden */\r\n _data?: {\r\n babylonSkeleton: Skeleton;\r\n promise: Promise<void>;\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ITexture extends GLTF2.ITexture, IArrayItem {\r\n /** @hidden */\r\n _textureInfo: ITextureInfo;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ITextureInfo extends GLTF2.ITextureInfo {\r\n /** false or undefined if the texture holds color data (true if data are roughness, normal, ...) */\r\n nonColorData?: boolean;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IGLTF extends GLTF2.IGLTF {\r\n accessors?: IAccessor[];\r\n animations?: IAnimation[];\r\n buffers?: IBuffer[];\r\n bufferViews?: IBufferView[];\r\n cameras?: ICamera[];\r\n images?: IImage[];\r\n materials?: IMaterial[];\r\n meshes?: IMesh[];\r\n nodes?: INode[];\r\n samplers?: ISampler[];\r\n scenes?: IScene[];\r\n skins?: ISkin[];\r\n textures?: ITexture[];\r\n}\r\n"]}
1
+ {"version":3,"file":"glTFLoaderInterfaces.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/glTFLoaderInterfaces.ts"],"names":[],"mappings":"","sourcesContent":["import { AnimationGroup } from \"core/Animations/animationGroup\";\r\nimport { Skeleton } from \"core/Bones/skeleton\";\r\nimport { Material } from \"core/Materials/material\";\r\nimport { TransformNode } from \"core/Meshes/transformNode\";\r\nimport { Buffer, VertexBuffer } from \"core/Buffers/buffer\";\r\nimport { AbstractMesh } from \"core/Meshes/abstractMesh\";\r\nimport { Mesh } from \"core/Meshes/mesh\";\r\n\r\nimport * as GLTF2 from \"babylonjs-gltf2interface\";\r\n\r\n/**\r\n * Loader interface with an index field.\r\n */\r\nexport interface IArrayItem {\r\n /**\r\n * The index of this item in the array.\r\n */\r\n index: number;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAccessor extends GLTF2.IAccessor, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n\r\n /** @hidden */\r\n _babylonVertexBuffer?: { [kind: string]: Promise<VertexBuffer> };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {}\r\n\r\n/** @hidden */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport interface _IAnimationSamplerData {\r\n input: Float32Array;\r\n interpolation: GLTF2.AnimationSamplerInterpolation;\r\n output: Float32Array;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<_IAnimationSamplerData>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimation extends GLTF2.IAnimation, IArrayItem {\r\n channels: IAnimationChannel[];\r\n samplers: IAnimationSampler[];\r\n\r\n /** @hidden */\r\n _babylonAnimationGroup?: AnimationGroup;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IBuffer extends GLTF2.IBuffer, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IBufferView extends GLTF2.IBufferView, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n\r\n /** @hidden */\r\n _babylonBuffer?: Promise<Buffer>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ICamera extends GLTF2.ICamera, IArrayItem {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IImage extends GLTF2.IImage, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {\r\n baseColorTexture?: ITextureInfo;\r\n metallicRoughnessTexture?: ITextureInfo;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterial extends GLTF2.IMaterial, IArrayItem {\r\n pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;\r\n normalTexture?: IMaterialNormalTextureInfo;\r\n occlusionTexture?: IMaterialOcclusionTextureInfo;\r\n emissiveTexture?: ITextureInfo;\r\n\r\n /** @hidden */\r\n _data?: {\r\n [babylonDrawMode: number]: {\r\n babylonMaterial: Material;\r\n babylonMeshes: AbstractMesh[];\r\n promise: Promise<void>;\r\n };\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMesh extends GLTF2.IMesh, IArrayItem {\r\n primitives: IMeshPrimitive[];\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {\r\n /** @hidden */\r\n _instanceData?: {\r\n babylonSourceMesh: Mesh;\r\n promise: Promise<any>;\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface INode extends GLTF2.INode, IArrayItem {\r\n /**\r\n * The parent glTF node.\r\n */\r\n parent?: INode;\r\n\r\n /** @hidden */\r\n _babylonTransformNode?: TransformNode;\r\n\r\n /** @hidden */\r\n _babylonTransformNodeForSkin?: TransformNode;\r\n\r\n /** @hidden */\r\n _primitiveBabylonMeshes?: AbstractMesh[];\r\n\r\n /** @hidden */\r\n _numMorphTargets?: number;\r\n}\r\n\r\n/** @hidden */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport interface _ISamplerData {\r\n noMipMaps: boolean;\r\n samplingMode: number;\r\n wrapU: number;\r\n wrapV: number;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ISampler extends GLTF2.ISampler, IArrayItem {\r\n /** @hidden */\r\n _data?: _ISamplerData;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IScene extends GLTF2.IScene, IArrayItem {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ISkin extends GLTF2.ISkin, IArrayItem {\r\n /** @hidden */\r\n _data?: {\r\n babylonSkeleton: Skeleton;\r\n promise: Promise<void>;\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ITexture extends GLTF2.ITexture, IArrayItem {\r\n /** @hidden */\r\n _textureInfo: ITextureInfo;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ITextureInfo extends GLTF2.ITextureInfo {\r\n /** false or undefined if the texture holds color data (true if data are roughness, normal, ...) */\r\n nonColorData?: boolean;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IGLTF extends GLTF2.IGLTF {\r\n accessors?: IAccessor[];\r\n animations?: IAnimation[];\r\n buffers?: IBuffer[];\r\n bufferViews?: IBufferView[];\r\n cameras?: ICamera[];\r\n images?: IImage[];\r\n materials?: IMaterial[];\r\n meshes?: IMesh[];\r\n nodes?: INode[];\r\n samplers?: ISampler[];\r\n scenes?: IScene[];\r\n skins?: ISkin[];\r\n textures?: ITexture[];\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../sourceES6/loaders/src/glTF/2.0/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC","sourcesContent":["export * from \"./glTFLoader\";\r\nexport * from \"./glTFLoaderExtension\";\r\nexport * from \"./glTFLoaderInterfaces\";\r\nexport * from \"./Extensions/index\";"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC","sourcesContent":["export * from \"./glTFLoader\";\r\nexport * from \"./glTFLoaderExtension\";\r\nexport * from \"./glTFLoaderInterfaces\";\r\nexport * from \"./Extensions/index\";\r\n"]}
@@ -1,17 +1,17 @@
1
1
  import * as GLTF2 from "babylonjs-gltf2interface";
2
- import { Nullable } from "@babylonjs/core/types";
3
- import { Observable } from "@babylonjs/core/Misc/observable";
4
- import { Camera } from "@babylonjs/core/Cameras/camera";
5
- import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture";
6
- import { Material } from "@babylonjs/core/Materials/material";
7
- import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh";
8
- import { ISceneLoaderPluginFactory, ISceneLoaderPlugin, ISceneLoaderPluginAsync, ISceneLoaderProgressEvent, ISceneLoaderPluginExtensions, ISceneLoaderAsyncResult } from "@babylonjs/core/Loading/sceneLoader";
9
- import { AssetContainer } from "@babylonjs/core/assetContainer";
10
- import { Scene, IDisposable } from "@babylonjs/core/scene";
11
- import { WebRequest } from "@babylonjs/core/Misc/webRequest";
12
- import { IFileRequest } from "@babylonjs/core/Misc/fileRequest";
13
- import { IDataBuffer } from "@babylonjs/core/Misc/dataReader";
14
- import { LoadFileError } from "@babylonjs/core/Misc/fileTools";
2
+ import { Nullable } from "@babylonjs/core/types.js";
3
+ import { Observable } from "@babylonjs/core/Misc/observable.js";
4
+ import { Camera } from "@babylonjs/core/Cameras/camera.js";
5
+ import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
6
+ import { Material } from "@babylonjs/core/Materials/material.js";
7
+ import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
8
+ import { ISceneLoaderPluginFactory, ISceneLoaderPlugin, ISceneLoaderPluginAsync, ISceneLoaderProgressEvent, ISceneLoaderPluginExtensions, ISceneLoaderAsyncResult } from "@babylonjs/core/Loading/sceneLoader.js";
9
+ import { AssetContainer } from "@babylonjs/core/assetContainer.js";
10
+ import { Scene, IDisposable } from "@babylonjs/core/scene.js";
11
+ import { WebRequest } from "@babylonjs/core/Misc/webRequest.js";
12
+ import { IFileRequest } from "@babylonjs/core/Misc/fileRequest.js";
13
+ import { IDataBuffer } from "@babylonjs/core/Misc/dataReader.js";
14
+ import { LoadFileError } from "@babylonjs/core/Misc/fileTools.js";
15
15
  /**
16
16
  * Mode that determines the coordinate system to use.
17
17
  */
@@ -130,8 +130,8 @@ export declare class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAs
130
130
  */
131
131
  coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
132
132
  /**
133
- * The animation start mode. Defaults to FIRST.
134
- */
133
+ * The animation start mode. Defaults to FIRST.
134
+ */
135
135
  animationStartMode: GLTFLoaderAnimationStartMode;
136
136
  /**
137
137
  * Defines if the loader should compile materials before raising the success callback. Defaults to false.
@@ -169,6 +169,14 @@ export declare class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAs
169
169
  * If true, load all materials defined in the file, even if not used by any mesh. Defaults to false.
170
170
  */
171
171
  loadAllMaterials: boolean;
172
+ /**
173
+ * If true, load only the materials defined in the file. Defaults to false.
174
+ */
175
+ loadOnlyMaterials: boolean;
176
+ /**
177
+ * If true, do not load any materials defined in the file. Defaults to false.
178
+ */
179
+ skipMaterials: boolean;
172
180
  /**
173
181
  * If true, load the color (gamma encoded) textures into sRGB buffers (if supported by the GPU), which will yield more accurate results when sampling the texture. Defaults to true.
174
182
  */
@@ -183,8 +191,9 @@ export declare class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAs
183
191
  */
184
192
  alwaysComputeSkeletonRootNode: boolean;
185
193
  /**
186
- * Function called before loading a url referenced by the asset.
187
- */
194
+ * Function called before loading a url referenced by the asset.
195
+ * @param url
196
+ */
188
197
  preprocessUrlAsync: (url: string) => Promise<string>;
189
198
  /**
190
199
  * Observable raised when the loader creates a mesh after parsing the glTF properties of the mesh.
@@ -292,7 +301,7 @@ export declare class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAs
292
301
  private _state;
293
302
  private _progressCallback?;
294
303
  private _requests;
295
- private static magicBase64Encoded;
304
+ private static _MagicBase64Encoded;
296
305
  /**
297
306
  * Name of the loader ("gltf")
298
307
  */
@@ -303,17 +312,54 @@ export declare class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAs
303
312
  * Disposes the loader, releases resources during load, and cancels any outstanding requests.
304
313
  */
305
314
  dispose(): void;
306
- /** @hidden */
315
+ /**
316
+ * @param scene
317
+ * @param fileOrUrl
318
+ * @param onSuccess
319
+ * @param onProgress
320
+ * @param useArrayBuffer
321
+ * @param onError
322
+ * @hidden
323
+ */
307
324
  loadFile(scene: Scene, fileOrUrl: File | string, onSuccess: (data: any, responseURL?: string) => void, onProgress?: (ev: ISceneLoaderProgressEvent) => void, useArrayBuffer?: boolean, onError?: (request?: WebRequest, exception?: LoadFileError) => void): IFileRequest;
308
- /** @hidden */
325
+ /**
326
+ * @param meshesNames
327
+ * @param scene
328
+ * @param data
329
+ * @param rootUrl
330
+ * @param onProgress
331
+ * @param fileName
332
+ * @hidden
333
+ */
309
334
  importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
310
- /** @hidden */
335
+ /**
336
+ * @param scene
337
+ * @param data
338
+ * @param rootUrl
339
+ * @param onProgress
340
+ * @param fileName
341
+ * @hidden
342
+ */
311
343
  loadAsync(scene: Scene, data: any, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<void>;
312
- /** @hidden */
344
+ /**
345
+ * @param scene
346
+ * @param data
347
+ * @param rootUrl
348
+ * @param onProgress
349
+ * @param fileName
350
+ * @hidden
351
+ */
313
352
  loadAssetContainerAsync(scene: Scene, data: any, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<AssetContainer>;
314
- /** @hidden */
353
+ /**
354
+ * @param data
355
+ * @hidden
356
+ */
315
357
  canDirectLoad(data: string): boolean;
316
- /** @hidden */
358
+ /**
359
+ * @param scene
360
+ * @param data
361
+ * @hidden
362
+ */
317
363
  directLoad(scene: Scene, data: string): Promise<any>;
318
364
  /**
319
365
  * The callback that allows custom handling of the root url based on the response url.
@@ -337,9 +383,20 @@ export declare class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAs
337
383
  * @returns a promise that resolves when the asset is completely loaded.
338
384
  */
339
385
  whenCompleteAsync(): Promise<void>;
340
- /** @hidden */
386
+ /**
387
+ * @param state
388
+ * @hidden
389
+ */
341
390
  _setState(state: GLTFLoaderState): void;
342
- /** @hidden */
391
+ /**
392
+ * @param scene
393
+ * @param fileOrUrl
394
+ * @param onSuccess
395
+ * @param useArrayBuffer
396
+ * @param onError
397
+ * @param onOpened
398
+ * @hidden
399
+ */
343
400
  _loadFile(scene: Scene, fileOrUrl: File | string, onSuccess: (data: string | ArrayBuffer) => void, useArrayBuffer?: boolean, onError?: (request?: WebRequest) => void, onOpened?: (request: WebRequest) => void): IFileRequest;
344
401
  private _onProgress;
345
402
  private _validate;
@@ -355,7 +412,10 @@ export declare class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAs
355
412
  private _loggingEnabled;
356
413
  /** @hidden */
357
414
  _log: (message: string) => void;
358
- /** @hidden */
415
+ /**
416
+ * @param message
417
+ * @hidden
418
+ */
359
419
  _logOpen(message: string): void;
360
420
  /** @hidden */
361
421
  _logClose(): void;