Skip to content

Commit

Permalink
Move rels check to loadDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
nmattia committed Mar 21, 2024
1 parent 18f0041 commit 746237a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/jsm/loaders/3MFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ class ThreeMFLoader extends Loader {

}

if ( relsName === undefined ) throw new Error( 'THREE.ThreeMFLoader: Cannot find relationship file `rels` in 3MF archive.' );

//

const relsView = zip[ relsName ];
Expand Down Expand Up @@ -1435,9 +1437,6 @@ class ThreeMFLoader extends Loader {
const group = new Group();

const relationship = fetch3DModelPart( data3mf[ 'rels' ] );

if ( relationship === undefined ) throw new Error( 'THREE.ThreeMFLoader: Cannot find relationship file `rels` in 3MF archive.' );

const buildData = data3mf.model[ relationship[ 'target' ].substring( 1 ) ][ 'build' ];

for ( let i = 0; i < buildData.length; i ++ ) {
Expand Down

0 comments on commit 746237a

Please sign in to comment.