Browse Source

DecalGeometry: Fixed index read access

Mugen87 8 years ago
parent
commit
6a3763584e
1 changed files with 2 additions and 2 deletions
  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 );