瀏覽代碼

DecalGeometry: Fixed index read access

Mugen87 8 年之前
父節點
當前提交
6a3763584e
共有 1 個文件被更改,包括 2 次插入2 次删除
  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 );