浏览代码

Merge pull request #17194 from Mugen87/dev31

Frustum: Add missing closure variable check.
Michael Herzog 6 年之前
父节点
当前提交
f190ca64c1
共有 1 个文件被更改,包括 2 次插入0 次删除
  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 );