Browse Source

Merge pull request #17194 from Mugen87/dev31

Frustum: Add missing closure variable check.
Michael Herzog 6 years ago
parent
commit
f190ca64c1
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/math/Frustum.js

+ 2 - 0
src/math/Frustum.js

@@ -99,6 +99,8 @@ Object.assign( Frustum.prototype, {
 
 	intersectsSprite: function ( sprite ) {
 
+		if ( _sphere === undefined ) _sphere = new Sphere();
+
 		_sphere.center.set( 0, 0, 0 );
 		_sphere.radius = 0.7071067811865476;
 		_sphere.applyMatrix4( sprite.matrixWorld );