Skip to content

Commit 6617593

Browse files
committed
USDZLoader: Avoid recursive calls of parseNextLine().
1 parent d981731 commit 6617593

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

examples/jsm/loaders/USDZLoader.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,14 @@ class USDAParser {
100100

101101
}
102102

103-
current ++;
104-
105-
if ( current < length ) {
103+
}
106104

107-
parseNextLine();
105+
for ( current = 0; current < length; current ++ ) {
108106

109-
}
107+
parseNextLine();
110108

111109
}
112110

113-
parseNextLine();
114-
115111
return data;
116112

117113
}
@@ -640,7 +636,7 @@ class USDZLoader extends Loader {
640636

641637
}
642638

643-
} else if ( 'float inputs:clearcoat' in surface ) {
639+
} else if ( 'float inputs:clearcoat' in surface ) {
644640

645641
material.clearcoat = parseFloat( surface[ 'float inputs:clearcoat' ] );
646642

0 commit comments

Comments
 (0)