text: !function(){var e,t;e=this,t=function(e,t){"use strict";const r=new t.Matrix4;class i{constructor(e){e=e||{},this.vertices={near:[new t.Vector3,new t.Vector3,new t.Vector3,new t.Vector3],far:[new t.Vector3,new t.Vector3,new t.Vector3,new t.Vector3]},void 0!==e.projectionMatrix&&this.setFromProjectionMatrix(e.projectionMatrix,e.maxFar||1e4)}setFromProjectionMatrix(e,t){const i=0===e.elements[11];return r.copy(e).invert(),this.vertices.near[0].set(1,1,-1),this.vertices.near[1].set(1,-1,-1),this.vertices.near[2].set(-1,-1,-1),this.vertices.near[3].set(-1,1,-1),this.vertices.near.forEach((function(e){e.applyMatrix4(r)})),this.vertices.far[0].set(1,1,1),this.vertices.far[1].set(1,-1,1),this.vertices.far[2].set(-1,-1,1),this.vertices.far[3].set(-1,1,1),this.vertices.far.forEach((function(e){e.applyMatrix4(r);const s=Math.abs(e.z);i?e.z*=Math.min(t/s,1):e.multiplyScalar(Math.min(t/s,1))})),this.vertices}split(e,t){for(;e.length>t.length;)t.push(new i);t.length=e.length;for(let r=0;r<e.length;r++){const i=t[r];if(0===r)for(let e=0;e<4;e++)i.vertices.near[e].copy(this.vertices.near[e]);else for(let t=0;t<4;t++)i.vertices.near[t].lerpVectors(this.vertices.near[t],this.vertices.far[t],e[r-1]);if(r===e.length-1)for(let e=0;e<4;e++)i.vertices.far[e].copy(this.vertices.far[e]);else for(let t=0;t<4;t++)i.vertices.far[t].lerpVectors(this.vertices.near[t],this.vertices.far[t],e[r])}}toSpace(e,t){for(let r=0;r<4;r++)t.vertices.near[r].copy(this.vertices.near[r]).applyMatrix4(e),t.vertices.far[r].copy(this.vertices.far[r]).applyMatrix4(e)}}e.CSMFrustum=i,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("three")):"function"==typeof define&&define.amd?define(["exports","three"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).THREE=e["THREE-STD"]||{},e.THREE)}();
  