NuclearDispersionSystem/ant-design-vue-jeecg/public/Cesium/Workers/chunk-QQYGWYOJ.js

27 lines
14 KiB
Java
Raw Normal View History

2023-09-18 11:40:16 +08:00
/**
* @license
* Cesium - https://github.com/CesiumGS/cesium
* Version 1.109
*
* 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 tt}from"./chunk-SKT4NNP6.js";import{a as At}from"./chunk-GSCCE6TP.js";import{a as yt}from"./chunk-GH2M3QEY.js";import{a as G}from"./chunk-YYCOBWZH.js";import{a as z}from"./chunk-M3OLDEEW.js";import{a as at}from"./chunk-67OQHZOZ.js";import{a as ht}from"./chunk-FUN3J34G.js";import{b as mt,c as st,d as F}from"./chunk-A4RD4IQP.js";import{a as dt,d as it,f as rt}from"./chunk-NNIY7VTE.js";import{c as bt,d as Q}from"./chunk-5EDTRNG5.js";import{a as S}from"./chunk-IO6LETQ6.js";import{a,b as _t,c as v,d as R}from"./chunk-C6Y3PRDH.js";import{a as I}from"./chunk-LI57NJAL.js";import{a as T}from"./chunk-P44SUSQU.js";import{a as nt,b as H}from"./chunk-FUATUYJ3.js";import{e as K}from"./chunk-ODUTJJQ5.js";var et=new a,pt=new a,xt=new a,wt=new a,w=new Q,Mt=new R,Vt=new R,gt=new rt,Tt=new a,Nt=new a,Et=new a,lt=new _t,Pt=new a,St=new Q,Ft=new Q;function Ot(o,e,t){let n=e.vertexFormat,s=e.center,i=e.semiMajorAxis,r=e.semiMinorAxis,f=e.ellipsoid,h=e.stRotation,E=t?o.length/3*2:o.length/3,g=e.shadowVolume,c=n.st?new Float32Array(E*2):void 0,l=n.normal?new Float32Array(E*3):void 0,A=n.tangent?new Float32Array(E*3):void 0,x=n.bitangent?new Float32Array(E*3):void 0,O=g?new Float32Array(E*3):void 0,B=0,b=Tt,M=Nt,d=Et,_=new dt(f),L=_.project(f.cartesianToCartographic(s,lt),Pt),J=f.scaleToGeodeticSurface(s,et);f.geodeticSurfaceNormal(J,J);let Z=Mt,W=Vt;if(h!==0){let m=rt.fromAxisAngle(J,h,gt);Z=R.fromQuaternion(m,Z),m=rt.fromAxisAngle(J,-h,gt),W=R.fromQuaternion(m,W)}else Z=R.clone(R.IDENTITY,Z),W=R.clone(R.IDENTITY,W);let k=Q.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,St),q=Q.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Ft),j=o.length,y=t?j:0,p=y/3*2;for(let m=0;m<j;m+=3){let u=m+1,N=m+2,D=a.fromArray(o,m,et);if(n.st){let P=R.multiplyByVector(Z,D,pt),C=_.project(f.cartesianToCartographic(P,lt),xt);a.subtract(C,L,C),w.x=(C.x+i)/(2*i),w.y=(C.y+r)/(2*r),k.x=Math.min(w.x,k.x),k.y=Math.min(w.y,k.y),q.x=Math.max(w.x,q.x),q.y=Math.max(w.y,q.y),t&&(c[B+p]=w.x,c[B+1+p]=w.y),c[B++]=w.x,c[B++]=w.y}(n.normal||n.tangent||n.bitangent||g)&&(b=f.geodeticSurfaceNormal(D,b),g&&(O[m+y]=-b.x,O[u+y]=-b.y,O[N+y]=-b.z),(n.normal||n.tangent||n.bitangent)&&((n.tangent||n.bitangent)&&(M=a.normalize(a.cross(a.UNIT_Z,b,M),M),R.multiplyByVector(W,M,M)),n.normal&&(l[m]=b.x,l[u]=b.y,l[N]=b.z,t&&(l[m+y]=-b.x,l[u+y]=-b.y,l[N+y]=-b.z)),n.tangent&&(A[m]=M.x,A[u]=M.y,A[N]=M.z,t&&(A[m+y]=-M.x,A[u+y]=-M.y,A[N+y]=-M.z)),n.bitangent&&(d=a.normalize(a.cross(b,M,d),d),x[m]=d.x,x[u]=d.y,x[N]=d.z,t&&(x[m+y]=d.x,x[u+y]=d.y,x[N+y]=d.z))))}if(n.st){j=c.length;for(let m=0;m<j;m+=2)c[m]=(c[m]-k.x)/(q.x-k.x),c[m+1]=(c[m+1]-k.y)/(q.y-k.y)}let V=new ht;if(n.position){let m=tt.raisePositionsToHeight(o,e,t);V.position=new F({componentDatatype:S.DOUBLE,componentsPerAttribute:3,values:m})}if(n.st&&(V.st=new F({componentDatatype:S.FLOAT,componentsPerAttribute:2,values:c})),n.normal&&(V.normal=new F({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:l})),n.tangent&&(V.tangent=new F({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:A})),n.bitangent&&(V.bitangent=new F({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:x})),g&&(V.extrudeDirection=new F({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:O})),t&&K(e.offsetAttribute)){let m=new Uint8Array(E);if(e.offsetAttribute===G.TOP)m=m.fill(1,0,E/2);else{let u=e.offsetAttribute===G.NONE?0:1;m=m.fill(u)}V.applyOffset=new F({componentDatatype:S.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return V}function jt(o){let e=new Array(12*(o*(o+1))-6),t=0,n,s,i,r,f;for(n=0,i=1,r=0;r<3;r++)e[t++]=i++,e[t++]=n,e[t++]=i;for(r=2;r<o+1;++r){for(i=r*(r+1)-1,n=(r-1)*r-1,e[t++]=i++,e[t++]=n,e[t++]=i,s=2*r,f=0;f<s-1;++f)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;e[t++]=i++,e[t++]=n,e[t++]=i}for(s=o*2,++i,++n,r=0;r<s-1;++r)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;for(e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n++,e[t++]=n,++n,r=o-1;r>1;--r){for(e[t++]=n++,e[t++]=n,e[t++]=i,s=2*r,f=0;f<s-1;++f)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;