babylonjs-serializers 5.1.0 → 5.4.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 +491 -82
- package/babylon.glTF2Serializer.js.map +1 -1
- package/babylon.glTF2Serializer.min.js +1 -1
- package/babylon.glTF2Serializer.min.js.map +1 -1
- package/babylonjs.serializers.d.ts +110 -7
- package/babylonjs.serializers.js +506 -82
- package/babylonjs.serializers.js.map +1 -1
- package/babylonjs.serializers.min.js +1 -1
- package/babylonjs.serializers.min.js.map +1 -1
- package/babylonjs.serializers.module.d.ts +253 -15
- package/package.json +3 -3
|
@@ -61,6 +61,47 @@ declare module BABYLON {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
|
|
64
|
+
/**
|
|
65
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_ior/README.md)
|
|
66
|
+
*/
|
|
67
|
+
export class KHR_materials_ior implements IGLTFExporterExtensionV2 {
|
|
68
|
+
/** Name of this extension */
|
|
69
|
+
readonly name = "KHR_materials_ior";
|
|
70
|
+
/** Defines whether this extension is enabled */
|
|
71
|
+
enabled: boolean;
|
|
72
|
+
/** Defines whether this extension is required */
|
|
73
|
+
required: boolean;
|
|
74
|
+
private _wasUsed;
|
|
75
|
+
constructor();
|
|
76
|
+
dispose(): void;
|
|
77
|
+
/** @hidden */
|
|
78
|
+
get wasUsed(): boolean;
|
|
79
|
+
private _isExtensionEnabled;
|
|
80
|
+
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @hidden
|
|
86
|
+
*/
|
|
87
|
+
export class KHR_materials_iridescence implements IGLTFExporterExtensionV2 {
|
|
88
|
+
/** Name of this extension */
|
|
89
|
+
readonly name = "KHR_materials_iridescence";
|
|
90
|
+
/** Defines whether this extension is enabled */
|
|
91
|
+
enabled: boolean;
|
|
92
|
+
/** Defines whether this extension is required */
|
|
93
|
+
required: boolean;
|
|
94
|
+
private _exporter;
|
|
95
|
+
private _wasUsed;
|
|
96
|
+
constructor(exporter: _Exporter);
|
|
97
|
+
dispose(): void;
|
|
98
|
+
/** @hidden */
|
|
99
|
+
get wasUsed(): boolean;
|
|
100
|
+
postExportMaterialAdditionalTextures?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): BaseTexture[];
|
|
101
|
+
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
64
105
|
/**
|
|
65
106
|
* @hidden
|
|
66
107
|
*/
|
|
@@ -82,6 +123,52 @@ declare module BABYLON {
|
|
|
82
123
|
}
|
|
83
124
|
|
|
84
125
|
|
|
126
|
+
/**
|
|
127
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md)
|
|
128
|
+
*/
|
|
129
|
+
export class KHR_materials_specular implements IGLTFExporterExtensionV2 {
|
|
130
|
+
/** Name of this extension */
|
|
131
|
+
readonly name = "KHR_materials_specular";
|
|
132
|
+
/** Defines whether this extension is enabled */
|
|
133
|
+
enabled: boolean;
|
|
134
|
+
/** Defines whether this extension is required */
|
|
135
|
+
required: boolean;
|
|
136
|
+
private _exporter;
|
|
137
|
+
private _wasUsed;
|
|
138
|
+
constructor(exporter: _Exporter);
|
|
139
|
+
dispose(): void;
|
|
140
|
+
/** @hidden */
|
|
141
|
+
get wasUsed(): boolean;
|
|
142
|
+
postExportMaterialAdditionalTextures?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): BaseTexture[];
|
|
143
|
+
private _isExtensionEnabled;
|
|
144
|
+
private _hasTexturesExtension;
|
|
145
|
+
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_transmission/README.md)
|
|
151
|
+
*/
|
|
152
|
+
export class KHR_materials_transmission implements IGLTFExporterExtensionV2 {
|
|
153
|
+
/** Name of this extension */
|
|
154
|
+
readonly name = "KHR_materials_transmission";
|
|
155
|
+
/** Defines whether this extension is enabled */
|
|
156
|
+
enabled: boolean;
|
|
157
|
+
/** Defines whether this extension is required */
|
|
158
|
+
required: boolean;
|
|
159
|
+
private _exporter;
|
|
160
|
+
private _wasUsed;
|
|
161
|
+
constructor(exporter: _Exporter);
|
|
162
|
+
dispose(): void;
|
|
163
|
+
/** @hidden */
|
|
164
|
+
get wasUsed(): boolean;
|
|
165
|
+
postExportMaterialAdditionalTextures?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): BaseTexture[];
|
|
166
|
+
private _isExtensionEnabled;
|
|
167
|
+
private _hasTexturesExtension;
|
|
168
|
+
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
85
172
|
/**
|
|
86
173
|
* @hidden
|
|
87
174
|
*/
|
|
@@ -101,6 +188,29 @@ declare module BABYLON {
|
|
|
101
188
|
}
|
|
102
189
|
|
|
103
190
|
|
|
191
|
+
/**
|
|
192
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_volume/README.md)
|
|
193
|
+
*/
|
|
194
|
+
export class KHR_materials_volume implements IGLTFExporterExtensionV2 {
|
|
195
|
+
/** Name of this extension */
|
|
196
|
+
readonly name = "KHR_materials_volume";
|
|
197
|
+
/** Defines whether this extension is enabled */
|
|
198
|
+
enabled: boolean;
|
|
199
|
+
/** Defines whether this extension is required */
|
|
200
|
+
required: boolean;
|
|
201
|
+
private _exporter;
|
|
202
|
+
private _wasUsed;
|
|
203
|
+
constructor(exporter: _Exporter);
|
|
204
|
+
dispose(): void;
|
|
205
|
+
/** @hidden */
|
|
206
|
+
get wasUsed(): boolean;
|
|
207
|
+
postExportMaterialAdditionalTextures?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): BaseTexture[];
|
|
208
|
+
private _isExtensionEnabled;
|
|
209
|
+
private _hasTexturesExtension;
|
|
210
|
+
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
104
214
|
/**
|
|
105
215
|
* @hidden
|
|
106
216
|
*/
|
|
@@ -939,13 +1049,6 @@ declare module BABYLON {
|
|
|
939
1049
|
*/
|
|
940
1050
|
_convertStandardMaterialAsync(babylonStandardMaterial: StandardMaterial, mimeType: BABYLON.GLTF2.ImageMimeType, hasTextureCoords: boolean): Promise<BABYLON.GLTF2.IMaterial>;
|
|
941
1051
|
private _finishMaterial;
|
|
942
|
-
/**
|
|
943
|
-
* Converts a Babylon PBR Metallic Roughness Material to a glTF Material
|
|
944
|
-
* @param babylonPBRMetalRoughMaterial BJS PBR Metallic Roughness Material
|
|
945
|
-
* @param mimeType mime type to use for the textures
|
|
946
|
-
* @param hasTextureCoords specifies if texture coordinates are present on the submesh to determine if textures should be applied
|
|
947
|
-
*/
|
|
948
|
-
_convertPBRMetallicRoughnessMaterialAsync(babylonPBRMetalRoughMaterial: PBRMetallicRoughnessMaterial, mimeType: BABYLON.GLTF2.ImageMimeType, hasTextureCoords: boolean): Promise<BABYLON.GLTF2.IMaterial>;
|
|
949
1052
|
/**
|
|
950
1053
|
* Converts an image typed array buffer to a base64 image
|
|
951
1054
|
* @param buffer typed array buffer
|