babylonjs-serializers 7.2.2 → 7.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.
- package/babylon.glTF2Serializer.js +127 -2
- package/babylon.glTF2Serializer.min.js +1 -1
- package/babylon.glTF2Serializer.min.js.map +1 -1
- package/babylonjs.serializers.d.ts +38 -0
- package/babylonjs.serializers.js +130 -2
- package/babylonjs.serializers.min.js +1 -1
- package/babylonjs.serializers.min.js.map +1 -1
- package/babylonjs.serializers.module.d.ts +83 -0
- package/package.json +3 -3
|
@@ -54,6 +54,7 @@ export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_dispersio
|
|
|
54
54
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_transmission";
|
|
55
55
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/EXT_mesh_gpu_instancing";
|
|
56
56
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_emissive_strength";
|
|
57
|
+
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_diffuse_transmission";
|
|
57
58
|
|
|
58
59
|
}
|
|
59
60
|
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_lights_punctual" {
|
|
@@ -152,6 +153,50 @@ export class KHR_materials_clearcoat implements IGLTFExporterExtensionV2 {
|
|
|
152
153
|
postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
|
|
153
154
|
}
|
|
154
155
|
|
|
156
|
+
}
|
|
157
|
+
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_diffuse_transmission" {
|
|
158
|
+
import { IMaterial } from "babylonjs-gltf2interface";
|
|
159
|
+
import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
|
|
160
|
+
import { _Exporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
|
|
161
|
+
import { Material } from "babylonjs/Materials/material";
|
|
162
|
+
import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
163
|
+
/**
|
|
164
|
+
* [Proposed Specification](https://github.com/KhronosGroup/glTF/pull/1825)
|
|
165
|
+
* !!! Experimental Extension Subject to Changes !!!
|
|
166
|
+
*/
|
|
167
|
+
export class KHR_materials_diffuse_transmission implements IGLTFExporterExtensionV2 {
|
|
168
|
+
/** Name of this extension */
|
|
169
|
+
readonly name: string;
|
|
170
|
+
/** Defines whether this extension is enabled */
|
|
171
|
+
enabled: boolean;
|
|
172
|
+
/** Defines whether this extension is required */
|
|
173
|
+
required: boolean;
|
|
174
|
+
private _exporter;
|
|
175
|
+
private _wasUsed;
|
|
176
|
+
constructor(exporter: _Exporter);
|
|
177
|
+
dispose(): void;
|
|
178
|
+
/** @internal */
|
|
179
|
+
get wasUsed(): boolean;
|
|
180
|
+
/**
|
|
181
|
+
* After exporting a material, deal with additional textures
|
|
182
|
+
* @param context GLTF context of the material
|
|
183
|
+
* @param node exported GLTF node
|
|
184
|
+
* @param babylonMaterial corresponding babylon material
|
|
185
|
+
* @returns array of additional textures to export
|
|
186
|
+
*/
|
|
187
|
+
postExportMaterialAdditionalTextures?(context: string, node: IMaterial, babylonMaterial: Material): BaseTexture[];
|
|
188
|
+
private _isExtensionEnabled;
|
|
189
|
+
private _hasTexturesExtension;
|
|
190
|
+
/**
|
|
191
|
+
* After exporting a material
|
|
192
|
+
* @param context GLTF context of the material
|
|
193
|
+
* @param node exported GLTF node
|
|
194
|
+
* @param babylonMaterial corresponding babylon material
|
|
195
|
+
* @returns promise that resolves with the updated node
|
|
196
|
+
*/
|
|
197
|
+
postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
|
|
198
|
+
}
|
|
199
|
+
|
|
155
200
|
}
|
|
156
201
|
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_dispersion" {
|
|
157
202
|
import { IMaterial } from "babylonjs-gltf2interface";
|
|
@@ -1770,6 +1815,44 @@ declare module BABYLON {
|
|
|
1770
1815
|
}
|
|
1771
1816
|
|
|
1772
1817
|
|
|
1818
|
+
/**
|
|
1819
|
+
* [Proposed Specification](https://github.com/KhronosGroup/glTF/pull/1825)
|
|
1820
|
+
* !!! Experimental Extension Subject to Changes !!!
|
|
1821
|
+
*/
|
|
1822
|
+
export class KHR_materials_diffuse_transmission implements IGLTFExporterExtensionV2 {
|
|
1823
|
+
/** Name of this extension */
|
|
1824
|
+
readonly name = "KHR_materials_diffuse_transmission";
|
|
1825
|
+
/** Defines whether this extension is enabled */
|
|
1826
|
+
enabled: boolean;
|
|
1827
|
+
/** Defines whether this extension is required */
|
|
1828
|
+
required: boolean;
|
|
1829
|
+
private _exporter;
|
|
1830
|
+
private _wasUsed;
|
|
1831
|
+
constructor(exporter: _Exporter);
|
|
1832
|
+
dispose(): void;
|
|
1833
|
+
/** @internal */
|
|
1834
|
+
get wasUsed(): boolean;
|
|
1835
|
+
/**
|
|
1836
|
+
* After exporting a material, deal with additional textures
|
|
1837
|
+
* @param context GLTF context of the material
|
|
1838
|
+
* @param node exported GLTF node
|
|
1839
|
+
* @param babylonMaterial corresponding babylon material
|
|
1840
|
+
* @returns array of additional textures to export
|
|
1841
|
+
*/
|
|
1842
|
+
postExportMaterialAdditionalTextures?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): BaseTexture[];
|
|
1843
|
+
private _isExtensionEnabled;
|
|
1844
|
+
private _hasTexturesExtension;
|
|
1845
|
+
/**
|
|
1846
|
+
* After exporting a material
|
|
1847
|
+
* @param context GLTF context of the material
|
|
1848
|
+
* @param node exported GLTF node
|
|
1849
|
+
* @param babylonMaterial corresponding babylon material
|
|
1850
|
+
* @returns promise that resolves with the updated node
|
|
1851
|
+
*/
|
|
1852
|
+
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
|
|
1773
1856
|
/**
|
|
1774
1857
|
* [Specification](https://github.com/KhronosGroup/glTF/blob/87bd64a7f5e23c84b6aef2e6082069583ed0ddb4/extensions/2.0/Khronos/KHR_materials_dispersion/README.md)
|
|
1775
1858
|
* @experimental
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-serializers",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"main": "babylonjs.serializers.js",
|
|
5
5
|
"types": "babylonjs.serializers.module.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"test:escheck": "es-check es6 ./babylonjs.serializers.js"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"babylonjs": "^7.
|
|
19
|
-
"babylonjs-gltf2interface": "^7.
|
|
18
|
+
"babylonjs": "^7.3.0",
|
|
19
|
+
"babylonjs-gltf2interface": "^7.3.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@dev/build-tools": "1.0.0",
|