Skip to content

Commit 12b8981

Browse files
committed
EditorControls: pass target for getCenter / getBoundingSphere
1 parent 03f0400 commit 12b8981

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/js/controls/EditorControls.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ THREE.EditorControls = function ( object, domElement ) {
3232
var pointer = new THREE.Vector2();
3333
var pointerOld = new THREE.Vector2();
3434
var spherical = new THREE.Spherical();
35+
var sphere = new THREE.Sphere();
3536

3637
// events
3738

@@ -45,8 +46,8 @@ THREE.EditorControls = function ( object, domElement ) {
4546

4647
if ( box.isEmpty() === false ) {
4748

48-
center.copy( box.getCenter() );
49-
distance = box.getBoundingSphere().radius;
49+
box.getCenter( center );
50+
distance = box.getBoundingSphere( sphere ).radius;
5051

5152
} else {
5253

0 commit comments

Comments
 (0)