@@ -15,8 +15,9 @@ import type {
15
15
ITextureInfo ,
16
16
ISkin ,
17
17
ICamera ,
18
+ ImageMimeType ,
18
19
} from "babylonjs-gltf2interface" ;
19
- import { AccessorComponentType , AccessorType , CameraType , ImageMimeType } from "babylonjs-gltf2interface" ;
20
+ import { AccessorComponentType , AccessorType , CameraType } from "babylonjs-gltf2interface" ;
20
21
import type { FloatArray , IndicesArray , Nullable } from "core/types" ;
21
22
import { TmpVectors , Quaternion } from "core/Maths/math.vector" ;
22
23
import type { Matrix } from "core/Maths/math.vector" ;
@@ -30,7 +31,6 @@ import type { Mesh } from "core/Meshes/mesh";
30
31
import { AbstractMesh } from "core/Meshes/abstractMesh" ;
31
32
import { InstancedMesh } from "core/Meshes/instancedMesh" ;
32
33
import type { BaseTexture } from "core/Materials/Textures/baseTexture" ;
33
- import type { Texture } from "core/Materials/Textures/texture" ;
34
34
import { Material } from "core/Materials/material" ;
35
35
import { Engine } from "core/Engines/engine" ;
36
36
import type { Scene } from "core/scene" ;
@@ -308,12 +308,6 @@ export class GLTFExporter {
308
308
return this . _ApplyExtension ( node , extensions , 0 , actionAsync ) ;
309
309
}
310
310
311
- // eslint-disable-next-line no-restricted-syntax, @typescript-eslint/promise-function-async
312
- public _extensionsPreExportTextureAsync ( context : string , babylonTexture : Texture , mimeType : ImageMimeType ) : Promise < Nullable < BaseTexture > > {
313
- // eslint-disable-next-line @typescript-eslint/promise-function-async
314
- return this . _ApplyExtensions ( babylonTexture , ( extension , node ) => extension . preExportTextureAsync && extension . preExportTextureAsync ( context , node , mimeType ) ) ;
315
- }
316
-
317
311
// eslint-disable-next-line no-restricted-syntax, @typescript-eslint/promise-function-async
318
312
public _extensionsPostExportNodeAsync ( context : string , node : INode , babylonNode : Node , nodeMap : Map < Node , number > , convertToRightHanded : boolean ) : Promise < Nullable < INode > > {
319
313
return this . _ApplyExtensions (
@@ -1414,9 +1408,9 @@ export class GLTFExporter {
1414
1408
const hasUVs = vertexBuffers && Object . keys ( vertexBuffers ) . some ( ( kind ) => kind . startsWith ( "uv" ) ) ;
1415
1409
babylonMaterial = babylonMaterial instanceof MultiMaterial ? babylonMaterial . subMaterials [ subMesh . materialIndex ] ! : babylonMaterial ;
1416
1410
if ( babylonMaterial instanceof PBRBaseMaterial ) {
1417
- materialIndex = await this . _materialExporter . exportPBRMaterialAsync ( babylonMaterial , ImageMimeType . PNG , hasUVs ) ;
1411
+ materialIndex = await this . _materialExporter . exportPBRMaterialAsync ( babylonMaterial , hasUVs ) ;
1418
1412
} else if ( babylonMaterial instanceof StandardMaterial ) {
1419
- materialIndex = await this . _materialExporter . exportStandardMaterialAsync ( babylonMaterial , ImageMimeType . PNG , hasUVs ) ;
1413
+ materialIndex = await this . _materialExporter . exportStandardMaterialAsync ( babylonMaterial , hasUVs ) ;
1420
1414
} else {
1421
1415
Logger . Warn ( `Unsupported material '${ babylonMaterial . name } ' with type ${ babylonMaterial . getClassName ( ) } ` ) ;
1422
1416
return ;
0 commit comments