浏览代码

Merge pull request #10881 from Mugen87/dev

DecalGeometry: Fixed index read access
Mr.doob 8 年之前
父节点
当前提交
d46d7b055a
共有 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 );