浏览代码

BufferGeometry: Fix .setFromPoints()

Mugen87 7 年之前
父节点
当前提交
9aef29984c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/BufferGeometry.js

+ 1 - 1
src/core/BufferGeometry.js

@@ -341,7 +341,7 @@ Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
 		for ( var i = 0, l = points.length; i < l; i ++ ) {
 
 			var point = points[ i ];
-			position.push( point.x, point.y, 0 );
+			position.push( point.x, point.y, point.z || 0 );
 
 		}