@@ -30,7 +30,6 @@ export class StepLoadModel extends EventTarget {
30
30
triangle_count = 0
31
31
objects_count = 0
32
32
33
-
34
33
// function that goes through all our geometry data and calculates how many triangles we have
35
34
private calculate_mesh_metrics ( ) : void {
36
35
let triangle_count = 0
@@ -155,13 +154,15 @@ export class StepLoadModel extends EventTarget {
155
154
loaded_scene . add ( fbx )
156
155
this . process_loaded_scene ( loaded_scene )
157
156
} )
158
- } else if ( file_extension === 'gltf' || file_extension === ' glb') {
157
+ } else if ( file_extension === 'glb' ) {
159
158
this . gltf_loader . load ( model_file_path , ( gltf ) => {
160
159
const loaded_scene : Scene = gltf . scene
161
160
this . process_loaded_scene ( loaded_scene )
162
161
} )
162
+ } else if ( file_extension === 'zip' ) {
163
+ console . log ( 'try to load a GLTF file with separate BIN file from ZIP' )
163
164
} else {
164
- console . error ( 'Unsupported file format to load. Only acccepts FBX, GLTF, GLB:' , model_file_path )
165
+ console . error ( 'Unsupported file format to load. Only acccepts FBX, (ZIP) GLTF+BIN , GLB:' , model_file_path )
165
166
}
166
167
}
167
168
@@ -310,12 +311,11 @@ export class StepLoadModel extends EventTarget {
310
311
return this . material_list
311
312
}
312
313
313
-
314
314
/**
315
315
* Rotate all geometry data in the model by the given angle (in degrees) around the specified axis.
316
316
* This directly modifies the geometry vertices.
317
317
*/
318
- public rotate_model_geometry ( axis : 'x' | 'y' | 'z' , angle : number ) : void {
318
+ public rotate_model_geometry ( axis : 'x' | 'y' | 'z' , angle : number ) : void {
319
319
const radians = MathUtils . degToRad ( angle )
320
320
this . final_mesh_data . traverse ( ( obj : Object3D ) => {
321
321
if ( obj . type === 'Mesh' ) {
0 commit comments