瀏覽代碼

Fix computeMikkTSpaceTangents (#25884)

pmjo 2 年之前
父節點
當前提交
7addd2afbb
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      examples/jsm/utils/BufferGeometryUtils.js

+ 2 - 2
examples/jsm/utils/BufferGeometryUtils.js

@@ -29,9 +29,9 @@ function computeMikkTSpaceTangents( geometry, MikkTSpace, negateSign = true ) {
 
 		if ( attribute.normalized || attribute.isInterleavedBufferAttribute ) {
 
-			const dstArray = new Float32Array( attribute.getCount() * attribute.itemSize );
+			const dstArray = new Float32Array( attribute.count * attribute.itemSize );
 
-			for ( let i = 0, j = 0; i < attribute.getCount(); i ++ ) {
+			for ( let i = 0, j = 0; i < attribute.count; i ++ ) {
 
 				dstArray[ j ++ ] = attribute.getX( i );
 				dstArray[ j ++ ] = attribute.getY( i );