ts/public/js/Cesium2/Workers/chunk-HTYD62GU.js

27 lines
12 KiB
JavaScript
Raw Normal View History

2025-01-06 01:18:58 +00:00
/**
* @license
* Cesium - https://github.com/CesiumGS/cesium
* Version 1.124
*
* Copyright 2011-2022 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
*/
import{a as R}from"./chunk-HQ4YU6WD.js";import{a as st}from"./chunk-72CGGEJF.js";import{a as Z,b as H}from"./chunk-WJYW7YDO.js";import{a as V}from"./chunk-GJI4ZBKE.js";import{a as U}from"./chunk-RDAVO5OM.js";import{b as it}from"./chunk-PY4CW263.js";import{a as ct}from"./chunk-RRZIPF5C.js";import{a as ot}from"./chunk-34ULWVZF.js";import{a as nt}from"./chunk-24JYWT5N.js";import{b as J,c as X,d as z}from"./chunk-LH3SUUXG.js";import{f as K}from"./chunk-M3A6SPGI.js";import{a as k}from"./chunk-D5HNP2LB.js";import{a as w,b as q,c as M,d as et,e as F}from"./chunk-S4VBGY2U.js";import{a as I}from"./chunk-UCTPWOTZ.js";import{a as tt}from"./chunk-N3A5CZ2S.js";import{e as x}from"./chunk-3THTQ4QB.js";function dt(n,i){this.positions=x(n)?n:[],this.holes=x(i)?i:[]}var rt=dt;function S(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(S.prototype,{length:{get:function(){return this._length}}});S.prototype.enqueue=function(n){this._array.push(n),this._length++};S.prototype.dequeue=function(){if(this._length===0)return;let n=this._array,i=this._offset,u=n[i];return n[i]=void 0,i++,i>10&&i*2>n.length&&(this._array=n.slice(i),i=0),this._offset=i,this._length--,u};S.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};S.prototype.contains=function(n){return this._array.indexOf(n)!==-1};S.prototype.clear=function(){this._array.length=this._offset=this._length=0};S.prototype.sort=function(n){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(n)};var $=S;var b={};b.computeHierarchyPackedLength=function(n,i){let u=0,c=[n];for(;c.length>0;){let r=c.pop();if(!x(r))continue;u+=2;let a=r.positions,t=r.holes;if(x(a)&&a.length>0&&(u+=a.length*i.packedLength),x(t)){let o=t.length;for(let e=0;e<o;++e)c.push(t[e])}}return u};b.packPolygonHierarchy=function(n,i,u,c){let r=[n];for(;r.length>0;){let a=r.pop();if(!x(a))continue;let t=a.positions,o=a.holes;if(i[u++]=x(t)?t.length:0,i[u++]=x(o)?o.length:0,x(t)){let e=t.length;for(let s=0;s<e;++s,u+=c.packedLength)c.pack(t[s],i,u)}if(x(o)){let e=o.length;for(let s=0;s<e;++s)r.push(o[s])}}return u};b.unpackPolygonHierarchy=function(n,i,u){let c=n[i++],r=n[i++],a=new Array(c),t=r>0?new Array(r):void 0;for(let o=0;o<c;++o,i+=u.packedLength)a[o]=u.unpack(n,i);for(let o=0;o<r;++o)t[o]=b.unpackPolygonHierarchy(n,i,u),i=t[o].startingIndex,delete t[o].startingIndex;return{positions:a,holes:t,startingIndex:i}};var O=new M;function ht(n,i,u,c){return M.subtract(i,n,O),M.multiplyByScalar(O,u/c,O),M.add(n,O,O),[O.x,O.y]}var G=new w;function gt(n,i,u,c){return w.subtract(i,n,G),w.multiplyByScalar(G,u/c,G),w.add(n,G,G),[G.x,G.y,G.z]}b.subdivideLineCount=function(n,i,u){let r=w.distance(n,i)/u,a=Math.max(0,Math.ceil(I.log2(r)));return Math.pow(2,a)};var j=new q,Q=new q,pt=new q,mt=new w,Y=new U;b.subdivideRhumbLineCount=function(n,i,u,c){let r=n.cartesianToCartographic(i,j),a=n.cartesianToCartographic(u,Q),o=new U(r,a,n).surfaceDistance/c,e=Math.max(0,Math.ceil(I.log2(o)));return Math.pow(2,e)};b.subdivideTexcoordLine=function(n,i,u,c,r,a){let t=b.subdivideLineCount(u,c,r),o=M.distance(n,i),e=o/t,s=a;s.length=t*2;let l=0;for(let h=0;h<t;h++){let f=ht(n,i,h*e,o);s[l++]=f[0],s[l++]=f[1]}return s};b.subdivideLine=function(n,i,u,c){let r=b.subdivideLineCount(n,i,u),a=w.distance(n,i),t=a/r;x(c)||(c=[]);let o=c;o.length=r*3;let e=0;for(let s=0;s<r;s++){let l=gt(n,i,s*t,a);o[e++]=l[0],o[e++]=l[1],o[e++]=l[2]}return o};b.subdivideTexcoordRhumbLine=function(n,i,u,c,r,a,t){let o=u.cartesianToCartographic(c,j),e=u.cartesianToCartographic(r,Q);Y.setEndPoints(o,e);let s=Y.surfaceDistance/a,l=Math.max(0,Math.ceil(I.log2(s))),h=Math.pow(2,l),f=M.distance(n,i),g=f/h,m=t;m.length=h*2;let p=0;for(let d=0;d<h;d++){let y=ht(n,i,d*g,f);m[p++]=y[0],m[p++]=y[1]}return m};b.subdivideRhumbLine=function(n,i,u,c,r){let a=n.cartesianToCartographic(i,j),t=n.cartesianToCartographic(u,Q),o=new U(a,t,n),e=o.surfaceDistance/c,s=Math.max(0,Math.ceil(I.log2(e))),l=Math.pow(2,s),h=o.surfaceDistance/l;x(r)||(r=[]);let f=r;f.length=l*3;let g=0;for(let m=0;m<l;m++){let p=o.i