File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -348,21 +348,23 @@ class Projector {
348348 _face . v3 . copy ( v3 ) ;
349349 _face . z = ( v1 . positionScreen . z + v2 . positionScreen . z + v3 . positionScreen . z ) / 3 ;
350350 _face . renderOrder = object . renderOrder ;
351+
352+ // face normal
351353
352354 _vector3 . subVectors ( v3 . position , v2 . position ) ;
353355 _vector4 . subVectors ( v1 . position , v2 . position ) ;
354356 _vector3 . cross ( _vector4 ) ;
355357 _face . normalModel . copy ( _vector3 ) ;
356358 _face . normalModel . applyMatrix3 ( normalMatrix ) . normalize ( ) ;
357359
358- for ( let n = 0 ; n < 3 ; n ++ ) {
360+ for ( let i = 0 ; i < 3 ; i ++ ) {
359361
360- const normal = _face . vertexNormalsModel [ n ] ;
361- normal . fromArray ( normals , arguments [ n ] * 3 ) ;
362+ const normal = _face . vertexNormalsModel [ i ] ;
363+ normal . fromArray ( normals , arguments [ i ] * 3 ) ;
362364 normal . applyMatrix3 ( normalMatrix ) . normalize ( ) ;
363365
364- const uv = _face . uvs [ n ] ;
365- uv . fromArray ( uvs , arguments [ n ] * 2 ) ;
366+ const uv = _face . uvs [ i ] ;
367+ uv . fromArray ( uvs , arguments [ i ] * 2 ) ;
366368
367369 }
368370
You can’t perform that action at this time.
0 commit comments