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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) 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/package.json +23 -198
  173. package/readme.md +2 -2
@@ -1,75 +1,109 @@
1
- import { Nullable } from "@babylonjs/core/types";
2
- import { Observable } from "@babylonjs/core/Misc/observable";
3
- import { Material } from "@babylonjs/core/Materials/material";
4
- import { TransformNode } from "@babylonjs/core/Meshes/transformNode";
5
- import { Mesh } from "@babylonjs/core/Meshes/mesh";
6
- import { INode, IMaterial, IBuffer, IScene } from "../glTFLoaderInterfaces";
7
- import { IGLTFLoaderExtension } from "../glTFLoaderExtension";
8
- import { GLTFLoader } from "../glTFLoader";
9
- import { IProperty } from "babylonjs-gltf2interface";
10
- /**
11
- * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
12
- */
13
- export declare class MSFT_lod implements IGLTFLoaderExtension {
14
- /**
15
- * The name of this extension.
16
- */
17
- readonly name = "MSFT_lod";
18
- /**
19
- * Defines whether this extension is enabled.
20
- */
21
- enabled: boolean;
22
- /**
23
- * Defines a number that determines the order the extensions are applied.
24
- */
25
- order: number;
26
- /**
27
- * Maximum number of LODs to load, starting from the lowest LOD.
28
- */
29
- maxLODsToLoad: number;
30
- /**
31
- * Observable raised when all node LODs of one level are loaded.
32
- * The event data is the index of the loaded LOD starting from zero.
33
- * Dispose the loader to cancel the loading of the next level of LODs.
34
- */
35
- onNodeLODsLoadedObservable: Observable<number>;
36
- /**
37
- * Observable raised when all material LODs of one level are loaded.
38
- * The event data is the index of the loaded LOD starting from zero.
39
- * Dispose the loader to cancel the loading of the next level of LODs.
40
- */
41
- onMaterialLODsLoadedObservable: Observable<number>;
42
- private _loader;
43
- private _bufferLODs;
44
- private _nodeIndexLOD;
45
- private _nodeSignalLODs;
46
- private _nodePromiseLODs;
47
- private _nodeBufferLODs;
48
- private _materialIndexLOD;
49
- private _materialSignalLODs;
50
- private _materialPromiseLODs;
51
- private _materialBufferLODs;
52
- /** @hidden */
53
- constructor(loader: GLTFLoader);
54
- /** @hidden */
55
- dispose(): void;
56
- /** @hidden */
57
- onReady(): void;
58
- /** @hidden */
59
- loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
60
- /** @hidden */
61
- loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
62
- /** @hidden */
63
- _loadMaterialAsync(context: string, material: IMaterial, babylonMesh: Nullable<Mesh>, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
64
- /** @hidden */
65
- _loadUriAsync(context: string, property: IProperty, uri: string): Nullable<Promise<ArrayBufferView>>;
66
- /** @hidden */
67
- loadBufferAsync(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Nullable<Promise<ArrayBufferView>>;
68
- private _loadBufferLOD;
69
- /**
70
- * Gets an array of LOD properties from lowest to highest.
71
- */
72
- private _getLODs;
73
- private _disposeTransformNode;
74
- private _disposeMaterials;
75
- }
1
+ import type { Nullable } from "@babylonjs/core/types.js";
2
+ import { Observable } from "@babylonjs/core/Misc/observable.js";
3
+ import type { Material } from "@babylonjs/core/Materials/material.js";
4
+ import type { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
5
+ import type { Mesh } from "@babylonjs/core/Meshes/mesh.js";
6
+ import type { INode, IMaterial, IBuffer, IScene } from "../glTFLoaderInterfaces";
7
+ import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
8
+ import { GLTFLoader } from "../glTFLoader";
9
+ import type { IProperty } from "babylonjs-gltf2interface";
10
+ /**
11
+ * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
12
+ */
13
+ export declare class MSFT_lod implements IGLTFLoaderExtension {
14
+ /**
15
+ * The name of this extension.
16
+ */
17
+ readonly name = "MSFT_lod";
18
+ /**
19
+ * Defines whether this extension is enabled.
20
+ */
21
+ enabled: boolean;
22
+ /**
23
+ * Defines a number that determines the order the extensions are applied.
24
+ */
25
+ order: number;
26
+ /**
27
+ * Maximum number of LODs to load, starting from the lowest LOD.
28
+ */
29
+ maxLODsToLoad: number;
30
+ /**
31
+ * Observable raised when all node LODs of one level are loaded.
32
+ * The event data is the index of the loaded LOD starting from zero.
33
+ * Dispose the loader to cancel the loading of the next level of LODs.
34
+ */
35
+ onNodeLODsLoadedObservable: Observable<number>;
36
+ /**
37
+ * Observable raised when all material LODs of one level are loaded.
38
+ * The event data is the index of the loaded LOD starting from zero.
39
+ * Dispose the loader to cancel the loading of the next level of LODs.
40
+ */
41
+ onMaterialLODsLoadedObservable: Observable<number>;
42
+ private _loader;
43
+ private _bufferLODs;
44
+ private _nodeIndexLOD;
45
+ private _nodeSignalLODs;
46
+ private _nodePromiseLODs;
47
+ private _nodeBufferLODs;
48
+ private _materialIndexLOD;
49
+ private _materialSignalLODs;
50
+ private _materialPromiseLODs;
51
+ private _materialBufferLODs;
52
+ /**
53
+ * @param loader
54
+ * @hidden
55
+ */
56
+ constructor(loader: GLTFLoader);
57
+ /** @hidden */
58
+ dispose(): void;
59
+ /** @hidden */
60
+ onReady(): void;
61
+ /**
62
+ * @param context
63
+ * @param scene
64
+ * @hidden
65
+ */
66
+ loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
67
+ /**
68
+ * @param context
69
+ * @param node
70
+ * @param assign
71
+ * @hidden
72
+ */
73
+ loadNodeAsync(context: string, node: INode, assign: (babylonTransformNode: TransformNode) => void): Nullable<Promise<TransformNode>>;
74
+ /**
75
+ * @param context
76
+ * @param material
77
+ * @param babylonMesh
78
+ * @param babylonDrawMode
79
+ * @param assign
80
+ * @hidden
81
+ */
82
+ _loadMaterialAsync(context: string, material: IMaterial, babylonMesh: Nullable<Mesh>, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
83
+ /**
84
+ * @param context
85
+ * @param property
86
+ * @param uri
87
+ * @hidden
88
+ */
89
+ _loadUriAsync(context: string, property: IProperty, uri: string): Nullable<Promise<ArrayBufferView>>;
90
+ /**
91
+ * @param context
92
+ * @param buffer
93
+ * @param byteOffset
94
+ * @param byteLength
95
+ * @hidden
96
+ */
97
+ loadBufferAsync(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Nullable<Promise<ArrayBufferView>>;
98
+ private _loadBufferLOD;
99
+ /**
100
+ * Gets an array of LOD properties from lowest to highest.
101
+ * @param context
102
+ * @param property
103
+ * @param array
104
+ * @param ids
105
+ */
106
+ private _getLODs;
107
+ private _disposeTransformNode;
108
+ private _disposeMaterials;
109
+ }