babylonjs-serializers 8.33.4 → 8.34.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 +84 -77
- 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 +185 -176
- package/package.json +3 -3
|
@@ -118,7 +118,7 @@ declare module BABYLON {
|
|
|
118
118
|
* @param parentBabylonNode Target Babylon parent node.
|
|
119
119
|
* @returns True if the two nodes can be merged, false otherwise.
|
|
120
120
|
*/
|
|
121
|
-
export function IsChildCollapsible(babylonNode: ShadowLight | TargetCamera, parentBabylonNode: Node): boolean;
|
|
121
|
+
export function IsChildCollapsible(babylonNode: ShadowLight | TargetCamera | AreaLight, parentBabylonNode: Node): boolean;
|
|
122
122
|
/**
|
|
123
123
|
* Converts an IndicesArray into either a Uint32Array or Uint16Array.
|
|
124
124
|
* If the `start` and `count` parameters specify a subset of the array, a new view is created.
|
|
@@ -325,7 +325,7 @@ declare module BABYLON {
|
|
|
325
325
|
exportPBRMaterialAsync(babylonPBRMaterial: PBRBaseMaterial, hasUVs: boolean): Promise<number>;
|
|
326
326
|
private _setMetallicRoughnessPbrMaterialAsync;
|
|
327
327
|
exportOpenPBRMaterialAsync(babylonOpenPBRMaterial: OpenPBRMaterial, hasUVs: boolean): Promise<number>;
|
|
328
|
-
exportTextureAsync(babylonTexture: BaseTexture): Promise<Nullable<BABYLON.GLTF2.ITextureInfo>>;
|
|
328
|
+
exportTextureAsync(babylonTexture: BaseTexture, overrideId?: Nullable<number>): Promise<Nullable<BABYLON.GLTF2.ITextureInfo>>;
|
|
329
329
|
private _exportTextureImageAsync;
|
|
330
330
|
private _exportImage;
|
|
331
331
|
private _exportTextureInfo;
|
|
@@ -1036,6 +1036,35 @@ declare module BABYLON {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
1038
|
|
|
1039
|
+
/**
|
|
1040
|
+
* @internal
|
|
1041
|
+
*/
|
|
1042
|
+
export class KHR_materials_fuzz implements IGLTFExporterExtensionV2 {
|
|
1043
|
+
/** Name of this extension */
|
|
1044
|
+
readonly name = "KHR_materials_fuzz";
|
|
1045
|
+
/** Defines whether this extension is enabled */
|
|
1046
|
+
enabled: boolean;
|
|
1047
|
+
/** Defines whether this extension is required */
|
|
1048
|
+
required: boolean;
|
|
1049
|
+
private _wasUsed;
|
|
1050
|
+
private _exporter;
|
|
1051
|
+
constructor(exporter: GLTFExporter);
|
|
1052
|
+
/**
|
|
1053
|
+
* Cache that holds temporary merged textures created during export
|
|
1054
|
+
*/
|
|
1055
|
+
private _mergedTexturesMap;
|
|
1056
|
+
/**
|
|
1057
|
+
* Cache that holds internal textures of merged textures created during export
|
|
1058
|
+
*/
|
|
1059
|
+
private _cachedInternalTexturesMap;
|
|
1060
|
+
dispose(): void;
|
|
1061
|
+
/** @internal */
|
|
1062
|
+
get wasUsed(): boolean;
|
|
1063
|
+
postExportMaterialAdditionalTexturesAsync(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
1064
|
+
postExportMaterialAsync(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
|
|
1039
1068
|
/**
|
|
1040
1069
|
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_emissive_strength/README.md)
|
|
1041
1070
|
*/
|
|
@@ -1153,93 +1182,27 @@ declare module BABYLON {
|
|
|
1153
1182
|
/**
|
|
1154
1183
|
* @internal
|
|
1155
1184
|
*/
|
|
1156
|
-
export class
|
|
1185
|
+
export class KHR_materials_coat implements IGLTFExporterExtensionV2 {
|
|
1157
1186
|
/** Name of this extension */
|
|
1158
|
-
readonly name = "
|
|
1187
|
+
readonly name = "KHR_materials_coat";
|
|
1159
1188
|
/** Defines whether this extension is enabled */
|
|
1160
1189
|
enabled: boolean;
|
|
1161
1190
|
/** Defines whether this extension is required */
|
|
1162
1191
|
required: boolean;
|
|
1163
1192
|
private _exporter;
|
|
1164
1193
|
private _wasUsed;
|
|
1194
|
+
constructor(exporter: GLTFExporter);
|
|
1165
1195
|
/**
|
|
1166
|
-
*
|
|
1196
|
+
* Cache that holds temporary merged textures created during export
|
|
1167
1197
|
*/
|
|
1168
|
-
|
|
1169
|
-
/**
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
/**
|
|
1178
|
-
* @internal
|
|
1179
|
-
*/
|
|
1180
|
-
export class KHR_materials_clearcoat_darkening implements IGLTFExporterExtensionV2 {
|
|
1181
|
-
/** Name of this extension */
|
|
1182
|
-
readonly name = "KHR_materials_clearcoat_darkening";
|
|
1183
|
-
/** Defines whether this extension is enabled */
|
|
1184
|
-
enabled: boolean;
|
|
1185
|
-
/** Defines whether this extension is required */
|
|
1186
|
-
required: boolean;
|
|
1187
|
-
private _exporter;
|
|
1188
|
-
private _wasUsed;
|
|
1189
|
-
constructor(exporter: GLTFExporter);
|
|
1190
|
-
dispose(): void;
|
|
1191
|
-
/** @internal */
|
|
1192
|
-
get wasUsed(): boolean;
|
|
1193
|
-
postExportMaterialAdditionalTexturesAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
1194
|
-
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
/**
|
|
1199
|
-
* @internal
|
|
1200
|
-
*/
|
|
1201
|
-
export class KHR_materials_clearcoat_color implements IGLTFExporterExtensionV2 {
|
|
1202
|
-
/** Name of this extension */
|
|
1203
|
-
readonly name = "KHR_materials_clearcoat_color";
|
|
1204
|
-
/** Defines whether this extension is enabled */
|
|
1205
|
-
enabled: boolean;
|
|
1206
|
-
/** Defines whether this extension is required */
|
|
1207
|
-
required: boolean;
|
|
1208
|
-
private _exporter;
|
|
1209
|
-
private _wasUsed;
|
|
1210
|
-
constructor(exporter: GLTFExporter);
|
|
1211
|
-
dispose(): void;
|
|
1212
|
-
/** @internal */
|
|
1213
|
-
get wasUsed(): boolean;
|
|
1214
|
-
postExportMaterialAdditionalTexturesAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
1215
|
-
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
/**
|
|
1220
|
-
* @internal
|
|
1221
|
-
*/
|
|
1222
|
-
export class KHR_materials_clearcoat_anisotropy implements IGLTFExporterExtensionV2 {
|
|
1223
|
-
/** Name of this extension */
|
|
1224
|
-
readonly name = "KHR_materials_clearcoat_anisotropy";
|
|
1225
|
-
/** Defines whether this extension is enabled */
|
|
1226
|
-
enabled: boolean;
|
|
1227
|
-
/** Defines whether this extension is required */
|
|
1228
|
-
required: boolean;
|
|
1229
|
-
private _exporter;
|
|
1230
|
-
private _wasUsed;
|
|
1231
|
-
private _anisoTexturesMap;
|
|
1232
|
-
constructor(exporter: GLTFExporter);
|
|
1198
|
+
private _mergedTexturesMap;
|
|
1199
|
+
/**
|
|
1200
|
+
* Cache that holds internal textures of merged textures created during export
|
|
1201
|
+
*/
|
|
1202
|
+
private _cachedInternalTexturesMap;
|
|
1233
1203
|
dispose(): void;
|
|
1234
1204
|
/** @internal */
|
|
1235
1205
|
get wasUsed(): boolean;
|
|
1236
|
-
/**
|
|
1237
|
-
* After exporting a material, deal with the additional textures
|
|
1238
|
-
* @param context GLTF context of the material
|
|
1239
|
-
* @param node exported GLTF node
|
|
1240
|
-
* @param babylonMaterial corresponding babylon material
|
|
1241
|
-
* @returns array of additional textures to export
|
|
1242
|
-
*/
|
|
1243
1206
|
postExportMaterialAdditionalTexturesAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
1244
1207
|
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
1245
1208
|
}
|
|
@@ -1258,6 +1221,14 @@ declare module BABYLON {
|
|
|
1258
1221
|
private _exporter;
|
|
1259
1222
|
private _wasUsed;
|
|
1260
1223
|
constructor(exporter: GLTFExporter);
|
|
1224
|
+
/**
|
|
1225
|
+
* Cache that holds temporary merged textures created during export
|
|
1226
|
+
*/
|
|
1227
|
+
private _mergedTexturesMap;
|
|
1228
|
+
/**
|
|
1229
|
+
* Cache that holds internal textures of merged textures created during export
|
|
1230
|
+
*/
|
|
1231
|
+
private _cachedInternalTexturesMap;
|
|
1261
1232
|
dispose(): void;
|
|
1262
1233
|
/** @internal */
|
|
1263
1234
|
get wasUsed(): boolean;
|
|
@@ -1429,6 +1400,42 @@ declare module BABYLON {
|
|
|
1429
1400
|
}
|
|
1430
1401
|
|
|
1431
1402
|
|
|
1403
|
+
/**
|
|
1404
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/EXT_lights_area/README.md)
|
|
1405
|
+
*/
|
|
1406
|
+
export class EXT_lights_area implements IGLTFExporterExtensionV2 {
|
|
1407
|
+
/** The name of this extension. */
|
|
1408
|
+
readonly name = "EXT_lights_area";
|
|
1409
|
+
/** Defines whether this extension is enabled. */
|
|
1410
|
+
enabled: boolean;
|
|
1411
|
+
/** Defines whether this extension is required */
|
|
1412
|
+
required: boolean;
|
|
1413
|
+
/** Reference to the glTF exporter */
|
|
1414
|
+
private _exporter;
|
|
1415
|
+
private _lights;
|
|
1416
|
+
/**
|
|
1417
|
+
* @internal
|
|
1418
|
+
*/
|
|
1419
|
+
constructor(exporter: GLTFExporter);
|
|
1420
|
+
/** @internal */
|
|
1421
|
+
dispose(): void;
|
|
1422
|
+
/** @internal */
|
|
1423
|
+
get wasUsed(): boolean;
|
|
1424
|
+
/** @internal */
|
|
1425
|
+
onExporting(): void;
|
|
1426
|
+
/**
|
|
1427
|
+
* Define this method to modify the default behavior when exporting a node
|
|
1428
|
+
* @param context The context when exporting the node
|
|
1429
|
+
* @param node glTF node
|
|
1430
|
+
* @param babylonNode BabylonJS node
|
|
1431
|
+
* @param nodeMap Node mapping of babylon node to glTF node index
|
|
1432
|
+
* @param convertToRightHanded Flag to convert the values to right-handed
|
|
1433
|
+
* @returns nullable BABYLON.GLTF2.INode promise
|
|
1434
|
+
*/
|
|
1435
|
+
postExportNodeAsync(context: string, node: BABYLON.GLTF2.INode, babylonNode: Node, nodeMap: Map<Node, number>, convertToRightHanded: boolean): Promise<Nullable<BABYLON.GLTF2.INode>>;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
|
|
1432
1439
|
/**
|
|
1433
1440
|
* Options for the USDZ export
|
|
1434
1441
|
*/
|