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

BufferGeometry: Got bounding* to work again.

上级 17589f60
......@@ -473,7 +473,7 @@ THREE.BufferGeometry.prototype = {
var bb = this.boundingBox;
bb.makeEmpty();
for ( var i = 0, il = positions.length; i < il; i ++ ) {
for ( var i = 0, il = positions.length; i < il; i += 3 ) {
vector.fromArray( positions, i );
bb.expandByPoint( vector );
......@@ -520,7 +520,7 @@ THREE.BufferGeometry.prototype = {
var center = this.boundingSphere.center;
for ( var i = 0, il = positions.length; i < il; i ++ ) {
for ( var i = 0, il = positions.length; i < il; i += 3 ) {
vector.fromArray( positions, i );
box.expandByPoint( vector );
......@@ -534,7 +534,7 @@ THREE.BufferGeometry.prototype = {
var maxRadiusSq = 0;
for ( var i = 0, il = positions.length; i < il; i ++ ) {
for ( var i = 0, il = positions.length; i < il; i += 3 ) {
vector.fromArray( positions, i );
maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( vector ) );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册