提交 7ea7d9db 编写于 作者: T Tristan VALCKE

Improve Box3 closure performance

上级 083e99f2
......@@ -300,12 +300,10 @@ Object.assign( Box3.prototype, {
intersectsSphere: ( function () {
var closestPoint;
var closestPoint = new Vector3();
return function intersectsSphere( sphere ) {
if ( closestPoint === undefined ) closestPoint = new Vector3();
// Find the point on the AABB closest to the sphere center.
this.clampPoint( sphere.center, closestPoint );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册