babylonjs-serializers 8.47.0 → 8.47.1
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 +1 -1
- package/babylon.glTF2Serializer.min.js +1 -1
- package/babylon.glTF2Serializer.min.js.map +1 -1
- package/babylonjs.serializers.d.ts +63 -1
- package/babylonjs.serializers.js +1 -1
- package/babylonjs.serializers.min.js +1 -1
- package/babylonjs.serializers.min.js.map +1 -1
- package/babylonjs.serializers.module.d.ts +138 -2
- package/package.json +4 -4
|
@@ -900,7 +900,9 @@ export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_specular"
|
|
|
900
900
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_transmission";
|
|
901
901
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_unlit";
|
|
902
902
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_volume";
|
|
903
|
+
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_volume_scatter";
|
|
903
904
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_diffuse_roughness";
|
|
905
|
+
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_openpbr";
|
|
904
906
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_texture_transform";
|
|
905
907
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_texture_basisu";
|
|
906
908
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/EXT_texture_webp";
|
|
@@ -949,6 +951,49 @@ export class KHR_texture_basisu implements IGLTFExporterExtensionV2 {
|
|
|
949
951
|
postExportTexture(_: string, textureInfo: BABYLON.GLTF2.ITextureInfo): void;
|
|
950
952
|
}
|
|
951
953
|
|
|
954
|
+
}
|
|
955
|
+
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_volume_scatter" {
|
|
956
|
+
import { IMaterial } from "babylonjs-gltf2interface";
|
|
957
|
+
import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
|
|
958
|
+
import { GLTFExporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
|
|
959
|
+
import { Material } from "babylonjs/Materials/material";
|
|
960
|
+
import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
961
|
+
/**
|
|
962
|
+
* TODO: In-progress specification
|
|
963
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/7ea427ed55d44427e83c0a6d1c87068b1a4151c5/extensions/2.0/Khronos/KHR_materials_volume_scatter/README.md)
|
|
964
|
+
*/
|
|
965
|
+
export class KHR_materials_volume_scatter implements IGLTFExporterExtensionV2 {
|
|
966
|
+
/** Name of this extension */
|
|
967
|
+
readonly name: string;
|
|
968
|
+
/** Defines whether this extension is enabled */
|
|
969
|
+
enabled: boolean;
|
|
970
|
+
/** Defines whether this extension is required */
|
|
971
|
+
required: boolean;
|
|
972
|
+
private _exporter;
|
|
973
|
+
private _wasUsed;
|
|
974
|
+
constructor(exporter: GLTFExporter);
|
|
975
|
+
dispose(): void;
|
|
976
|
+
/** @internal */
|
|
977
|
+
get wasUsed(): boolean;
|
|
978
|
+
/**
|
|
979
|
+
* After exporting a material, deal with additional textures
|
|
980
|
+
* @param context GLTF context of the material
|
|
981
|
+
* @param node exported GLTF node
|
|
982
|
+
* @param babylonMaterial corresponding babylon material
|
|
983
|
+
* @returns array of additional textures to export
|
|
984
|
+
*/
|
|
985
|
+
postExportMaterialAdditionalTexturesAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
986
|
+
private _isExtensionEnabled;
|
|
987
|
+
/**
|
|
988
|
+
* After exporting a material
|
|
989
|
+
* @param context GLTF context of the material
|
|
990
|
+
* @param node exported GLTF node
|
|
991
|
+
* @param babylonMaterial corresponding babylon material
|
|
992
|
+
* @returns promise that resolves with the updated node
|
|
993
|
+
*/
|
|
994
|
+
postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
|
|
995
|
+
}
|
|
996
|
+
|
|
952
997
|
}
|
|
953
998
|
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_volume" {
|
|
954
999
|
import { IMaterial } from "babylonjs-gltf2interface";
|
|
@@ -1048,7 +1093,6 @@ export class KHR_materials_transmission implements IGLTFExporterExtensionV2 {
|
|
|
1048
1093
|
*/
|
|
1049
1094
|
postExportMaterialAdditionalTexturesAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
1050
1095
|
private _isExtensionEnabled;
|
|
1051
|
-
private _hasTexturesExtension;
|
|
1052
1096
|
/**
|
|
1053
1097
|
* After exporting a material
|
|
1054
1098
|
* @param context GLTF context of the material
|
|
@@ -1130,6 +1174,36 @@ export class KHR_materials_sheen implements IGLTFExporterExtensionV2 {
|
|
|
1130
1174
|
postExportMaterialAsync(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
|
|
1131
1175
|
}
|
|
1132
1176
|
|
|
1177
|
+
}
|
|
1178
|
+
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_openpbr" {
|
|
1179
|
+
import { IMaterial } from "babylonjs-gltf2interface";
|
|
1180
|
+
import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
|
|
1181
|
+
import { Material } from "babylonjs/Materials/material";
|
|
1182
|
+
/**
|
|
1183
|
+
* TODO: Add link to specification. Specification still being drafted.
|
|
1184
|
+
* @experimental
|
|
1185
|
+
*/
|
|
1186
|
+
export class KHR_materials_openpbr implements IGLTFExporterExtensionV2 {
|
|
1187
|
+
/** Name of this extension */
|
|
1188
|
+
readonly name: string;
|
|
1189
|
+
/** Defines whether this extension is enabled */
|
|
1190
|
+
enabled: boolean;
|
|
1191
|
+
/** Defines whether this extension is required */
|
|
1192
|
+
required: boolean;
|
|
1193
|
+
private _wasUsed;
|
|
1194
|
+
dispose(): void;
|
|
1195
|
+
/** @internal */
|
|
1196
|
+
get wasUsed(): boolean;
|
|
1197
|
+
/**
|
|
1198
|
+
* After exporting a material
|
|
1199
|
+
* @param context GLTF context of the material
|
|
1200
|
+
* @param node exported GLTF node
|
|
1201
|
+
* @param babylonMaterial corresponding babylon material
|
|
1202
|
+
* @returns promise that resolves with the updated node
|
|
1203
|
+
*/
|
|
1204
|
+
postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1133
1207
|
}
|
|
1134
1208
|
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_iridescence" {
|
|
1135
1209
|
import { IMaterial } from "babylonjs-gltf2interface";
|
|
@@ -2638,6 +2712,43 @@ declare module BABYLON {
|
|
|
2638
2712
|
}
|
|
2639
2713
|
|
|
2640
2714
|
|
|
2715
|
+
/**
|
|
2716
|
+
* TODO: In-progress specification
|
|
2717
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/7ea427ed55d44427e83c0a6d1c87068b1a4151c5/extensions/2.0/Khronos/KHR_materials_volume_scatter/README.md)
|
|
2718
|
+
*/
|
|
2719
|
+
export class KHR_materials_volume_scatter implements IGLTFExporterExtensionV2 {
|
|
2720
|
+
/** Name of this extension */
|
|
2721
|
+
readonly name = "KHR_materials_volume_scatter";
|
|
2722
|
+
/** Defines whether this extension is enabled */
|
|
2723
|
+
enabled: boolean;
|
|
2724
|
+
/** Defines whether this extension is required */
|
|
2725
|
+
required: boolean;
|
|
2726
|
+
private _exporter;
|
|
2727
|
+
private _wasUsed;
|
|
2728
|
+
constructor(exporter: GLTFExporter);
|
|
2729
|
+
dispose(): void;
|
|
2730
|
+
/** @internal */
|
|
2731
|
+
get wasUsed(): boolean;
|
|
2732
|
+
/**
|
|
2733
|
+
* After exporting a material, deal with additional textures
|
|
2734
|
+
* @param context GLTF context of the material
|
|
2735
|
+
* @param node exported GLTF node
|
|
2736
|
+
* @param babylonMaterial corresponding babylon material
|
|
2737
|
+
* @returns array of additional textures to export
|
|
2738
|
+
*/
|
|
2739
|
+
postExportMaterialAdditionalTexturesAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
2740
|
+
private _isExtensionEnabled;
|
|
2741
|
+
/**
|
|
2742
|
+
* After exporting a material
|
|
2743
|
+
* @param context GLTF context of the material
|
|
2744
|
+
* @param node exported GLTF node
|
|
2745
|
+
* @param babylonMaterial corresponding babylon material
|
|
2746
|
+
* @returns promise that resolves with the updated node
|
|
2747
|
+
*/
|
|
2748
|
+
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
|
|
2641
2752
|
/**
|
|
2642
2753
|
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_volume/README.md)
|
|
2643
2754
|
*/
|
|
@@ -2720,7 +2831,6 @@ declare module BABYLON {
|
|
|
2720
2831
|
*/
|
|
2721
2832
|
postExportMaterialAdditionalTexturesAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
2722
2833
|
private _isExtensionEnabled;
|
|
2723
|
-
private _hasTexturesExtension;
|
|
2724
2834
|
/**
|
|
2725
2835
|
* After exporting a material
|
|
2726
2836
|
* @param context GLTF context of the material
|
|
@@ -2791,6 +2901,32 @@ declare module BABYLON {
|
|
|
2791
2901
|
}
|
|
2792
2902
|
|
|
2793
2903
|
|
|
2904
|
+
/**
|
|
2905
|
+
* TODO: Add link to specification. Specification still being drafted.
|
|
2906
|
+
* @experimental
|
|
2907
|
+
*/
|
|
2908
|
+
export class KHR_materials_openpbr implements IGLTFExporterExtensionV2 {
|
|
2909
|
+
/** Name of this extension */
|
|
2910
|
+
readonly name = "KHR_materials_openpbr";
|
|
2911
|
+
/** Defines whether this extension is enabled */
|
|
2912
|
+
enabled: boolean;
|
|
2913
|
+
/** Defines whether this extension is required */
|
|
2914
|
+
required: boolean;
|
|
2915
|
+
private _wasUsed;
|
|
2916
|
+
dispose(): void;
|
|
2917
|
+
/** @internal */
|
|
2918
|
+
get wasUsed(): boolean;
|
|
2919
|
+
/**
|
|
2920
|
+
* After exporting a material
|
|
2921
|
+
* @param context GLTF context of the material
|
|
2922
|
+
* @param node exported GLTF node
|
|
2923
|
+
* @param babylonMaterial corresponding babylon material
|
|
2924
|
+
* @returns promise that resolves with the updated node
|
|
2925
|
+
*/
|
|
2926
|
+
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
|
|
2794
2930
|
/**
|
|
2795
2931
|
* @internal
|
|
2796
2932
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-serializers",
|
|
3
|
-
"version": "8.47.
|
|
3
|
+
"version": "8.47.1",
|
|
4
4
|
"main": "babylonjs.serializers.min.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": "
|
|
19
|
-
"babylonjs-gltf2interface": "
|
|
18
|
+
"babylonjs": "8.47.1",
|
|
19
|
+
"babylonjs-gltf2interface": "8.47.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@dev/build-tools": "1.0.0",
|
|
@@ -45,4 +45,4 @@
|
|
|
45
45
|
"bugs": {
|
|
46
46
|
"url": "https://github.com/BabylonJS/Babylon.js/issues"
|
|
47
47
|
}
|
|
48
|
-
}
|
|
48
|
+
}
|