Skip to content

Commit

Permalink
Merge pull request #10547 from fictiv/fix_box_sphere_dep
Browse files Browse the repository at this point in the history
Patch over circular dep between Box3 and Sphere
  • Loading branch information
mrdoob authored Jan 12, 2017
2 parents ea70646 + 9c88b59 commit 95c3521
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/math/Sphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ Sphere.prototype = {

setFromPoints: function () {

var box = new Box3();
var box;

return function setFromPoints( points, optionalCenter ) {

if ( box === undefined ) box = new Box3(); // see #10547

var center = this.center;

if ( optionalCenter !== undefined ) {
Expand Down

0 comments on commit 95c3521

Please sign in to comment.