babylonjs-serializers 5.0.4 → 5.3.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.
@@ -3,8 +3,10 @@ declare module "babylonjs-serializers/glTF/2.0/Extensions/index" {
3
3
  export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_texture_transform";
4
4
  export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_lights_punctual";
5
5
  export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_clearcoat";
6
+ export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_iridescence";
6
7
  export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_sheen";
7
8
  export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_unlit";
9
+ export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_specular";
8
10
 
9
11
  }
10
12
  declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_lights_punctual" {
@@ -77,6 +79,33 @@ export class KHR_materials_clearcoat implements IGLTFExporterExtensionV2 {
77
79
  postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
78
80
  }
79
81
 
82
+ }
83
+ declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_iridescence" {
84
+ import { IMaterial } from "babylonjs-gltf2interface";
85
+ import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
86
+ import { _Exporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
87
+ import { Material } from "babylonjs/Materials/material";
88
+ import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
89
+ /**
90
+ * @hidden
91
+ */
92
+ export class KHR_materials_iridescence implements IGLTFExporterExtensionV2 {
93
+ /** Name of this extension */
94
+ readonly name: string;
95
+ /** Defines whether this extension is enabled */
96
+ enabled: boolean;
97
+ /** Defines whether this extension is required */
98
+ required: boolean;
99
+ private _exporter;
100
+ private _wasUsed;
101
+ constructor(exporter: _Exporter);
102
+ dispose(): void;
103
+ /** @hidden */
104
+ get wasUsed(): boolean;
105
+ postExportMaterialAdditionalTextures?(context: string, node: IMaterial, babylonMaterial: Material): BaseTexture[];
106
+ postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
107
+ }
108
+
80
109
  }
81
110
  declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_sheen" {
82
111
  import { IMaterial } from "babylonjs-gltf2interface";
@@ -104,6 +133,35 @@ export class KHR_materials_sheen implements IGLTFExporterExtensionV2 {
104
133
  postExportMaterialAsync(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
105
134
  }
106
135
 
136
+ }
137
+ declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_specular" {
138
+ import { IMaterial } from "babylonjs-gltf2interface";
139
+ import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
140
+ import { _Exporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
141
+ import { Material } from "babylonjs/Materials/material";
142
+ import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
143
+ /**
144
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md)
145
+ */
146
+ export class KHR_materials_specular implements IGLTFExporterExtensionV2 {
147
+ /** Name of this extension */
148
+ readonly name: string;
149
+ /** Defines whether this extension is enabled */
150
+ enabled: boolean;
151
+ /** Defines whether this extension is required */
152
+ required: boolean;
153
+ private _exporter;
154
+ private _wasUsed;
155
+ constructor(exporter: _Exporter);
156
+ dispose(): void;
157
+ /** @hidden */
158
+ get wasUsed(): boolean;
159
+ postExportMaterialAdditionalTextures?(context: string, node: IMaterial, babylonMaterial: Material): BaseTexture[];
160
+ private _isExtensionEnabled;
161
+ private _hasTexturesExtension;
162
+ postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
163
+ }
164
+
107
165
  }
108
166
  declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_unlit" {
109
167
  import { IMaterial } from "babylonjs-gltf2interface";
@@ -937,7 +995,6 @@ import { _Exporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
937
995
  import { Material } from "babylonjs/Materials/material";
938
996
  import { StandardMaterial } from "babylonjs/Materials/standardMaterial";
939
997
  import { PBRBaseMaterial } from "babylonjs/Materials/PBR/pbrBaseMaterial";
940
- import { PBRMetallicRoughnessMaterial } from "babylonjs/Materials/PBR/pbrMetallicRoughnessMaterial";
941
998
  /**
942
999
  * Utility methods for working with glTF material conversion properties. This class should only be used internally
943
1000
  * @hidden
@@ -1019,13 +1076,6 @@ export class _GLTFMaterialExporter {
1019
1076
  */
1020
1077
  _convertStandardMaterialAsync(babylonStandardMaterial: StandardMaterial, mimeType: ImageMimeType, hasTextureCoords: boolean): Promise<IMaterial>;
1021
1078
  private _finishMaterial;
1022
- /**
1023
- * Converts a Babylon PBR Metallic Roughness Material to a glTF Material
1024
- * @param babylonPBRMetalRoughMaterial BJS PBR Metallic Roughness Material
1025
- * @param mimeType mime type to use for the textures
1026
- * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
1027
- */
1028
- _convertPBRMetallicRoughnessMaterialAsync(babylonPBRMetalRoughMaterial: PBRMetallicRoughnessMaterial, mimeType: ImageMimeType, hasTextureCoords: boolean): Promise<IMaterial>;
1029
1079
  /**
1030
1080
  * Converts an image typed array buffer to a base64 image
1031
1081
  * @param buffer typed array buffer
@@ -1497,6 +1547,27 @@ declare module BABYLON {
1497
1547
  }
1498
1548
 
1499
1549
 
1550
+ /**
1551
+ * @hidden
1552
+ */
1553
+ export class KHR_materials_iridescence implements IGLTFExporterExtensionV2 {
1554
+ /** Name of this extension */
1555
+ readonly name = "KHR_materials_iridescence";
1556
+ /** Defines whether this extension is enabled */
1557
+ enabled: boolean;
1558
+ /** Defines whether this extension is required */
1559
+ required: boolean;
1560
+ private _exporter;
1561
+ private _wasUsed;
1562
+ constructor(exporter: _Exporter);
1563
+ dispose(): void;
1564
+ /** @hidden */
1565
+ get wasUsed(): boolean;
1566
+ postExportMaterialAdditionalTextures?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): BaseTexture[];
1567
+ postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
1568
+ }
1569
+
1570
+
1500
1571
  /**
1501
1572
  * @hidden
1502
1573
  */
@@ -1518,6 +1589,29 @@ declare module BABYLON {
1518
1589
  }
1519
1590
 
1520
1591
 
1592
+ /**
1593
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md)
1594
+ */
1595
+ export class KHR_materials_specular implements IGLTFExporterExtensionV2 {
1596
+ /** Name of this extension */
1597
+ readonly name = "KHR_materials_specular";
1598
+ /** Defines whether this extension is enabled */
1599
+ enabled: boolean;
1600
+ /** Defines whether this extension is required */
1601
+ required: boolean;
1602
+ private _exporter;
1603
+ private _wasUsed;
1604
+ constructor(exporter: _Exporter);
1605
+ dispose(): void;
1606
+ /** @hidden */
1607
+ get wasUsed(): boolean;
1608
+ postExportMaterialAdditionalTextures?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): BaseTexture[];
1609
+ private _isExtensionEnabled;
1610
+ private _hasTexturesExtension;
1611
+ postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
1612
+ }
1613
+
1614
+
1521
1615
  /**
1522
1616
  * @hidden
1523
1617
  */
@@ -2375,13 +2469,6 @@ declare module BABYLON {
2375
2469
  */
2376
2470
  _convertStandardMaterialAsync(babylonStandardMaterial: StandardMaterial, mimeType: BABYLON.GLTF2.ImageMimeType, hasTextureCoords: boolean): Promise<BABYLON.GLTF2.IMaterial>;
2377
2471
  private _finishMaterial;
2378
- /**
2379
- * Converts a Babylon PBR Metallic Roughness Material to a glTF Material
2380
- * @param babylonPBRMetalRoughMaterial BJS PBR Metallic Roughness Material
2381
- * @param mimeType mime type to use for the textures
2382
- * @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
2383
- */
2384
- _convertPBRMetallicRoughnessMaterialAsync(babylonPBRMetalRoughMaterial: PBRMetallicRoughnessMaterial, mimeType: BABYLON.GLTF2.ImageMimeType, hasTextureCoords: boolean): Promise<BABYLON.GLTF2.IMaterial>;
2385
2472
  /**
2386
2473
  * Converts an image typed array buffer to a base64 image
2387
2474
  * @param buffer typed array buffer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-serializers",
3
- "version": "5.0.4",
3
+ "version": "5.3.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.0.4",
18
- "babylonjs-gltf2interface": "^5.0.4"
17
+ "babylonjs": "^5.3.0",
18
+ "babylonjs-gltf2interface": "^5.3.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@dev/build-tools": "1.0.0",