@@ -678,7 +678,7 @@ THREE.LWOLoader = ( function () {
678678 // In this case, we'll strip out everything and load 'bumpMap.png' from the same directory as the model
679679 cleanPath ( path ) {
680680
681- if ( path . indexOf ( 'Images ' ) === 0 ) return './' + path ;
681+ if ( path . toLowerCase ( ) . indexOf ( 'images ' ) === 0 ) return './' + path ;
682682 return path . split ( '/' ) . pop ( ) . split ( '\\' ) . pop ( ) ;
683683
684684 } ,
@@ -1156,14 +1156,11 @@ THREE.LWOLoader = ( function () {
11561156 break ;
11571157 // Skipped LWO2 chunks
11581158 case 'DIFF' : // diffuse level, may be necessary to modulate COLR with this
1159- if ( this . tree . format === 'LWO2' ) {
1160-
1161- this . currentSurface . diffusePower = this . reader . getFloat32 ( ) ;
1162- this . reader . skip ( 2 ) ;
1163-
1164- }
1159+ this . currentSurface . diffusePower = this . reader . getFloat32 ( ) ;
1160+ this . reader . skip ( 2 ) ;
11651161 break ;
11661162 case 'TRNL' :
1163+ case 'REFL' :
11671164 case 'GLOS' :
11681165 case 'SHRP' :
11691166 case 'RFOP' :
@@ -1178,6 +1175,7 @@ THREE.LWOLoader = ( function () {
11781175 case 'LINE' :
11791176 case 'ALPH' :
11801177 case 'VCOL' :
1178+ case 'ENAB' :
11811179 this . reader . skip ( length ) ;
11821180 break ;
11831181 case 'SURF' :
@@ -1345,10 +1343,6 @@ THREE.LWOLoader = ( function () {
13451343 this . currentSurface . attributes . smooth = ( maxSmoothingAngle < 0 ) ? false : true ;
13461344 break ;
13471345
1348- case 'ENAB' :
1349- this . currentForm . enabled = this . reader . getUint16 ( ) ;
1350- break ;
1351-
13521346 // LWO2: Basic Surface Parameters
13531347 case 'COLR' :
13541348 this . currentSurface . attributes . Color = { } ;
@@ -1366,11 +1360,6 @@ THREE.LWOLoader = ( function () {
13661360 this . reader . skip ( 2 ) ;
13671361 break ;
13681362
1369- case 'REFL' :
1370- this . currentSurface . attributes . reflectivity = this . reader . getFloat32 ( ) ;
1371- this . reader . skip ( 2 ) ;
1372- break ;
1373-
13741363 case 'TRAN' :
13751364 this . currentSurface . attributes . opacity = this . reader . getFloat32 ( ) ;
13761365 this . reader . skip ( 2 ) ;
@@ -1484,6 +1473,7 @@ THREE.LWOLoader = ( function () {
14841473 // if break; is called directly, the position in the lwoTree is not created
14851474 // any sub chunks and forms are added to the parent form instead
14861475 case 'META' :
1476+ case 'NNDS' :
14871477 case 'NODS' :
14881478 case 'NDTA' :
14891479 case 'ADAT' :
@@ -1566,10 +1556,6 @@ THREE.LWOLoader = ( function () {
15661556 this . parseSubNode ( length ) ;
15671557 break ;
15681558
1569- case 'NNDS' :
1570- this . setupForm ( 'nodes' , length ) ;
1571- break ;
1572-
15731559 case 'ATTR' : // BSDF Node Attributes
15741560 case 'SATR' : // Standard Node Attributes
15751561 this . setupForm ( 'attributes' , length ) ;
0 commit comments