|
@@ -63,7 +63,7 @@ THREE.Box2.prototype = {
|
|
|
|
|
|
setFromCenterAndSize: function ( center, size ) {
|
|
setFromCenterAndSize: function ( center, size ) {
|
|
|
|
|
|
- var halfSize = new THREE.Vector2().copy( size ).multiplyScalar( 0.5 );
|
|
|
|
|
|
+ var halfSize = THREE.Box2.__v1.copy( size ).multiplyScalar( 0.5 );
|
|
this.min.copy( center ).subSelf( halfSize );
|
|
this.min.copy( center ).subSelf( halfSize );
|
|
this.max.copy( center ).addSelf( halfSize );
|
|
this.max.copy( center ).addSelf( halfSize );
|
|
|
|
|
|
@@ -217,4 +217,6 @@ THREE.Box2.prototype = {
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
-};
|
|
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+THREE.Box2.__v1 = new THREE.Vector2();
|