提交 fd4c58dc 编写于 作者: M Mr.doob

BufferGeometry/InterleavedBuffer: Set count to 0 if called with undefined array. See clone().

上级 86431a59
......@@ -20,7 +20,7 @@ function BufferAttribute( array, itemSize, normalized ) {
this.array = array;
this.itemSize = itemSize;
this.count = array.length / itemSize;
this.count = array !== undefined ? array.length / itemSize : 0;
this.normalized = normalized === true;
this.dynamic = false;
......
......@@ -10,7 +10,7 @@ function InterleavedBuffer( array, stride ) {
this.array = array;
this.stride = stride;
this.count = array.length / stride;
this.count = array !== undefined ? array.length / stride : 0;
this.dynamic = false;
this.updateRange = { offset: 0, count: - 1 };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册