babylonjs-serializers 5.2.0 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,10 @@ export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_clearcoat
6
6
  export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_iridescence";
7
7
  export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_sheen";
8
8
  export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_unlit";
9
+ export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_ior";
9
10
  export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_specular";
11
+ export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_volume";
12
+ export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_transmission";
10
13
 
11
14
  }
12
15
  declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_lights_punctual" {
@@ -79,6 +82,30 @@ export class KHR_materials_clearcoat implements IGLTFExporterExtensionV2 {
79
82
  postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
80
83
  }
81
84
 
85
+ }
86
+ declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_ior" {
87
+ import { IMaterial } from "babylonjs-gltf2interface";
88
+ import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
89
+ import { Material } from "babylonjs/Materials/material";
90
+ /**
91
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_ior/README.md)
92
+ */
93
+ export class KHR_materials_ior implements IGLTFExporterExtensionV2 {
94
+ /** Name of this extension */
95
+ readonly name: string;
96
+ /** Defines whether this extension is enabled */
97
+ enabled: boolean;
98
+ /** Defines whether this extension is required */
99
+ required: boolean;
100
+ private _wasUsed;
101
+ constructor();
102
+ dispose(): void;
103
+ /** @hidden */
104
+ get wasUsed(): boolean;
105
+ private _isExtensionEnabled;
106
+ postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
107
+ }
108
+
82
109
  }
83
110
  declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_iridescence" {
84
111
  import { IMaterial } from "babylonjs-gltf2interface";
@@ -162,6 +189,35 @@ export class KHR_materials_specular implements IGLTFExporterExtensionV2 {
162
189
  postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
163
190
  }
164
191
 
192
+ }
193
+ declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_transmission" {
194
+ import { IMaterial } from "babylonjs-gltf2interface";
195
+ import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
196
+ import { _Exporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
197
+ import { Material } from "babylonjs/Materials/material";
198
+ import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
199
+ /**
200
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_transmission/README.md)
201
+ */
202
+ export class KHR_materials_transmission implements IGLTFExporterExtensionV2 {
203
+ /** Name of this extension */
204
+ readonly name: string;
205
+ /** Defines whether this extension is enabled */
206
+ enabled: boolean;
207
+ /** Defines whether this extension is required */
208
+ required: boolean;
209
+ private _exporter;
210
+ private _wasUsed;
211
+ constructor(exporter: _Exporter);
212
+ dispose(): void;
213
+ /** @hidden */
214
+ get wasUsed(): boolean;
215
+ postExportMaterialAdditionalTextures?(context: string, node: IMaterial, babylonMaterial: Material): BaseTexture[];
216
+ private _isExtensionEnabled;
217
+ private _hasTexturesExtension;
218
+ postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
219
+ }
220
+
165
221
  }
166
222
  declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_unlit" {
167
223
  import { IMaterial } from "babylonjs-gltf2interface";
@@ -185,6 +241,35 @@ export class KHR_materials_unlit implements IGLTFExporterExtensionV2 {
185
241
  postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
186
242
  }
187
243
 
244
+ }
245
+ declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_volume" {
246
+ import { IMaterial } from "babylonjs-gltf2interface";
247
+ import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
248
+ import { _Exporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
249
+ import { Material } from "babylonjs/Materials/material";
250
+ import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
251
+ /**
252
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_volume/README.md)
253
+ */
254
+ export class KHR_materials_volume implements IGLTFExporterExtensionV2 {
255
+ /** Name of this extension */
256
+ readonly name: string;
257
+ /** Defines whether this extension is enabled */
258
+ enabled: boolean;
259
+ /** Defines whether this extension is required */
260
+ required: boolean;
261
+ private _exporter;
262
+ private _wasUsed;
263
+ constructor(exporter: _Exporter);
264
+ dispose(): void;
265
+ /** @hidden */
266
+ get wasUsed(): boolean;
267
+ postExportMaterialAdditionalTextures?(context: string, node: IMaterial, babylonMaterial: Material): BaseTexture[];
268
+ private _isExtensionEnabled;
269
+ private _hasTexturesExtension;
270
+ postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
271
+ }
272
+
188
273
  }
189
274
  declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_texture_transform" {
190
275
  import { ITextureInfo } from "babylonjs-gltf2interface";
@@ -995,7 +1080,6 @@ import { _Exporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
995
1080
  import { Material } from "babylonjs/Materials/material";
996
1081
  import { StandardMaterial } from "babylonjs/Materials/standardMaterial";
997
1082
  import { PBRBaseMaterial } from "babylonjs/Materials/PBR/pbrBaseMaterial";
998
- import { PBRMetallicRoughnessMaterial } from "babylonjs/Materials/PBR/pbrMetallicRoughnessMaterial";
999
1083
  /**
1000
1084
  * Utility methods for working with glTF material conversion properties. This class should only be used internally
1001
1085
  * @hidden
@@ -1077,13 +1161,6 @@ export class _GLTFMaterialExporter {
1077
1161
  */
1078
1162
  _convertStandardMaterialAsync(babylonStandardMaterial: StandardMaterial, mimeType: ImageMimeType, hasTextureCoords: boolean): Promise<IMaterial>;
1079
1163
  private _finishMaterial;
1080
- /**
1081
- * Converts a Babylon PBR Metallic Roughness Material to a glTF Material
1082
- * @param babylonPBRMetalRoughMaterial BJS PBR Metallic Roughness Material
1083
- * @param mimeType mime type to use for the textures
1084
- * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
1085
- */
1086
- _convertPBRMetallicRoughnessMaterialAsync(babylonPBRMetalRoughMaterial: PBRMetallicRoughnessMaterial, mimeType: ImageMimeType, hasTextureCoords: boolean): Promise<IMaterial>;
1087
1164
  /**
1088
1165
  * Converts an image typed array buffer to a base64 image
1089
1166
  * @param buffer typed array buffer
@@ -1555,6 +1632,26 @@ declare module BABYLON {
1555
1632
  }
1556
1633
 
1557
1634
 
1635
+ /**
1636
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_ior/README.md)
1637
+ */
1638
+ export class KHR_materials_ior implements IGLTFExporterExtensionV2 {
1639
+ /** Name of this extension */
1640
+ readonly name = "KHR_materials_ior";
1641
+ /** Defines whether this extension is enabled */
1642
+ enabled: boolean;
1643
+ /** Defines whether this extension is required */
1644
+ required: boolean;
1645
+ private _wasUsed;
1646
+ constructor();
1647
+ dispose(): void;
1648
+ /** @hidden */
1649
+ get wasUsed(): boolean;
1650
+ private _isExtensionEnabled;
1651
+ postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
1652
+ }
1653
+
1654
+
1558
1655
  /**
1559
1656
  * @hidden
1560
1657
  */
@@ -1620,6 +1717,29 @@ declare module BABYLON {
1620
1717
  }
1621
1718
 
1622
1719
 
1720
+ /**
1721
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_transmission/README.md)
1722
+ */
1723
+ export class KHR_materials_transmission implements IGLTFExporterExtensionV2 {
1724
+ /** Name of this extension */
1725
+ readonly name = "KHR_materials_transmission";
1726
+ /** Defines whether this extension is enabled */
1727
+ enabled: boolean;
1728
+ /** Defines whether this extension is required */
1729
+ required: boolean;
1730
+ private _exporter;
1731
+ private _wasUsed;
1732
+ constructor(exporter: _Exporter);
1733
+ dispose(): void;
1734
+ /** @hidden */
1735
+ get wasUsed(): boolean;
1736
+ postExportMaterialAdditionalTextures?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): BaseTexture[];
1737
+ private _isExtensionEnabled;
1738
+ private _hasTexturesExtension;
1739
+ postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
1740
+ }
1741
+
1742
+
1623
1743
  /**
1624
1744
  * @hidden
1625
1745
  */
@@ -1639,6 +1759,29 @@ declare module BABYLON {
1639
1759
  }
1640
1760
 
1641
1761
 
1762
+ /**
1763
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_volume/README.md)
1764
+ */
1765
+ export class KHR_materials_volume implements IGLTFExporterExtensionV2 {
1766
+ /** Name of this extension */
1767
+ readonly name = "KHR_materials_volume";
1768
+ /** Defines whether this extension is enabled */
1769
+ enabled: boolean;
1770
+ /** Defines whether this extension is required */
1771
+ required: boolean;
1772
+ private _exporter;
1773
+ private _wasUsed;
1774
+ constructor(exporter: _Exporter);
1775
+ dispose(): void;
1776
+ /** @hidden */
1777
+ get wasUsed(): boolean;
1778
+ postExportMaterialAdditionalTextures?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): BaseTexture[];
1779
+ private _isExtensionEnabled;
1780
+ private _hasTexturesExtension;
1781
+ postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
1782
+ }
1783
+
1784
+
1642
1785
  /**
1643
1786
  * @hidden
1644
1787
  */
@@ -2477,13 +2620,6 @@ declare module BABYLON {
2477
2620
  */
2478
2621
  _convertStandardMaterialAsync(babylonStandardMaterial: StandardMaterial, mimeType: BABYLON.GLTF2.ImageMimeType, hasTextureCoords: boolean): Promise<BABYLON.GLTF2.IMaterial>;
2479
2622
  private _finishMaterial;
2480
- /**
2481
- * Converts a Babylon PBR Metallic Roughness Material to a glTF Material
2482
- * @param babylonPBRMetalRoughMaterial BJS PBR Metallic Roughness Material
2483
- * @param mimeType mime type to use for the textures
2484
- * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
2485
- */
2486
- _convertPBRMetallicRoughnessMaterialAsync(babylonPBRMetalRoughMaterial: PBRMetallicRoughnessMaterial, mimeType: BABYLON.GLTF2.ImageMimeType, hasTextureCoords: boolean): Promise<BABYLON.GLTF2.IMaterial>;
2487
2623
  /**
2488
2624
  * Converts an image typed array buffer to a base64 image
2489
2625
  * @param buffer typed array buffer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-serializers",
3
- "version": "5.2.0",
3
+ "version": "5.5.0",
4
4
  "main": "babylonjs.serializers.js",
5
5
  "types": "babylonjs.serializers.module.d.ts",
6
6
  "files": [
@@ -14,8 +14,8 @@
14
14
  "clean": "rimraf dist && rimraf babylon*.*"
15
15
  },
16
16
  "dependencies": {
17
- "babylonjs": "^5.2.0",
18
- "babylonjs-gltf2interface": "^5.2.0"
17
+ "babylonjs": "^5.5.0",
18
+ "babylonjs-gltf2interface": "^5.5.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@dev/build-tools": "1.0.0",