Selaa lähdekoodia

DecalGeometry: Fixed index read access

Mugen87 8 vuotta sitten
vanhempi
commit
6a3763584e
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      src/geometries/DecalGeometry.js

+ 2 - 2
src/geometries/DecalGeometry.js

@@ -82,8 +82,8 @@ function DecalGeometry( mesh, position, orientation, size ) {
 
 			for ( i = 0; i < index.count; i ++ ) {
 
-				vertex.fromBufferAttribute( positionAttribute, index[ i ] );
-				normal.fromBufferAttribute( normalAttribute, index[ i ] );
+				vertex.fromBufferAttribute( positionAttribute, index.getX( i ) );
+				normal.fromBufferAttribute( normalAttribute, index.getX( i ) );
 
 				pushDecalVertex( decalVertices, vertex, normal );