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
|
@@ -95,6 +95,7 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
|
95
95
|
import { Node } from "babylonjs/node";
|
|
96
96
|
import { TargetCamera } from "babylonjs/Cameras/targetCamera";
|
|
97
97
|
import { ShadowLight } from "babylonjs/Lights/shadowLight";
|
|
98
|
+
import { AreaLight } from "babylonjs/Lights/areaLight";
|
|
98
99
|
export const DefaultTranslation: import("babylonjs/types").DeepImmutableObject<Vector3>;
|
|
99
100
|
export const DefaultRotation: DeepImmutable<Quaternion>;
|
|
100
101
|
export const DefaultScale: import("babylonjs/types").DeepImmutableObject<Vector3>;
|
|
@@ -151,7 +152,7 @@ export function CollapseChildIntoParent(node: INode, parentNode: INode): void;
|
|
|
151
152
|
* @param parentBabylonNode Target Babylon parent node.
|
|
152
153
|
* @returns True if the two nodes can be merged, false otherwise.
|
|
153
154
|
*/
|
|
154
|
-
export function IsChildCollapsible(babylonNode: ShadowLight | TargetCamera, parentBabylonNode: Node): boolean;
|
|
155
|
+
export function IsChildCollapsible(babylonNode: ShadowLight | TargetCamera | AreaLight, parentBabylonNode: Node): boolean;
|
|
155
156
|
/**
|
|
156
157
|
* Converts an IndicesArray into either a Uint32Array or Uint16Array.
|
|
157
158
|
* If the `start` and `count` parameters specify a subset of the array, a new view is created.
|
|
@@ -376,7 +377,7 @@ export class GLTFMaterialExporter {
|
|
|
376
377
|
exportPBRMaterialAsync(babylonPBRMaterial: PBRBaseMaterial, hasUVs: boolean): Promise<number>;
|
|
377
378
|
private _setMetallicRoughnessPbrMaterialAsync;
|
|
378
379
|
exportOpenPBRMaterialAsync(babylonOpenPBRMaterial: OpenPBRMaterial, hasUVs: boolean): Promise<number>;
|
|
379
|
-
exportTextureAsync(babylonTexture: BaseTexture): Promise<Nullable<ITextureInfo>>;
|
|
380
|
+
exportTextureAsync(babylonTexture: BaseTexture, overrideId?: Nullable<number>): Promise<Nullable<ITextureInfo>>;
|
|
380
381
|
private _exportTextureImageAsync;
|
|
381
382
|
private _exportImage;
|
|
382
383
|
private _exportTextureInfo;
|
|
@@ -887,18 +888,17 @@ declare module "babylonjs-serializers/glTF/2.0/Extensions/index" {
|
|
|
887
888
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/EXT_mesh_gpu_instancing";
|
|
888
889
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_draco_mesh_compression";
|
|
889
890
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_lights_punctual";
|
|
891
|
+
export * from "babylonjs-serializers/glTF/2.0/Extensions/EXT_lights_area";
|
|
890
892
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_anisotropy";
|
|
891
893
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_clearcoat";
|
|
892
|
-
export * from "babylonjs-serializers/glTF/2.0/Extensions/
|
|
893
|
-
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_clearcoat_ior";
|
|
894
|
-
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_clearcoat_color";
|
|
895
|
-
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_clearcoat_anisotropy";
|
|
894
|
+
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_coat";
|
|
896
895
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_diffuse_transmission";
|
|
897
896
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_dispersion";
|
|
898
897
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_emissive_strength";
|
|
899
898
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_ior";
|
|
900
899
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_iridescence";
|
|
901
900
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_sheen";
|
|
901
|
+
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_fuzz";
|
|
902
902
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_specular";
|
|
903
903
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_transmission";
|
|
904
904
|
export * from "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_unlit";
|
|
@@ -1192,6 +1192,41 @@ export class KHR_materials_ior implements IGLTFExporterExtensionV2 {
|
|
|
1192
1192
|
postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
|
|
1193
1193
|
}
|
|
1194
1194
|
|
|
1195
|
+
}
|
|
1196
|
+
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_fuzz" {
|
|
1197
|
+
import { IMaterial } from "babylonjs-gltf2interface";
|
|
1198
|
+
import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
|
|
1199
|
+
import { GLTFExporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
|
|
1200
|
+
import { Material } from "babylonjs/Materials/material";
|
|
1201
|
+
import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
1202
|
+
/**
|
|
1203
|
+
* @internal
|
|
1204
|
+
*/
|
|
1205
|
+
export class KHR_materials_fuzz implements IGLTFExporterExtensionV2 {
|
|
1206
|
+
/** Name of this extension */
|
|
1207
|
+
readonly name: string;
|
|
1208
|
+
/** Defines whether this extension is enabled */
|
|
1209
|
+
enabled: boolean;
|
|
1210
|
+
/** Defines whether this extension is required */
|
|
1211
|
+
required: boolean;
|
|
1212
|
+
private _wasUsed;
|
|
1213
|
+
private _exporter;
|
|
1214
|
+
constructor(exporter: GLTFExporter);
|
|
1215
|
+
/**
|
|
1216
|
+
* Cache that holds temporary merged textures created during export
|
|
1217
|
+
*/
|
|
1218
|
+
private _mergedTexturesMap;
|
|
1219
|
+
/**
|
|
1220
|
+
* Cache that holds internal textures of merged textures created during export
|
|
1221
|
+
*/
|
|
1222
|
+
private _cachedInternalTexturesMap;
|
|
1223
|
+
dispose(): void;
|
|
1224
|
+
/** @internal */
|
|
1225
|
+
get wasUsed(): boolean;
|
|
1226
|
+
postExportMaterialAdditionalTexturesAsync(context: string, node: IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
1227
|
+
postExportMaterialAsync(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1195
1230
|
}
|
|
1196
1231
|
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_emissive_strength" {
|
|
1197
1232
|
import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
|
|
@@ -1327,36 +1362,7 @@ export class KHR_materials_diffuse_roughness implements IGLTFExporterExtensionV2
|
|
|
1327
1362
|
}
|
|
1328
1363
|
|
|
1329
1364
|
}
|
|
1330
|
-
declare module "babylonjs-serializers/glTF/2.0/Extensions/
|
|
1331
|
-
import { IMaterial } from "babylonjs-gltf2interface";
|
|
1332
|
-
import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
|
|
1333
|
-
import { GLTFExporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
|
|
1334
|
-
import { Material } from "babylonjs/Materials/material";
|
|
1335
|
-
/**
|
|
1336
|
-
* @internal
|
|
1337
|
-
*/
|
|
1338
|
-
export class KHR_materials_clearcoat_ior implements IGLTFExporterExtensionV2 {
|
|
1339
|
-
/** Name of this extension */
|
|
1340
|
-
readonly name: string;
|
|
1341
|
-
/** Defines whether this extension is enabled */
|
|
1342
|
-
enabled: boolean;
|
|
1343
|
-
/** Defines whether this extension is required */
|
|
1344
|
-
required: boolean;
|
|
1345
|
-
private _exporter;
|
|
1346
|
-
private _wasUsed;
|
|
1347
|
-
/**
|
|
1348
|
-
* @param exporter The glTF exporter
|
|
1349
|
-
*/
|
|
1350
|
-
constructor(exporter: GLTFExporter);
|
|
1351
|
-
/** @internal */
|
|
1352
|
-
dispose(): void;
|
|
1353
|
-
/** @internal */
|
|
1354
|
-
get wasUsed(): boolean;
|
|
1355
|
-
postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
}
|
|
1359
|
-
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_clearcoat_darkening" {
|
|
1365
|
+
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_coat" {
|
|
1360
1366
|
import { IMaterial } from "babylonjs-gltf2interface";
|
|
1361
1367
|
import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
|
|
1362
1368
|
import { GLTFExporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
|
|
@@ -1365,7 +1371,7 @@ import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
|
1365
1371
|
/**
|
|
1366
1372
|
* @internal
|
|
1367
1373
|
*/
|
|
1368
|
-
export class
|
|
1374
|
+
export class KHR_materials_coat implements IGLTFExporterExtensionV2 {
|
|
1369
1375
|
/** Name of this extension */
|
|
1370
1376
|
readonly name: string;
|
|
1371
1377
|
/** Defines whether this extension is enabled */
|
|
@@ -1375,6 +1381,14 @@ export class KHR_materials_clearcoat_darkening implements IGLTFExporterExtension
|
|
|
1375
1381
|
private _exporter;
|
|
1376
1382
|
private _wasUsed;
|
|
1377
1383
|
constructor(exporter: GLTFExporter);
|
|
1384
|
+
/**
|
|
1385
|
+
* Cache that holds temporary merged textures created during export
|
|
1386
|
+
*/
|
|
1387
|
+
private _mergedTexturesMap;
|
|
1388
|
+
/**
|
|
1389
|
+
* Cache that holds internal textures of merged textures created during export
|
|
1390
|
+
*/
|
|
1391
|
+
private _cachedInternalTexturesMap;
|
|
1378
1392
|
dispose(): void;
|
|
1379
1393
|
/** @internal */
|
|
1380
1394
|
get wasUsed(): boolean;
|
|
@@ -1382,68 +1396,6 @@ export class KHR_materials_clearcoat_darkening implements IGLTFExporterExtension
|
|
|
1382
1396
|
postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
|
|
1383
1397
|
}
|
|
1384
1398
|
|
|
1385
|
-
}
|
|
1386
|
-
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_clearcoat_color" {
|
|
1387
|
-
import { IMaterial } from "babylonjs-gltf2interface";
|
|
1388
|
-
import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
|
|
1389
|
-
import { GLTFExporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
|
|
1390
|
-
import { Material } from "babylonjs/Materials/material";
|
|
1391
|
-
import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
1392
|
-
/**
|
|
1393
|
-
* @internal
|
|
1394
|
-
*/
|
|
1395
|
-
export class KHR_materials_clearcoat_color implements IGLTFExporterExtensionV2 {
|
|
1396
|
-
/** Name of this extension */
|
|
1397
|
-
readonly name: string;
|
|
1398
|
-
/** Defines whether this extension is enabled */
|
|
1399
|
-
enabled: boolean;
|
|
1400
|
-
/** Defines whether this extension is required */
|
|
1401
|
-
required: boolean;
|
|
1402
|
-
private _exporter;
|
|
1403
|
-
private _wasUsed;
|
|
1404
|
-
constructor(exporter: GLTFExporter);
|
|
1405
|
-
dispose(): void;
|
|
1406
|
-
/** @internal */
|
|
1407
|
-
get wasUsed(): boolean;
|
|
1408
|
-
postExportMaterialAdditionalTexturesAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
1409
|
-
postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
|
|
1410
|
-
}
|
|
1411
|
-
|
|
1412
|
-
}
|
|
1413
|
-
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_clearcoat_anisotropy" {
|
|
1414
|
-
import { IMaterial } from "babylonjs-gltf2interface";
|
|
1415
|
-
import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
|
|
1416
|
-
import { GLTFExporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
|
|
1417
|
-
import { Material } from "babylonjs/Materials/material";
|
|
1418
|
-
import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
1419
|
-
/**
|
|
1420
|
-
* @internal
|
|
1421
|
-
*/
|
|
1422
|
-
export class KHR_materials_clearcoat_anisotropy implements IGLTFExporterExtensionV2 {
|
|
1423
|
-
/** Name of this extension */
|
|
1424
|
-
readonly name: string;
|
|
1425
|
-
/** Defines whether this extension is enabled */
|
|
1426
|
-
enabled: boolean;
|
|
1427
|
-
/** Defines whether this extension is required */
|
|
1428
|
-
required: boolean;
|
|
1429
|
-
private _exporter;
|
|
1430
|
-
private _wasUsed;
|
|
1431
|
-
private _anisoTexturesMap;
|
|
1432
|
-
constructor(exporter: GLTFExporter);
|
|
1433
|
-
dispose(): void;
|
|
1434
|
-
/** @internal */
|
|
1435
|
-
get wasUsed(): boolean;
|
|
1436
|
-
/**
|
|
1437
|
-
* After exporting a material, deal with the additional textures
|
|
1438
|
-
* @param context GLTF context of the material
|
|
1439
|
-
* @param node exported GLTF node
|
|
1440
|
-
* @param babylonMaterial corresponding babylon material
|
|
1441
|
-
* @returns array of additional textures to export
|
|
1442
|
-
*/
|
|
1443
|
-
postExportMaterialAdditionalTexturesAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
1444
|
-
postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
1399
|
}
|
|
1448
1400
|
declare module "babylonjs-serializers/glTF/2.0/Extensions/KHR_materials_clearcoat" {
|
|
1449
1401
|
import { IMaterial } from "babylonjs-gltf2interface";
|
|
@@ -1464,6 +1416,14 @@ export class KHR_materials_clearcoat implements IGLTFExporterExtensionV2 {
|
|
|
1464
1416
|
private _exporter;
|
|
1465
1417
|
private _wasUsed;
|
|
1466
1418
|
constructor(exporter: GLTFExporter);
|
|
1419
|
+
/**
|
|
1420
|
+
* Cache that holds temporary merged textures created during export
|
|
1421
|
+
*/
|
|
1422
|
+
private _mergedTexturesMap;
|
|
1423
|
+
/**
|
|
1424
|
+
* Cache that holds internal textures of merged textures created during export
|
|
1425
|
+
*/
|
|
1426
|
+
private _cachedInternalTexturesMap;
|
|
1467
1427
|
dispose(): void;
|
|
1468
1428
|
/** @internal */
|
|
1469
1429
|
get wasUsed(): boolean;
|
|
@@ -1665,6 +1625,48 @@ export class EXT_mesh_gpu_instancing implements IGLTFExporterExtensionV2 {
|
|
|
1665
1625
|
private _buildAccessor;
|
|
1666
1626
|
}
|
|
1667
1627
|
|
|
1628
|
+
}
|
|
1629
|
+
declare module "babylonjs-serializers/glTF/2.0/Extensions/EXT_lights_area" {
|
|
1630
|
+
import { Nullable } from "babylonjs/types";
|
|
1631
|
+
import { Node } from "babylonjs/node";
|
|
1632
|
+
import { INode } from "babylonjs-gltf2interface";
|
|
1633
|
+
import { IGLTFExporterExtensionV2 } from "babylonjs-serializers/glTF/2.0/glTFExporterExtension";
|
|
1634
|
+
import { GLTFExporter } from "babylonjs-serializers/glTF/2.0/glTFExporter";
|
|
1635
|
+
/**
|
|
1636
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/EXT_lights_area/README.md)
|
|
1637
|
+
*/
|
|
1638
|
+
export class EXT_lights_area implements IGLTFExporterExtensionV2 {
|
|
1639
|
+
/** The name of this extension. */
|
|
1640
|
+
readonly name: string;
|
|
1641
|
+
/** Defines whether this extension is enabled. */
|
|
1642
|
+
enabled: boolean;
|
|
1643
|
+
/** Defines whether this extension is required */
|
|
1644
|
+
required: boolean;
|
|
1645
|
+
/** Reference to the glTF exporter */
|
|
1646
|
+
private _exporter;
|
|
1647
|
+
private _lights;
|
|
1648
|
+
/**
|
|
1649
|
+
* @internal
|
|
1650
|
+
*/
|
|
1651
|
+
constructor(exporter: GLTFExporter);
|
|
1652
|
+
/** @internal */
|
|
1653
|
+
dispose(): void;
|
|
1654
|
+
/** @internal */
|
|
1655
|
+
get wasUsed(): boolean;
|
|
1656
|
+
/** @internal */
|
|
1657
|
+
onExporting(): void;
|
|
1658
|
+
/**
|
|
1659
|
+
* Define this method to modify the default behavior when exporting a node
|
|
1660
|
+
* @param context The context when exporting the node
|
|
1661
|
+
* @param node glTF node
|
|
1662
|
+
* @param babylonNode BabylonJS node
|
|
1663
|
+
* @param nodeMap Node mapping of babylon node to glTF node index
|
|
1664
|
+
* @param convertToRightHanded Flag to convert the values to right-handed
|
|
1665
|
+
* @returns nullable INode promise
|
|
1666
|
+
*/
|
|
1667
|
+
postExportNodeAsync(context: string, node: INode, babylonNode: Node, nodeMap: Map<Node, number>, convertToRightHanded: boolean): Promise<Nullable<INode>>;
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1668
1670
|
}
|
|
1669
1671
|
declare module "babylonjs-serializers/USDZ/usdzExporter" {
|
|
1670
1672
|
import { Mesh } from "babylonjs/Meshes/mesh";
|
|
@@ -1926,7 +1928,7 @@ declare module BABYLON {
|
|
|
1926
1928
|
* @param parentBabylonNode Target Babylon parent node.
|
|
1927
1929
|
* @returns True if the two nodes can be merged, false otherwise.
|
|
1928
1930
|
*/
|
|
1929
|
-
export function IsChildCollapsible(babylonNode: ShadowLight | TargetCamera, parentBabylonNode: Node): boolean;
|
|
1931
|
+
export function IsChildCollapsible(babylonNode: ShadowLight | TargetCamera | AreaLight, parentBabylonNode: Node): boolean;
|
|
1930
1932
|
/**
|
|
1931
1933
|
* Converts an IndicesArray into either a Uint32Array or Uint16Array.
|
|
1932
1934
|
* If the `start` and `count` parameters specify a subset of the array, a new view is created.
|
|
@@ -2133,7 +2135,7 @@ declare module BABYLON {
|
|
|
2133
2135
|
exportPBRMaterialAsync(babylonPBRMaterial: PBRBaseMaterial, hasUVs: boolean): Promise<number>;
|
|
2134
2136
|
private _setMetallicRoughnessPbrMaterialAsync;
|
|
2135
2137
|
exportOpenPBRMaterialAsync(babylonOpenPBRMaterial: OpenPBRMaterial, hasUVs: boolean): Promise<number>;
|
|
2136
|
-
exportTextureAsync(babylonTexture: BaseTexture): Promise<Nullable<BABYLON.GLTF2.ITextureInfo>>;
|
|
2138
|
+
exportTextureAsync(babylonTexture: BaseTexture, overrideId?: Nullable<number>): Promise<Nullable<BABYLON.GLTF2.ITextureInfo>>;
|
|
2137
2139
|
private _exportTextureImageAsync;
|
|
2138
2140
|
private _exportImage;
|
|
2139
2141
|
private _exportTextureInfo;
|
|
@@ -2844,6 +2846,35 @@ declare module BABYLON {
|
|
|
2844
2846
|
}
|
|
2845
2847
|
|
|
2846
2848
|
|
|
2849
|
+
/**
|
|
2850
|
+
* @internal
|
|
2851
|
+
*/
|
|
2852
|
+
export class KHR_materials_fuzz implements IGLTFExporterExtensionV2 {
|
|
2853
|
+
/** Name of this extension */
|
|
2854
|
+
readonly name = "KHR_materials_fuzz";
|
|
2855
|
+
/** Defines whether this extension is enabled */
|
|
2856
|
+
enabled: boolean;
|
|
2857
|
+
/** Defines whether this extension is required */
|
|
2858
|
+
required: boolean;
|
|
2859
|
+
private _wasUsed;
|
|
2860
|
+
private _exporter;
|
|
2861
|
+
constructor(exporter: GLTFExporter);
|
|
2862
|
+
/**
|
|
2863
|
+
* Cache that holds temporary merged textures created during export
|
|
2864
|
+
*/
|
|
2865
|
+
private _mergedTexturesMap;
|
|
2866
|
+
/**
|
|
2867
|
+
* Cache that holds internal textures of merged textures created during export
|
|
2868
|
+
*/
|
|
2869
|
+
private _cachedInternalTexturesMap;
|
|
2870
|
+
dispose(): void;
|
|
2871
|
+
/** @internal */
|
|
2872
|
+
get wasUsed(): boolean;
|
|
2873
|
+
postExportMaterialAdditionalTexturesAsync(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
2874
|
+
postExportMaterialAsync(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
2875
|
+
}
|
|
2876
|
+
|
|
2877
|
+
|
|
2847
2878
|
/**
|
|
2848
2879
|
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_emissive_strength/README.md)
|
|
2849
2880
|
*/
|
|
@@ -2961,93 +2992,27 @@ declare module BABYLON {
|
|
|
2961
2992
|
/**
|
|
2962
2993
|
* @internal
|
|
2963
2994
|
*/
|
|
2964
|
-
export class
|
|
2995
|
+
export class KHR_materials_coat implements IGLTFExporterExtensionV2 {
|
|
2965
2996
|
/** Name of this extension */
|
|
2966
|
-
readonly name = "
|
|
2997
|
+
readonly name = "KHR_materials_coat";
|
|
2967
2998
|
/** Defines whether this extension is enabled */
|
|
2968
2999
|
enabled: boolean;
|
|
2969
3000
|
/** Defines whether this extension is required */
|
|
2970
3001
|
required: boolean;
|
|
2971
3002
|
private _exporter;
|
|
2972
3003
|
private _wasUsed;
|
|
3004
|
+
constructor(exporter: GLTFExporter);
|
|
2973
3005
|
/**
|
|
2974
|
-
*
|
|
3006
|
+
* Cache that holds temporary merged textures created during export
|
|
2975
3007
|
*/
|
|
2976
|
-
|
|
2977
|
-
/**
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
2982
|
-
}
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
/**
|
|
2986
|
-
* @internal
|
|
2987
|
-
*/
|
|
2988
|
-
export class KHR_materials_clearcoat_darkening implements IGLTFExporterExtensionV2 {
|
|
2989
|
-
/** Name of this extension */
|
|
2990
|
-
readonly name = "KHR_materials_clearcoat_darkening";
|
|
2991
|
-
/** Defines whether this extension is enabled */
|
|
2992
|
-
enabled: boolean;
|
|
2993
|
-
/** Defines whether this extension is required */
|
|
2994
|
-
required: boolean;
|
|
2995
|
-
private _exporter;
|
|
2996
|
-
private _wasUsed;
|
|
2997
|
-
constructor(exporter: GLTFExporter);
|
|
2998
|
-
dispose(): void;
|
|
2999
|
-
/** @internal */
|
|
3000
|
-
get wasUsed(): boolean;
|
|
3001
|
-
postExportMaterialAdditionalTexturesAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
3002
|
-
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
3003
|
-
}
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
/**
|
|
3007
|
-
* @internal
|
|
3008
|
-
*/
|
|
3009
|
-
export class KHR_materials_clearcoat_color implements IGLTFExporterExtensionV2 {
|
|
3010
|
-
/** Name of this extension */
|
|
3011
|
-
readonly name = "KHR_materials_clearcoat_color";
|
|
3012
|
-
/** Defines whether this extension is enabled */
|
|
3013
|
-
enabled: boolean;
|
|
3014
|
-
/** Defines whether this extension is required */
|
|
3015
|
-
required: boolean;
|
|
3016
|
-
private _exporter;
|
|
3017
|
-
private _wasUsed;
|
|
3018
|
-
constructor(exporter: GLTFExporter);
|
|
3019
|
-
dispose(): void;
|
|
3020
|
-
/** @internal */
|
|
3021
|
-
get wasUsed(): boolean;
|
|
3022
|
-
postExportMaterialAdditionalTexturesAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
3023
|
-
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
3024
|
-
}
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
/**
|
|
3028
|
-
* @internal
|
|
3029
|
-
*/
|
|
3030
|
-
export class KHR_materials_clearcoat_anisotropy implements IGLTFExporterExtensionV2 {
|
|
3031
|
-
/** Name of this extension */
|
|
3032
|
-
readonly name = "KHR_materials_clearcoat_anisotropy";
|
|
3033
|
-
/** Defines whether this extension is enabled */
|
|
3034
|
-
enabled: boolean;
|
|
3035
|
-
/** Defines whether this extension is required */
|
|
3036
|
-
required: boolean;
|
|
3037
|
-
private _exporter;
|
|
3038
|
-
private _wasUsed;
|
|
3039
|
-
private _anisoTexturesMap;
|
|
3040
|
-
constructor(exporter: GLTFExporter);
|
|
3008
|
+
private _mergedTexturesMap;
|
|
3009
|
+
/**
|
|
3010
|
+
* Cache that holds internal textures of merged textures created during export
|
|
3011
|
+
*/
|
|
3012
|
+
private _cachedInternalTexturesMap;
|
|
3041
3013
|
dispose(): void;
|
|
3042
3014
|
/** @internal */
|
|
3043
3015
|
get wasUsed(): boolean;
|
|
3044
|
-
/**
|
|
3045
|
-
* After exporting a material, deal with the additional textures
|
|
3046
|
-
* @param context GLTF context of the material
|
|
3047
|
-
* @param node exported GLTF node
|
|
3048
|
-
* @param babylonMaterial corresponding babylon material
|
|
3049
|
-
* @returns array of additional textures to export
|
|
3050
|
-
*/
|
|
3051
3016
|
postExportMaterialAdditionalTexturesAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;
|
|
3052
3017
|
postExportMaterialAsync?(context: string, node: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): Promise<BABYLON.GLTF2.IMaterial>;
|
|
3053
3018
|
}
|
|
@@ -3066,6 +3031,14 @@ declare module BABYLON {
|
|
|
3066
3031
|
private _exporter;
|
|
3067
3032
|
private _wasUsed;
|
|
3068
3033
|
constructor(exporter: GLTFExporter);
|
|
3034
|
+
/**
|
|
3035
|
+
* Cache that holds temporary merged textures created during export
|
|
3036
|
+
*/
|
|
3037
|
+
private _mergedTexturesMap;
|
|
3038
|
+
/**
|
|
3039
|
+
* Cache that holds internal textures of merged textures created during export
|
|
3040
|
+
*/
|
|
3041
|
+
private _cachedInternalTexturesMap;
|
|
3069
3042
|
dispose(): void;
|
|
3070
3043
|
/** @internal */
|
|
3071
3044
|
get wasUsed(): boolean;
|
|
@@ -3237,6 +3210,42 @@ declare module BABYLON {
|
|
|
3237
3210
|
}
|
|
3238
3211
|
|
|
3239
3212
|
|
|
3213
|
+
/**
|
|
3214
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/EXT_lights_area/README.md)
|
|
3215
|
+
*/
|
|
3216
|
+
export class EXT_lights_area implements IGLTFExporterExtensionV2 {
|
|
3217
|
+
/** The name of this extension. */
|
|
3218
|
+
readonly name = "EXT_lights_area";
|
|
3219
|
+
/** Defines whether this extension is enabled. */
|
|
3220
|
+
enabled: boolean;
|
|
3221
|
+
/** Defines whether this extension is required */
|
|
3222
|
+
required: boolean;
|
|
3223
|
+
/** Reference to the glTF exporter */
|
|
3224
|
+
private _exporter;
|
|
3225
|
+
private _lights;
|
|
3226
|
+
/**
|
|
3227
|
+
* @internal
|
|
3228
|
+
*/
|
|
3229
|
+
constructor(exporter: GLTFExporter);
|
|
3230
|
+
/** @internal */
|
|
3231
|
+
dispose(): void;
|
|
3232
|
+
/** @internal */
|
|
3233
|
+
get wasUsed(): boolean;
|
|
3234
|
+
/** @internal */
|
|
3235
|
+
onExporting(): void;
|
|
3236
|
+
/**
|
|
3237
|
+
* Define this method to modify the default behavior when exporting a node
|
|
3238
|
+
* @param context The context when exporting the node
|
|
3239
|
+
* @param node glTF node
|
|
3240
|
+
* @param babylonNode BabylonJS node
|
|
3241
|
+
* @param nodeMap Node mapping of babylon node to glTF node index
|
|
3242
|
+
* @param convertToRightHanded Flag to convert the values to right-handed
|
|
3243
|
+
* @returns nullable BABYLON.GLTF2.INode promise
|
|
3244
|
+
*/
|
|
3245
|
+
postExportNodeAsync(context: string, node: BABYLON.GLTF2.INode, babylonNode: Node, nodeMap: Map<Node, number>, convertToRightHanded: boolean): Promise<Nullable<BABYLON.GLTF2.INode>>;
|
|
3246
|
+
}
|
|
3247
|
+
|
|
3248
|
+
|
|
3240
3249
|
/**
|
|
3241
3250
|
* Options for the USDZ export
|
|
3242
3251
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-serializers",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.34.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": "^8.
|
|
19
|
-
"babylonjs-gltf2interface": "^8.
|
|
18
|
+
"babylonjs": "^8.34.1",
|
|
19
|
+
"babylonjs-gltf2interface": "^8.34.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@dev/build-tools": "1.0.0",
|