소스 검색

Frustum: Add missing clsoure variable check.

Mugen87 6 년 전
부모
커밋
6c0300bd8a
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 );