@anov/gis 1.7.6 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +37 -0
- package/CHANGELOG.md +82 -0
- package/README.md +338 -127
- package/dist/index.css +1 -1
- package/dist/index.js +18012 -58
- package/dist/resources/Assets/approximateTerrainHeights.json +1 -1
- package/dist/resources/ThirdParty/Workers/package.json +1 -0
- package/dist/resources/ThirdParty/Workers/zip-web-worker.js +1 -0
- package/dist/resources/ThirdParty/draco_decoder.wasm +0 -0
- package/dist/resources/ThirdParty/google-earth-dbroot-parser.js +1 -1
- package/dist/resources/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/dist/resources/ThirdParty/zip-module.wasm +0 -0
- package/dist/resources/Widgets/Animation/Animation.css +127 -1
- package/dist/resources/Widgets/Animation/lighter.css +70 -1
- package/dist/resources/Widgets/BaseLayerPicker/BaseLayerPicker.css +108 -1
- package/dist/resources/Widgets/BaseLayerPicker/lighter.css +22 -1
- package/dist/resources/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +102 -1
- package/dist/resources/Widgets/CesiumInspector/CesiumInspector.css +113 -1
- package/dist/resources/Widgets/CesiumWidget/CesiumWidget.css +119 -1
- package/dist/resources/Widgets/CesiumWidget/lighter.css +14 -1
- package/dist/resources/Widgets/FullscreenButton/FullscreenButton.css +8 -1
- package/dist/resources/Widgets/Geocoder/Geocoder.css +70 -1
- package/dist/resources/Widgets/Geocoder/lighter.css +17 -1
- package/dist/resources/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +27 -0
- package/dist/resources/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/azureAerial.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/azureRoads.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/googleContour.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/googleRoadmap.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/googleSatellite.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/googleSatelliteLabels.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
- package/dist/resources/Widgets/InfoBox/InfoBox.css +92 -1
- package/dist/resources/Widgets/InfoBox/InfoBoxDescription.css +178 -1
- package/dist/resources/Widgets/NavigationHelpButton/NavigationHelpButton.css +93 -1
- package/dist/resources/Widgets/NavigationHelpButton/lighter.css +38 -1
- package/dist/resources/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +15 -1
- package/dist/resources/Widgets/ProjectionPicker/ProjectionPicker.css +38 -1
- package/dist/resources/Widgets/SceneModePicker/SceneModePicker.css +56 -1
- package/dist/resources/Widgets/SelectionIndicator/SelectionIndicator.css +20 -1
- package/dist/resources/Widgets/Timeline/Timeline.css +103 -1
- package/dist/resources/Widgets/Timeline/lighter.css +23 -1
- package/dist/resources/Widgets/VRButton/VRButton.css +8 -1
- package/dist/resources/Widgets/Viewer/Viewer.css +107 -1
- package/dist/resources/Widgets/VoxelInspector/VoxelInspector.css +16 -0
- package/dist/resources/Widgets/lighter.css +237 -1
- package/dist/resources/Widgets/lighterShared.css +46 -1
- package/dist/resources/Widgets/shared.css +103 -1
- package/dist/resources/Widgets/widgets.css +1342 -1
- package/dist/resources/Workers/chunk-2AIOP76V.js +25 -0
- package/dist/resources/Workers/chunk-37ETYCYM.js +25 -0
- package/dist/resources/Workers/chunk-3E7FIXV7.js +25 -0
- package/dist/resources/Workers/chunk-3N6OW3OY.js +25 -0
- package/dist/resources/Workers/{ArcType-de5d8777.js → chunk-3VUCSHGU.js} +2 -2
- package/dist/resources/Workers/chunk-4KY4VMEH.js +25 -0
- package/dist/resources/Workers/chunk-4WQ4VT5S.js +25 -0
- package/dist/resources/Workers/chunk-5AAMOBJK.js +25 -0
- package/dist/resources/Workers/chunk-5DGDPBQU.js +25 -0
- package/dist/resources/Workers/chunk-5VFNV3LW.js +25 -0
- package/dist/resources/Workers/chunk-5Z36UAB7.js +25 -0
- package/dist/resources/Workers/chunk-6AEO73KW.js +25 -0
- package/dist/resources/Workers/chunk-6DLS2UKD.js +25 -0
- package/dist/resources/Workers/{GeometryAttributes-734a3446.js → chunk-6EINM7EY.js} +2 -2
- package/dist/resources/Workers/chunk-6W2XFGWI.js +25 -0
- package/dist/resources/Workers/chunk-7GCQCPLT.js +25 -0
- package/dist/resources/Workers/chunk-7TN3TOVQ.js +25 -0
- package/dist/resources/Workers/chunk-A4I25VN7.js +25 -0
- package/dist/resources/Workers/{GeometryOffsetAttribute-59b14f45.js → chunk-AJH5KBOO.js} +2 -2
- package/dist/resources/Workers/chunk-AKELQO2L.js +25 -0
- package/dist/resources/Workers/chunk-ALIHIWSS.js +25 -0
- package/dist/resources/Workers/chunk-ATKJRN2G.js +25 -0
- package/dist/resources/Workers/chunk-BDWA46XV.js +25 -0
- package/dist/resources/Workers/chunk-BKIYVF74.js +25 -0
- package/dist/resources/Workers/chunk-BPABSUDY.js +25 -0
- package/dist/resources/Workers/chunk-D3TVNJ6W.js +25 -0
- package/dist/resources/Workers/chunk-DM7KUSL2.js +25 -0
- package/dist/resources/Workers/chunk-E7EKLP3B.js +25 -0
- package/dist/resources/Workers/{GeometryInstance-4bfcfe78.js → chunk-G2QPRBZU.js} +2 -2
- package/dist/resources/Workers/chunk-G3GDHHWO.js +25 -0
- package/dist/resources/Workers/chunk-G72JFEXW.js +25 -0
- package/dist/resources/Workers/chunk-IAE6APK2.js +25 -0
- package/dist/resources/Workers/chunk-IEITL4VO.js +25 -0
- package/dist/resources/Workers/chunk-LHBFSFJE.js +25 -0
- package/dist/resources/Workers/chunk-LN2UT4R3.js +25 -0
- package/dist/resources/Workers/chunk-LNJEJFV5.js +66 -0
- package/dist/resources/Workers/{defaultValue-97284df2.js → chunk-ML6MR2RA.js} +2 -2
- package/dist/resources/Workers/chunk-MOHWP7VV.js +25 -0
- package/dist/resources/Workers/chunk-NZBME2JK.js +25 -0
- package/dist/resources/Workers/chunk-P5EFSOUF.js +25 -0
- package/dist/resources/Workers/chunk-P7N43FDO.js +25 -0
- package/dist/resources/Workers/{combine-d11b1f00.js → chunk-PEDE2P3Q.js} +2 -2
- package/dist/resources/Workers/chunk-PSIOCLX7.js +25 -0
- package/dist/resources/Workers/chunk-PYMQNHFO.js +25 -0
- package/dist/resources/Workers/chunk-QJTXFT4R.js +25 -0
- package/dist/resources/Workers/chunk-QNPYEODC.js +25 -0
- package/dist/resources/Workers/chunk-QS7V5G6Y.js +25 -0
- package/dist/resources/Workers/chunk-RDX4QSUS.js +25 -0
- package/dist/resources/Workers/chunk-RESOCDYZ.js +25 -0
- package/dist/resources/Workers/chunk-SRA5MBUT.js +25 -0
- package/dist/resources/Workers/chunk-TCOMWBL2.js +25 -0
- package/dist/resources/Workers/chunk-UA7PAMQQ.js +25 -0
- package/dist/resources/Workers/chunk-W5OEMTMB.js +25 -0
- package/dist/resources/Workers/chunk-WGIRJIIK.js +25 -0
- package/dist/resources/Workers/{CylinderGeometryLibrary-24ad1484.js → chunk-XRJOFXJF.js} +2 -2
- package/dist/resources/Workers/chunk-YP4SXJYZ.js +25 -0
- package/dist/resources/Workers/chunk-Z7Q4J7AE.js +25 -0
- package/dist/resources/Workers/combineGeometry.js +2 -2
- package/dist/resources/Workers/createBoxGeometry.js +2 -2
- package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCircleGeometry.js +2 -2
- package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -2
- package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCorridorGeometry.js +2 -2
- package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCylinderGeometry.js +2 -2
- package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createEllipseGeometry.js +2 -2
- package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createEllipsoidGeometry.js +2 -2
- package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createFrustumGeometry.js +2 -2
- package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createGeometry.js +2 -2
- package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -2
- package/dist/resources/Workers/createPlaneGeometry.js +2 -2
- package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createPolygonGeometry.js +2 -2
- package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createPolylineGeometry.js +2 -2
- package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -2
- package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createRectangleGeometry.js +2 -2
- package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -2
- package/dist/resources/Workers/createSphereGeometry.js +2 -2
- package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createTaskProcessorWorker.js +2 -2
- package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -2
- package/dist/resources/Workers/createVectorTileGeometries.js +2 -2
- package/dist/resources/Workers/createVectorTilePoints.js +2 -2
- package/dist/resources/Workers/createVectorTilePolygons.js +2 -2
- package/dist/resources/Workers/createVectorTilePolylines.js +2 -2
- package/dist/resources/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -0
- package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
- package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -4
- package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
- package/dist/resources/Workers/createWallGeometry.js +2 -2
- package/dist/resources/Workers/createWallOutlineGeometry.js +2 -2
- package/dist/resources/Workers/decodeDraco.js +2 -2
- package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/dist/resources/Workers/decodeI3S.js +25 -0
- package/dist/resources/Workers/gaussianSplatSorter.js +25 -0
- package/dist/resources/Workers/{_commonjsHelpers-3aae1032-65601a27.js → gaussianSplatTextureGenerator.js} +2 -2
- package/dist/resources/Workers/incrementallyBuildTerrainPicker.js +25 -0
- package/dist/resources/Workers/transcodeKTX2.js +2 -2
- package/dist/resources/Workers/transferTypedArrayTest.js +25 -1
- package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -2
- package/dist/resources/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -0
- package/dist/resources/static/js/viewerCesiumNavigationMixin.js +1 -1
- package/package.json +13 -13
- package/scripts/release.js +323 -0
- package/dist/resources/ThirdParty/Workers/basis_transcoder.js +0 -1
- package/dist/resources/ThirdParty/Workers/draco_decoder_nodejs.js +0 -1
- package/dist/resources/ThirdParty/Workers/pako_deflate.min.js +0 -1
- package/dist/resources/ThirdParty/Workers/pako_inflate.min.js +0 -1
- package/dist/resources/ThirdParty/Workers/z-worker-pako.js +0 -1
- package/dist/resources/Widgets/Images/ImageryProviders/esriNationalGeographic.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/esriWorldImagery.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/esriWorldStreetMap.png +0 -0
- package/dist/resources/Workers/AttributeCompression-5744d52e.js +0 -25
- package/dist/resources/Workers/AxisAlignedBoundingBox-b1c095aa.js +0 -25
- package/dist/resources/Workers/BoundingRectangle-2b0ebbdd.js +0 -25
- package/dist/resources/Workers/BoxGeometry-acd0c697.js +0 -25
- package/dist/resources/Workers/Color-c7fd1307.js +0 -25
- package/dist/resources/Workers/ComponentDatatype-e7fbe225.js +0 -25
- package/dist/resources/Workers/CoplanarPolygonGeometryLibrary-edaba606.js +0 -25
- package/dist/resources/Workers/CorridorGeometryLibrary-ab3e6481.js +0 -25
- package/dist/resources/Workers/CylinderGeometry-679e50b4.js +0 -25
- package/dist/resources/Workers/EllipseGeometry-e6f948bb.js +0 -25
- package/dist/resources/Workers/EllipseGeometryLibrary-0adcaeed.js +0 -25
- package/dist/resources/Workers/EllipseOutlineGeometry-418492dc.js +0 -25
- package/dist/resources/Workers/EllipsoidGeodesic-ed8a0e40.js +0 -25
- package/dist/resources/Workers/EllipsoidGeometry-539fb9e2.js +0 -25
- package/dist/resources/Workers/EllipsoidOutlineGeometry-6c13760b.js +0 -25
- package/dist/resources/Workers/EllipsoidRhumbLine-60f14314.js +0 -25
- package/dist/resources/Workers/EllipsoidTangentPlane-7ae496b2.js +0 -25
- package/dist/resources/Workers/EncodedCartesian3-a9a8a281.js +0 -25
- package/dist/resources/Workers/FrustumGeometry-be9b9578.js +0 -25
- package/dist/resources/Workers/GeometryAttribute-fd1d7e90.js +0 -25
- package/dist/resources/Workers/GeometryPipeline-a847e31f.js +0 -25
- package/dist/resources/Workers/IndexDatatype-65271ba3.js +0 -25
- package/dist/resources/Workers/IntersectionTests-33ace2d6.js +0 -25
- package/dist/resources/Workers/Matrix2-73789715.js +0 -25
- package/dist/resources/Workers/OrientedBoundingBox-ee3011f6.js +0 -25
- package/dist/resources/Workers/Plane-e916220d.js +0 -25
- package/dist/resources/Workers/PolygonGeometryLibrary-0f0c78d4.js +0 -25
- package/dist/resources/Workers/PolygonPipeline-00dc0c6e.js +0 -25
- package/dist/resources/Workers/PolylinePipeline-ebd42f23.js +0 -25
- package/dist/resources/Workers/PolylineVolumeGeometryLibrary-a4b92b4e.js +0 -25
- package/dist/resources/Workers/PrimitivePipeline-42d69f96.js +0 -25
- package/dist/resources/Workers/RectangleGeometryLibrary-cff60d30.js +0 -25
- package/dist/resources/Workers/RuntimeError-4f8ec8a2.js +0 -25
- package/dist/resources/Workers/TerrainEncoding-080f16eb.js +0 -25
- package/dist/resources/Workers/Transforms-d3d3b2a9.js +0 -66
- package/dist/resources/Workers/VertexFormat-9886cb81.js +0 -25
- package/dist/resources/Workers/WallGeometryLibrary-27f90b78.js +0 -25
- package/dist/resources/Workers/WebGLConstants-6da700a2.js +0 -25
- package/dist/resources/Workers/WebMercatorProjection-04ef6bc3.js +0 -25
- package/dist/resources/Workers/arrayRemoveDuplicates-6f91355d.js +0 -25
- package/dist/resources/Workers/cesiumWorkerBootstrapper.js +0 -6
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.143.0
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
import{h as O,i as R,j as G,k as L}from"./chunk-LNJEJFV5.js";import{b as E}from"./chunk-BPABSUDY.js";import{a as u}from"./chunk-RDX4QSUS.js";import{a as N,b as s}from"./chunk-2AIOP76V.js";import{a as S,b as y,c as A}from"./chunk-IAE6APK2.js";import{a as I,b as w}from"./chunk-NZBME2JK.js";import{f}from"./chunk-6DLS2UKD.js";var F={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3};Object.freeze(F);var M=F,e={POINTS:u.POINTS,LINES:u.LINES,LINE_LOOP:u.LINE_LOOP,LINE_STRIP:u.LINE_STRIP,TRIANGLES:u.TRIANGLES,TRIANGLE_STRIP:u.TRIANGLE_STRIP,TRIANGLE_FAN:u.TRIANGLE_FAN,isLines:function(t){return t===e.LINES||t===e.LINE_LOOP||t===e.LINE_STRIP},isTriangles:function(t){return t===e.TRIANGLES||t===e.TRIANGLE_STRIP||t===e.TRIANGLE_FAN},validate:function(t){return t===e.POINTS||t===e.LINES||t===e.LINE_LOOP||t===e.LINE_STRIP||t===e.TRIANGLES||t===e.TRIANGLE_STRIP||t===e.TRIANGLE_FAN}};Object.freeze(e);var g=e;function _(t){t=t??A.EMPTY_OBJECT,w.typeOf.object("options.attributes",t.attributes),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=t.primitiveType??g.TRIANGLES,this.boundingSphere=t.boundingSphere,this.geometryType=t.geometryType??M.NONE,this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}_.computeNumberOfVertices=function(t){w.typeOf.object("geometry",t);let e=-1;for(let n in t.attributes)if(t.attributes.hasOwnProperty(n)&&f(t.attributes[n])&&f(t.attributes[n].values)){let r=t.attributes[n],i=r.values.length/r.componentsPerAttribute;if(e!==i&&-1!==e)throw new I("All attribute lists must have the same number of attributes.");e=i}return e};var W=new N,H=new S,V=new E,Z=[new N,new N,new N],K=[new s,new s,new s],$=[new s,new s,new s],tt=new S,et=new O,rt=new E,nt=new L;_._textureCoordinateRotationPoints=function(t,e,n,r){let i,o=G.center(r,W),a=N.toCartesian(o,n,H),u=R.eastNorthUpToFixedFrame(a,n,V),I=E.inverse(u,V),m=K,p=Z;p[0].longitude=r.west,p[0].latitude=r.south,p[1].longitude=r.west,p[1].latitude=r.north,p[2].longitude=r.east,p[2].latitude=r.south;let c=tt;for(i=0;i<3;i++)N.toCartesian(p[i],n,c),c=E.multiplyByPointAsVector(I,c,c),m[i].x=c.x,m[i].y=c.y;let T=O.fromAxisAngle(S.UNIT_Z,-e,et),f=y.fromQuaternion(T,rt),A=t.length,b=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,P=Number.NEGATIVE_INFINITY;for(i=0;i<A;i++)c=E.multiplyByPointAsVector(I,t[i],c),c=y.multiplyByVector(f,c,c),b=Math.min(b,c.x),h=Math.min(h,c.y),l=Math.max(l,c.x),P=Math.max(P,c.y);let w=L.fromRotation(e,nt),_=$;_[0].x=b,_[0].y=h,_[1].x=b,_[1].y=P,_[2].x=l,_[2].y=h;let d=m[0],x=m[2].x-d.x,g=m[1].y-d.y;for(i=0;i<3;i++){let t=_[i];L.multiplyByVector(w,t,t),t.x=(t.x-d.x)/x,t.y=(t.y-d.y)/g}let v=_[0],F=_[1],j=_[2],k=new Array(6);return s.pack(v,k),s.pack(F,k,2),s.pack(j,k,4),k};var Lt=_;function ot(t){if(t=t??A.EMPTY_OBJECT,!f(t.componentDatatype))throw new I("options.componentDatatype is required.");if(!f(t.componentsPerAttribute))throw new I("options.componentsPerAttribute is required.");if(t.componentsPerAttribute<1||t.componentsPerAttribute>4)throw new I("options.componentsPerAttribute must be between 1 and 4.");if(!f(t.values))throw new I("options.values is required.");this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=t.normalize??!1,this.values=t.values}var Ot=ot;export{M as a,g as b,Lt as c,Ot as d};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.143.0
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
* Portions licensed separately.
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
var e={NONE:0,GEODESIC:1,RHUMB:2};Object.freeze(e);var t=e;export{t as a};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.143.0
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
import{c as O}from"./chunk-IAE6APK2.js";import{a as f}from"./chunk-NZBME2JK.js";import{f as t}from"./chunk-6DLS2UKD.js";function n(n){n=n??O.EMPTY_OBJECT,this.position=n.position??!1,this.normal=n.normal??!1,this.st=n.st??!1,this.bitangent=n.bitangent??!1,this.tangent=n.tangent??!1,this.color=n.color??!1}n.POSITION_ONLY=Object.freeze(new n({position:!0})),n.POSITION_AND_NORMAL=Object.freeze(new n({position:!0,normal:!0})),n.POSITION_NORMAL_AND_ST=Object.freeze(new n({position:!0,normal:!0,st:!0})),n.POSITION_AND_ST=Object.freeze(new n({position:!0,st:!0})),n.POSITION_AND_COLOR=Object.freeze(new n({position:!0,color:!0})),n.ALL=Object.freeze(new n({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0})),n.DEFAULT=n.POSITION_NORMAL_AND_ST,n.packedLength=6,n.pack=function(n,e,o){if(!t(n))throw new f("value is required");if(!t(e))throw new f("array is required");return o=o??0,e[o++]=n.position?1:0,e[o++]=n.normal?1:0,e[o++]=n.st?1:0,e[o++]=n.tangent?1:0,e[o++]=n.bitangent?1:0,e[o]=n.color?1:0,e},n.unpack=function(e,o,i){if(!t(e))throw new f("array is required");return o=o??0,t(i)||(i=new n),i.position=1===e[o++],i.normal=1===e[o++],i.st=1===e[o++],i.tangent=1===e[o++],i.bitangent=1===e[o++],i.color=1===e[o],i},n.clone=function(e,o){if(t(e))return t(o)||(o=new n),o.position=e.position,o.normal=e.normal,o.st=e.st,o.tangent=e.tangent,o.bitangent=e.bitangent,o.color=e.color,o};var _=n;export{_ as a};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.143.0
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
import{a as b}from"./chunk-ML6MR2RA.js";import{a as u}from"./chunk-AKELQO2L.js";import{a as O}from"./chunk-6EINM7EY.js";import{b as w,c as h,d as y}from"./chunk-A4I25VN7.js";import{c as l}from"./chunk-D3TVNJ6W.js";import{a as p}from"./chunk-ATKJRN2G.js";import{a as i,c as A}from"./chunk-IAE6APK2.js";import{a as d,b as c}from"./chunk-NZBME2JK.js";import{f as x}from"./chunk-6DLS2UKD.js";var D=new i;function f(t){let e=(t=t??A.EMPTY_OBJECT).minimum,n=t.maximum;if(c.typeOf.object("min",e),c.typeOf.object("max",n),x(t.offsetAttribute)&&t.offsetAttribute===b.TOP)throw new d("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");let r=t.vertexFormat??u.DEFAULT;this._minimum=i.clone(e),this._maximum=i.clone(n),this._vertexFormat=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createBoxGeometry"}f.fromDimensions=function(t){let e=(t=t??A.EMPTY_OBJECT).dimensions;c.typeOf.object("dimensions",e),c.typeOf.number.greaterThanOrEquals("dimensions.x",e.x,0),c.typeOf.number.greaterThanOrEquals("dimensions.y",e.y,0),c.typeOf.number.greaterThanOrEquals("dimensions.z",e.z,0);let n=i.multiplyByScalar(e,.5,new i);return new f({minimum:i.negate(n,new i),maximum:n,vertexFormat:t.vertexFormat,offsetAttribute:t.offsetAttribute})},f.fromAxisAlignedBoundingBox=function(t){return c.typeOf.object("boundingBox",t),new f({minimum:t.minimum,maximum:t.maximum})},f.packedLength=2*i.packedLength+u.packedLength+1,f.pack=function(t,e,n){return c.typeOf.object("value",t),c.defined("array",e),n=n??0,i.pack(t._minimum,e,n),i.pack(t._maximum,e,n+i.packedLength),u.pack(t._vertexFormat,e,n+2*i.packedLength),e[n+2*i.packedLength+u.packedLength]=t._offsetAttribute??-1,e};var z,_=new i,g=new i,k=new u,F={minimum:_,maximum:g,vertexFormat:k,offsetAttribute:void 0};f.unpack=function(t,e,n){c.defined("array",t),e=e??0;let r=i.unpack(t,e,_),o=i.unpack(t,e+i.packedLength,g),a=u.unpack(t,e+2*i.packedLength,k),m=t[e+2*i.packedLength+u.packedLength];return x(n)?(n._minimum=i.clone(r,n._minimum),n._maximum=i.clone(o,n._maximum),n._vertexFormat=u.clone(a,n._vertexFormat),n._offsetAttribute=-1===m?void 0:m,n):(F.offsetAttribute=-1===m?void 0:m,new f(F))},f.createGeometry=function(t){let e=t._minimum,n=t._maximum,r=t._vertexFormat;if(i.equals(e,n))return;let o,a,m=new O;if(r.position&&(r.st||r.normal||r.tangent||r.bitangent)){if(r.position&&(a=new Float64Array(72),a[0]=e.x,a[1]=e.y,a[2]=n.z,a[3]=n.x,a[4]=e.y,a[5]=n.z,a[6]=n.x,a[7]=n.y,a[8]=n.z,a[9]=e.x,a[10]=n.y,a[11]=n.z,a[12]=e.x,a[13]=e.y,a[14]=e.z,a[15]=n.x,a[16]=e.y,a[17]=e.z,a[18]=n.x,a[19]=n.y,a[20]=e.z,a[21]=e.x,a[22]=n.y,a[23]=e.z,a[24]=n.x,a[25]=e.y,a[26]=e.z,a[27]=n.x,a[28]=n.y,a[29]=e.z,a[30]=n.x,a[31]=n.y,a[32]=n.z,a[33]=n.x,a[34]=e.y,a[35]=n.z,a[36]=e.x,a[37]=e.y,a[38]=e.z,a[39]=e.x,a[40]=n.y,a[41]=e.z,a[42]=e.x,a[43]=n.y,a[44]=n.z,a[45]=e.x,a[46]=e.y,a[47]=n.z,a[48]=e.x,a[49]=n.y,a[50]=e.z,a[51]=n.x,a[52]=n.y,a[53]=e.z,a[54]=n.x,a[55]=n.y,a[56]=n.z,a[57]=e.x,a[58]=n.y,a[59]=n.z,a[60]=e.x,a[61]=e.y,a[62]=e.z,a[63]=n.x,a[64]=e.y,a[65]=e.z,a[66]=n.x,a[67]=e.y,a[68]=n.z,a[69]=e.x,a[70]=e.y,a[71]=n.z,m.position=new y({componentDatatype:p.DOUBLE,componentsPerAttribute:3,values:a})),r.normal){let t=new Float32Array(72);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,t[12]=0,t[13]=0,t[14]=-1,t[15]=0,t[16]=0,t[17]=-1,t[18]=0,t[19]=0,t[20]=-1,t[21]=0,t[22]=0,t[23]=-1,t[24]=1,t[25]=0,t[26]=0,t[27]=1,t[28]=0,t[29]=0,t[30]=1,t[31]=0,t[32]=0,t[33]=1,t[34]=0,t[35]=0,t[36]=-1,t[37]=0,t[38]=0,t[39]=-1,t[40]=0,t[41]=0,t[42]=-1,t[43]=0,t[44]=0,t[45]=-1,t[46]=0,t[47]=0,t[48]=0,t[49]=1,t[50]=0,t[51]=0,t[52]=1,t[53]=0,t[54]=0,t[55]=1,t[56]=0,t[57]=0,t[58]=1,t[59]=0,t[60]=0,t[61]=-1,t[62]=0,t[63]=0,t[64]=-1,t[65]=0,t[66]=0,t[67]=-1,t[68]=0,t[69]=0,t[70]=-1,t[71]=0,m.normal=new y({componentDatatype:p.FLOAT,componentsPerAttribute:3,values:t})}if(r.st){let t=new Float32Array(48);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,t[8]=1,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=1,t[14]=1,t[15]=1,t[16]=0,t[17]=0,t[18]=1,t[19]=0,t[20]=1,t[21]=1,t[22]=0,t[23]=1,t[24]=1,t[25]=0,t[26]=0,t[27]=0,t[28]=0,t[29]=1,t[30]=1,t[31]=1,t[32]=1,t[33]=0,t[34]=0,t[35]=0,t[36]=0,t[37]=1,t[38]=1,t[39]=1,t[40]=0,t[41]=0,t[42]=1,t[43]=0,t[44]=1,t[45]=1,t[46]=0,t[47]=1,m.st=new y({componentDatatype:p.FLOAT,componentsPerAttribute:2,values:t})}if(r.tangent){let t=new Float32Array(72);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,t[12]=-1,t[13]=0,t[14]=0,t[15]=-1,t[16]=0,t[17]=0,t[18]=-1,t[19]=0,t[20]=0,t[21]=-1,t[22]=0,t[23]=0,t[24]=0,t[25]=1,t[26]=0,t[27]=0,t[28]=1,t[29]=0,t[30]=0,t[31]=1,t[32]=0,t[33]=0,t[34]=1,t[35]=0,t[36]=0,t[37]=-1,t[38]=0,t[39]=0,t[40]=-1,t[41]=0,t[42]=0,t[43]=-1,t[44]=0,t[45]=0,t[46]=-1,t[47]=0,t[48]=-1,t[49]=0,t[50]=0,t[51]=-1,t[52]=0,t[53]=0,t[54]=-1,t[55]=0,t[56]=0,t[57]=-1,t[58]=0,t[59]=0,t[60]=1,t[61]=0,t[62]=0,t[63]=1,t[64]=0,t[65]=0,t[66]=1,t[67]=0,t[68]=0,t[69]=1,t[70]=0,t[71]=0,m.tangent=new y({componentDatatype:p.FLOAT,componentsPerAttribute:3,values:t})}if(r.bitangent){let t=new Float32Array(72);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=1,t[14]=0,t[15]=0,t[16]=1,t[17]=0,t[18]=0,t[19]=1,t[20]=0,t[21]=0,t[22]=1,t[23]=0,t[24]=0,t[25]=0,t[26]=1,t[27]=0,t[28]=0,t[29]=1,t[30]=0,t[31]=0,t[32]=1,t[33]=0,t[34]=0,t[35]=1,t[36]=0,t[37]=0,t[38]=1,t[39]=0,t[40]=0,t[41]=1,t[42]=0,t[43]=0,t[44]=1,t[45]=0,t[46]=0,t[47]=1,t[48]=0,t[49]=0,t[50]=1,t[51]=0,t[52]=0,t[53]=1,t[54]=0,t[55]=0,t[56]=1,t[57]=0,t[58]=0,t[59]=1,t[60]=0,t[61]=0,t[62]=1,t[63]=0,t[64]=0,t[65]=1,t[66]=0,t[67]=0,t[68]=1,t[69]=0,t[70]=0,t[71]=1,m.bitangent=new y({componentDatatype:p.FLOAT,componentsPerAttribute:3,values:t})}o=new Uint16Array(36),o[0]=0,o[1]=1,o[2]=2,o[3]=0,o[4]=2,o[5]=3,o[6]=6,o[7]=5,o[8]=4,o[9]=7,o[10]=6,o[11]=4,o[12]=8,o[13]=9,o[14]=10,o[15]=8,o[16]=10,o[17]=11,o[18]=14,o[19]=13,o[20]=12,o[21]=15,o[22]=14,o[23]=12,o[24]=18,o[25]=17,o[26]=16,o[27]=19,o[28]=18,o[29]=16,o[30]=20,o[31]=21,o[32]=22,o[33]=20,o[34]=22,o[35]=23}else a=new Float64Array(24),a[0]=e.x,a[1]=e.y,a[2]=e.z,a[3]=n.x,a[4]=e.y,a[5]=e.z,a[6]=n.x,a[7]=n.y,a[8]=e.z,a[9]=e.x,a[10]=n.y,a[11]=e.z,a[12]=e.x,a[13]=e.y,a[14]=n.z,a[15]=n.x,a[16]=e.y,a[17]=n.z,a[18]=n.x,a[19]=n.y,a[20]=n.z,a[21]=e.x,a[22]=n.y,a[23]=n.z,m.position=new y({componentDatatype:p.DOUBLE,componentsPerAttribute:3,values:a}),o=new Uint16Array(36),o[0]=4,o[1]=5,o[2]=6,o[3]=4,o[4]=6,o[5]=7,o[6]=1,o[7]=0,o[8]=3,o[9]=1,o[10]=3,o[11]=2,o[12]=1,o[13]=6,o[14]=5,o[15]=1,o[16]=2,o[17]=6,o[18]=2,o[19]=3,o[20]=7,o[21]=2,o[22]=7,o[23]=6,o[24]=3,o[25]=0,o[26]=4,o[27]=3,o[28]=4,o[29]=7,o[30]=0,o[31]=1,o[32]=5,o[33]=0,o[34]=5,o[35]=4;let u=i.subtract(n,e,D),s=.5*i.magnitude(u);if(x(t._offsetAttribute)){let e=a.length,n=t._offsetAttribute===b.NONE?0:1,i=new Uint8Array(e/3).fill(n);m.applyOffset=new y({componentDatatype:p.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}return new h({attributes:m,indices:o,primitiveType:w.TRIANGLES,boundingSphere:new l(i.ZERO,s),offsetAttribute:t._offsetAttribute})},f.getUnitBox=function(){return x(z)||(z=f.createGeometry(f.fromDimensions({dimensions:new i(1,1,1),vertexFormat:u.POSITION_ONLY}))),z};var R=f;export{R as a};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.143.0
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
import{a as N}from"./chunk-RDX4QSUS.js";import{a as t}from"./chunk-NZBME2JK.js";import{f as T}from"./chunk-6DLS2UKD.js";var r={BYTE:N.BYTE,UNSIGNED_BYTE:N.UNSIGNED_BYTE,SHORT:N.SHORT,UNSIGNED_SHORT:N.UNSIGNED_SHORT,INT:N.INT,UNSIGNED_INT:N.UNSIGNED_INT,FLOAT:N.FLOAT,DOUBLE:N.DOUBLE,getSizeInBytes:function(e){if(!T(e))throw new t("value is required.");switch(e){case r.BYTE:return Int8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.SHORT:return Int16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.INT:return Int32Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case r.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case r.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new t("componentDatatype is not a valid value.")}},fromTypedArray:function(e){if(e instanceof Int8Array)return r.BYTE;if(e instanceof Uint8Array)return r.UNSIGNED_BYTE;if(e instanceof Int16Array)return r.SHORT;if(e instanceof Uint16Array)return r.UNSIGNED_SHORT;if(e instanceof Int32Array)return r.INT;if(e instanceof Uint32Array)return r.UNSIGNED_INT;if(e instanceof Float32Array)return r.FLOAT;if(e instanceof Float64Array)return r.DOUBLE;throw new t("array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array.")},validate:function(e){return T(e)&&(e===r.BYTE||e===r.UNSIGNED_BYTE||e===r.SHORT||e===r.UNSIGNED_SHORT||e===r.INT||e===r.UNSIGNED_INT||e===r.FLOAT||e===r.DOUBLE)},createTypedArray:function(e,n){if(!T(e))throw new t("componentDatatype is required.");if(!T(n))throw new t("valuesOrLength is required.");switch(e){case r.BYTE:return new Int8Array(n);case r.UNSIGNED_BYTE:return new Uint8Array(n);case r.SHORT:return new Int16Array(n);case r.UNSIGNED_SHORT:return new Uint16Array(n);case r.INT:return new Int32Array(n);case r.UNSIGNED_INT:return new Uint32Array(n);case r.FLOAT:return new Float32Array(n);case r.DOUBLE:return new Float64Array(n);default:throw new t("componentDatatype is not a valid value.")}},createArrayBufferView:function(e,n,a,E){if(!T(e))throw new t("componentDatatype is required.");if(!T(n))throw new t("buffer is required.");switch(a=a??0,E=E??(n.byteLength-a)/r.getSizeInBytes(e),e){case r.BYTE:return new Int8Array(n,a,E);case r.UNSIGNED_BYTE:return new Uint8Array(n,a,E);case r.SHORT:return new Int16Array(n,a,E);case r.UNSIGNED_SHORT:return new Uint16Array(n,a,E);case r.INT:return new Int32Array(n,a,E);case r.UNSIGNED_INT:return new Uint32Array(n,a,E);case r.FLOAT:return new Float32Array(n,a,E);case r.DOUBLE:return new Float64Array(n,a,E);default:throw new t("componentDatatype is not a valid value.")}},fromName:function(e){switch(e){case"BYTE":return r.BYTE;case"UNSIGNED_BYTE":return r.UNSIGNED_BYTE;case"SHORT":return r.SHORT;case"UNSIGNED_SHORT":return r.UNSIGNED_SHORT;case"INT":return r.INT;case"UNSIGNED_INT":return r.UNSIGNED_INT;case"FLOAT":return r.FLOAT;case"DOUBLE":return r.DOUBLE;default:throw new t("name is not a valid value.")}},dequantize:function(e,n){switch(n){case r.BYTE:return Math.max(e/127,-1);case r.UNSIGNED_BYTE:return e/255;case r.SHORT:return Math.max(e/32767,-1);case r.UNSIGNED_SHORT:return e/65535;case r.INT:return Math.max(e/2147483647,-1);case r.UNSIGNED_INT:return e/4294967295;default:throw new t("componentDatatype is not a valid integer type for dequantization.")}}};Object.freeze(r);var c=r;export{c as a};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.143.0
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
import{a as P}from"./chunk-5VFNV3LW.js";import{a as u,b as d}from"./chunk-SRA5MBUT.js";import{a as j}from"./chunk-5AAMOBJK.js";import{i as A}from"./chunk-LNJEJFV5.js";import{a as _,b as h}from"./chunk-BPABSUDY.js";import{b as l,c as g}from"./chunk-2AIOP76V.js";import{a as e}from"./chunk-IAE6APK2.js";import{a as y,b as p}from"./chunk-NZBME2JK.js";import{f as r}from"./chunk-6DLS2UKD.js";var x=new _;function s(t,n){if(p.defined("origin",t),t=(n=n??g.default).scaleToGeodeticSurface(t),!r(t))throw new y("origin must not be at the center of the ellipsoid.");let i=A.eastNorthUpToFixedFrame(t,n);this._ellipsoid=n,this._origin=t,this._xAxis=e.fromCartesian4(h.getColumn(i,0,x)),this._yAxis=e.fromCartesian4(h.getColumn(i,1,x));let o=e.fromCartesian4(h.getColumn(i,2,x));this._plane=j.fromPointNormal(t,o)}Object.defineProperties(s.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var w=new P;s.fromPoints=function(e,t){return p.defined("cartesians",e),new s(P.fromPoints(e,w).center,t)};var O=new u,m=new e;s.prototype.projectPointOntoPlane=function(t,n){p.defined("cartesian",t);let i=O;i.origin=t,e.normalize(t,i.direction);let o=d.rayPlane(i,this._plane,m);if(r(o)||(e.negate(i.direction,i.direction),o=d.rayPlane(i,this._plane,m)),r(o)){let t=e.subtract(o,this._origin,o),i=e.dot(this._xAxis,t),s=e.dot(this._yAxis,t);return r(n)?(n.x=i,n.y=s,n):new l(i,s)}},s.prototype.projectPointsOntoPlane=function(e,t){p.defined("cartesians",e),r(t)||(t=[]);let n=0,i=e.length;for(let o=0;o<i;o++){let i=this.projectPointOntoPlane(e[o],t[n]);r(i)&&(t[n]=i,n++)}return t.length=n,t},s.prototype.projectPointToNearestOnPlane=function(t,n){p.defined("cartesian",t),r(n)||(n=new l);let i=O;i.origin=t,e.clone(this._plane.normal,i.direction);let o=d.rayPlane(i,this._plane,m);r(o)||(e.negate(i.direction,i.direction),o=d.rayPlane(i,this._plane,m));let s=e.subtract(o,this._origin,o),a=e.dot(this._xAxis,s),c=e.dot(this._yAxis,s);return n.x=a,n.y=c,n},s.prototype.projectPointsToNearestOnPlane=function(e,t){p.defined("cartesians",e),r(t)||(t=[]);let n=e.length;t.length=n;for(let i=0;i<n;i++)t[i]=this.projectPointToNearestOnPlane(e[i],t[i]);return t};var C=new e;s.prototype.projectPointOntoEllipsoid=function(t,n){p.defined("cartesian",t),r(n)||(n=new e);let i=this._ellipsoid,o=this._origin,s=this._xAxis,a=this._yAxis,l=C;return e.multiplyByScalar(s,t.x,l),n=e.add(o,l,n),e.multiplyByScalar(a,t.y,l),e.add(n,l,n),i.scaleToGeocentricSurface(n,n),n},s.prototype.projectPointsOntoEllipsoid=function(e,t){p.defined("cartesians",e);let n=e.length;r(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.projectPointOntoEllipsoid(e[i],t[i]);return t};var D=s;export{D as a};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.143.0
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
import{f}from"./chunk-6DLS2UKD.js";function c(e){let r,s=e.name,t=e.message;r=f(s)&&f(t)?`${s}: ${t}`:e.toString();let a=e.stack;return f(a)&&(r+=`\n${a}`),r}var i=c;function l(e){return self.onmessage=async function({data:r}){let s=[],t={id:r.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=r.baseUrl;try{let a=await e(r.parameters,s);t.result=a}catch(e){e instanceof Error?t.error={name:e.name,message:e.message,stack:e.stack}:t.error=e}r.canTransferArrayBuffer||(s.length=0);try{postMessage(t,s)}catch(e){t.result=void 0,t.error=`postMessage failed with error: ${i(e)}\n with responseMessage: ${JSON.stringify(t)}`,postMessage(t)}},self.onmessageerror=function(e){postMessage({id:e.data?.id,error:`postMessage failed with error: ${JSON.stringify(e)}`})},self}var d=l;export{d as a};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.143.0
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
import{a as h1}from"./chunk-G3GDHHWO.js";import{a as W,b as u,c as z1}from"./chunk-IAE6APK2.js";import{a as G}from"./chunk-3E7FIXV7.js";import{a as m,b as p}from"./chunk-NZBME2JK.js";import{f as U}from"./chunk-6DLS2UKD.js";var V=class t{constructor(t,e,r,a){this.x=t??0,this.y=e??0,this.z=r??0,this.w=a??0}static fromElements(e,r,a,p,n){return U(n)?(n.x=e,n.y=r,n.z=a,n.w=p,n):new t(e,r,a,p)}static fromColor(e,r){return p.typeOf.object("color",e),U(r)?(r.x=e.red,r.y=e.green,r.z=e.blue,r.w=e.alpha,r):new t(e.red,e.green,e.blue,e.alpha)}static clone(e,r){if(U(e))return U(r)?(r.x=e.x,r.y=e.y,r.z=e.z,r.w=e.w,r):new t(e.x,e.y,e.z,e.w)}static pack(t,e,r){return p.typeOf.object("value",t),p.defined("array",e),r=r??0,e[r++]=t.x,e[r++]=t.y,e[r++]=t.z,e[r]=t.w,e}static unpack(e,r,a){return p.defined("array",e),r=r??0,U(a)||(a=new t),a.x=e[r++],a.y=e[r++],a.z=e[r++],a.w=e[r],a}static packArray(e,r){p.defined("array",e);let a=e.length,n=4*a;if(U(r)){if(!Array.isArray(r)&&r.length!==n)throw new m("If result is a typed array, it must have exactly array.length * 4 elements");r.length!==n&&(r.length=n)}else r=new Array(n);for(let p=0;p<a;++p)t.pack(e[p],r,4*p);return r}static unpackArray(e,r){if(p.defined("array",e),p.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!=0)throw new m("array length must be a multiple of 4.");let a=e.length;U(r)?r.length=a/4:r=new Array(a/4);for(let p=0;p<a;p+=4){let a=p/4;r[a]=t.unpack(e,p,r[a])}return r}static maximumComponent(t){return p.typeOf.object("cartesian",t),Math.max(t.x,t.y,t.z,t.w)}static minimumComponent(t){return p.typeOf.object("cartesian",t),Math.min(t.x,t.y,t.z,t.w)}static minimumByComponent(t,e,r){return p.typeOf.object("first",t),p.typeOf.object("second",e),p.typeOf.object("result",r),r.x=Math.min(t.x,e.x),r.y=Math.min(t.y,e.y),r.z=Math.min(t.z,e.z),r.w=Math.min(t.w,e.w),r}static maximumByComponent(t,e,r){return p.typeOf.object("first",t),p.typeOf.object("second",e),p.typeOf.object("result",r),r.x=Math.max(t.x,e.x),r.y=Math.max(t.y,e.y),r.z=Math.max(t.z,e.z),r.w=Math.max(t.w,e.w),r}static clamp(t,e,r,a){p.typeOf.object("value",t),p.typeOf.object("min",e),p.typeOf.object("max",r),p.typeOf.object("result",a);let n=G.clamp(t.x,e.x,r.x),s=G.clamp(t.y,e.y,r.y),c=G.clamp(t.z,e.z,r.z),i=G.clamp(t.w,e.w,r.w);return a.x=n,a.y=s,a.z=c,a.w=i,a}static magnitudeSquared(t){return p.typeOf.object("cartesian",t),t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w}static magnitude(e){return Math.sqrt(t.magnitudeSquared(e))}static distance(e,a){return p.typeOf.object("left",e),p.typeOf.object("right",a),t.subtract(e,a,r),t.magnitude(r)}static distanceSquared(e,a){return p.typeOf.object("left",e),p.typeOf.object("right",a),t.subtract(e,a,r),t.magnitudeSquared(r)}static normalize(e,r){p.typeOf.object("cartesian",e),p.typeOf.object("result",r);let a=t.magnitude(e);if(r.x=e.x/a,r.y=e.y/a,r.z=e.z/a,r.w=e.w/a,isNaN(r.x)||isNaN(r.y)||isNaN(r.z)||isNaN(r.w))throw new m("normalized result is not a number");return r}static dot(t,e){return p.typeOf.object("left",t),p.typeOf.object("right",e),t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w}static multiplyComponents(t,e,r){return p.typeOf.object("left",t),p.typeOf.object("right",e),p.typeOf.object("result",r),r.x=t.x*e.x,r.y=t.y*e.y,r.z=t.z*e.z,r.w=t.w*e.w,r}static divideComponents(t,e,r){return p.typeOf.object("left",t),p.typeOf.object("right",e),p.typeOf.object("result",r),r.x=t.x/e.x,r.y=t.y/e.y,r.z=t.z/e.z,r.w=t.w/e.w,r}static add(t,e,r){return p.typeOf.object("left",t),p.typeOf.object("right",e),p.typeOf.object("result",r),r.x=t.x+e.x,r.y=t.y+e.y,r.z=t.z+e.z,r.w=t.w+e.w,r}static subtract(t,e,r){return p.typeOf.object("left",t),p.typeOf.object("right",e),p.typeOf.object("result",r),r.x=t.x-e.x,r.y=t.y-e.y,r.z=t.z-e.z,r.w=t.w-e.w,r}static multiplyByScalar(t,e,r){return p.typeOf.object("cartesian",t),p.typeOf.number("scalar",e),p.typeOf.object("result",r),r.x=t.x*e,r.y=t.y*e,r.z=t.z*e,r.w=t.w*e,r}static divideByScalar(t,e,r){return p.typeOf.object("cartesian",t),p.typeOf.number("scalar",e),p.typeOf.object("result",r),r.x=t.x/e,r.y=t.y/e,r.z=t.z/e,r.w=t.w/e,r}static negate(t,e){return p.typeOf.object("cartesian",t),p.typeOf.object("result",e),e.x=-t.x,e.y=-t.y,e.z=-t.z,e.w=-t.w,e}static abs(t,e){return p.typeOf.object("cartesian",t),p.typeOf.object("result",e),e.x=Math.abs(t.x),e.y=Math.abs(t.y),e.z=Math.abs(t.z),e.w=Math.abs(t.w),e}static lerp(e,r,a,n){return p.typeOf.object("start",e),p.typeOf.object("end",r),p.typeOf.number("t",a),p.typeOf.object("result",n),t.multiplyByScalar(r,a,R1),n=t.multiplyByScalar(e,1-a,n),t.add(R1,n,n)}static mostOrthogonalAxis(e,r){p.typeOf.object("cartesian",e),p.typeOf.object("result",r);let a=t.normalize(e,U1);return t.abs(a,a),r=a.x<=a.y?a.x<=a.z?a.x<=a.w?t.clone(t.UNIT_X,r):t.clone(t.UNIT_W,r):a.z<=a.w?t.clone(t.UNIT_Z,r):t.clone(t.UNIT_W,r):a.y<=a.z?a.y<=a.w?t.clone(t.UNIT_Y,r):t.clone(t.UNIT_W,r):a.z<=a.w?t.clone(t.UNIT_Z,r):t.clone(t.UNIT_W,r)}static equals(t,e){return t===e||U(t)&&U(e)&&t.x===e.x&&t.y===e.y&&t.z===e.z&&t.w===e.w}static equalsArray(t,e,r){return t.x===e[r]&&t.y===e[r+1]&&t.z===e[r+2]&&t.w===e[r+3]}static equalsEpsilon(t,e,r,a){return t===e||U(t)&&U(e)&&G.equalsEpsilon(t.x,e.x,r,a)&&G.equalsEpsilon(t.y,e.y,r,a)&&G.equalsEpsilon(t.z,e.z,r,a)&&G.equalsEpsilon(t.w,e.w,r,a)}clone(e){return t.clone(this,e)}equals(e){return t.equals(this,e)}equalsEpsilon(e,r,a){return t.equalsEpsilon(this,e,r,a)}toString(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`}static packFloat(e,r){return p.typeOf.number("value",e),U(r)||(r=new t),f1[0]=e,M1?(r.x=F[0],r.y=F[1],r.z=F[2],r.w=F[3]):(r.x=F[3],r.y=F[2],r.z=F[1],r.w=F[0]),r}static unpackFloat(t){return p.typeOf.object("packedFloat",t),M1?(F[0]=t.x,F[1]=t.y,F[2]=t.z,F[3]=t.w):(F[0]=t.w,F[1]=t.z,F[2]=t.y,F[3]=t.x),f1[0]}};V.packedLength=4,V.fromArray=V.unpack;var r=new V,R1=new V,U1=new V;V.ZERO=Object.freeze(new V(0,0,0,0)),V.ONE=Object.freeze(new V(1,1,1,1)),V.UNIT_X=Object.freeze(new V(1,0,0,0)),V.UNIT_Y=Object.freeze(new V(0,1,0,0)),V.UNIT_Z=Object.freeze(new V(0,0,1,0)),V.UNIT_W=Object.freeze(new V(0,0,0,1));var f1=new Float32Array(1),F=new Uint8Array(f1.buffer),S1=new Uint32Array([287454020]),d1=new Uint8Array(S1.buffer),M1=68===d1[0],c1=V,L=class r{constructor(t,e,r,a,p,n,s,c,i,o,y,l,u,f,O,b){this[0]=t??0,this[1]=p??0,this[2]=i??0,this[3]=u??0,this[4]=e??0,this[5]=n??0,this[6]=o??0,this[7]=f??0,this[8]=r??0,this[9]=s??0,this[10]=y??0,this[11]=O??0,this[12]=a??0,this[13]=c??0,this[14]=l??0,this[15]=b??0}static pack(t,e,r){return p.typeOf.object("value",t),p.defined("array",e),r=r??0,e[r++]=t[0],e[r++]=t[1],e[r++]=t[2],e[r++]=t[3],e[r++]=t[4],e[r++]=t[5],e[r++]=t[6],e[r++]=t[7],e[r++]=t[8],e[r++]=t[9],e[r++]=t[10],e[r++]=t[11],e[r++]=t[12],e[r++]=t[13],e[r++]=t[14],e[r]=t[15],e}static unpack(t,e,a){return p.defined("array",t),e=e??0,U(a)||(a=new r),a[0]=t[e++],a[1]=t[e++],a[2]=t[e++],a[3]=t[e++],a[4]=t[e++],a[5]=t[e++],a[6]=t[e++],a[7]=t[e++],a[8]=t[e++],a[9]=t[e++],a[10]=t[e++],a[11]=t[e++],a[12]=t[e++],a[13]=t[e++],a[14]=t[e++],a[15]=t[e],a}static packArray(t,e){p.defined("array",t);let a=t.length,n=16*a;if(U(e)){if(!Array.isArray(e)&&e.length!==n)throw new m("If result is a typed array, it must have exactly array.length * 16 elements");e.length!==n&&(e.length=n)}else e=new Array(n);for(let p=0;p<a;++p)r.pack(t[p],e,16*p);return e}static unpackArray(t,e){if(p.defined("array",t),p.typeOf.number.greaterThanOrEquals("array.length",t.length,16),t.length%16!=0)throw new m("array length must be a multiple of 16.");let a=t.length;U(e)?e.length=a/16:e=new Array(a/16);for(let p=0;p<a;p+=16){let a=p/16;e[a]=r.unpack(t,p,e[a])}return e}static clone(t,e){if(U(t))return U(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e):new r(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}static fromColumnMajorArray(t,e){return p.defined("values",t),r.clone(t,e)}static fromRowMajorArray(t,e){return p.defined("values",t),U(e)?(e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15],e):new r(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}static fromRotationTranslation(t,e,a){return p.typeOf.object("rotation",t),e=e??W.ZERO,U(a)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=0,a[4]=t[3],a[5]=t[4],a[6]=t[5],a[7]=0,a[8]=t[6],a[9]=t[7],a[10]=t[8],a[11]=0,a[12]=e.x,a[13]=e.y,a[14]=e.z,a[15]=1,a):new r(t[0],t[3],t[6],e.x,t[1],t[4],t[7],e.y,t[2],t[5],t[8],e.z,0,0,0,1)}static fromTranslationQuaternionRotationScale(t,e,a,n){p.typeOf.object("translation",t),p.typeOf.object("rotation",e),p.typeOf.object("scale",a),U(n)||(n=new r);let s=a.x,c=a.y,i=a.z,o=e.x*e.x,y=e.x*e.y,l=e.x*e.z,u=e.x*e.w,f=e.y*e.y,O=e.y*e.z,b=e.y*e.w,m=e.z*e.z,h=e.z*e.w,j=e.w*e.w,x=o-f-m+j,w=2*(y-h),z=2*(l+b),g=2*(y+h),d=-o+f-m+j,M=2*(O-u),T=2*(l-b),L=2*(O+u),W=-o-f+m+j;return n[0]=x*s,n[1]=g*s,n[2]=T*s,n[3]=0,n[4]=w*c,n[5]=d*c,n[6]=L*c,n[7]=0,n[8]=z*i,n[9]=M*i,n[10]=W*i,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,n}static fromTranslationRotationScale(t,e){return p.typeOf.object("translationRotationScale",t),r.fromTranslationQuaternionRotationScale(t.translation,t.rotation,t.scale,e)}static fromTranslation(t,e){return p.typeOf.object("translation",t),r.fromRotationTranslation(u.IDENTITY,t,e)}static fromScale(t,e){return p.typeOf.object("scale",t),U(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t.y,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t.z,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e):new r(t.x,0,0,0,0,t.y,0,0,0,0,t.z,0,0,0,0,1)}static fromUniformScale(t,e){return p.typeOf.number("scale",t),U(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e):new r(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1)}static fromRotation(t,e){return p.typeOf.object("rotation",t),U(e)||(e=new r),e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=0,e[4]=t[3],e[5]=t[4],e[6]=t[5],e[7]=0,e[8]=t[6],e[9]=t[7],e[10]=t[8],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}static fromCamera(a,n){p.typeOf.object("camera",a);let s=a.position,c=a.direction,i=a.up;p.typeOf.object("camera.position",s),p.typeOf.object("camera.direction",c),p.typeOf.object("camera.up",i),W.normalize(c,e),W.normalize(W.cross(e,i,t),t),W.normalize(W.cross(t,e,l),l);let o=t.x,y=t.y,u=t.z,f=e.x,O=e.y,b=e.z,m=l.x,h=l.y,j=l.z,x=s.x,w=s.y,z=s.z,g=o*-x+y*-w+u*-z,d=m*-x+h*-w+j*-z,M=f*x+O*w+b*z;return U(n)?(n[0]=o,n[1]=m,n[2]=-f,n[3]=0,n[4]=y,n[5]=h,n[6]=-O,n[7]=0,n[8]=u,n[9]=j,n[10]=-b,n[11]=0,n[12]=g,n[13]=d,n[14]=M,n[15]=1,n):new r(o,y,u,g,m,h,j,d,-f,-O,-b,M,0,0,0,1)}static computePerspectiveFieldOfView(t,e,r,a,n){p.typeOf.number.greaterThan("fovY",t,0),p.typeOf.number.lessThan("fovY",t,Math.PI),p.typeOf.number.greaterThan("near",r,0),p.typeOf.number.greaterThan("far",a,0),p.typeOf.object("result",n);let s=1/Math.tan(.5*t),c=s/e,i=(a+r)/(r-a),o=2*a*r/(r-a);return n[0]=c,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=s,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=i,n[11]=-1,n[12]=0,n[13]=0,n[14]=o,n[15]=0,n}static computeOrthographicOffCenter(t,e,r,a,n,s,c){p.typeOf.number("left",t),p.typeOf.number("right",e),p.typeOf.number("bottom",r),p.typeOf.number("top",a),p.typeOf.number("near",n),p.typeOf.number("far",s),p.typeOf.object("result",c);let i=1/(e-t),o=1/(a-r),y=1/(s-n),l=-(e+t)*i,u=-(a+r)*o,f=-(s+n)*y;return i*=2,o*=2,y*=-2,c[0]=i,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=o,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=y,c[11]=0,c[12]=l,c[13]=u,c[14]=f,c[15]=1,c}static computePerspectiveOffCenter(t,e,r,a,n,s,c){p.typeOf.number("left",t),p.typeOf.number("right",e),p.typeOf.number("bottom",r),p.typeOf.number("top",a),p.typeOf.number("near",n),p.typeOf.number("far",s),p.typeOf.object("result",c);let i=2*n/(e-t),o=2*n/(a-r),y=(e+t)/(e-t),l=(a+r)/(a-r),u=-(s+n)/(s-n),f=-2*s*n/(s-n);return c[0]=i,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=o,c[6]=0,c[7]=0,c[8]=y,c[9]=l,c[10]=u,c[11]=-1,c[12]=0,c[13]=0,c[14]=f,c[15]=0,c}static computeInfinitePerspectiveOffCenter(t,e,r,a,n,s){p.typeOf.number("left",t),p.typeOf.number("right",e),p.typeOf.number("bottom",r),p.typeOf.number("top",a),p.typeOf.number("near",n),p.typeOf.object("result",s);let c=2*n/(e-t),i=2*n/(a-r),o=(e+t)/(e-t),y=(a+r)/(a-r),l=-2*n;return s[0]=c,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=i,s[6]=0,s[7]=0,s[8]=o,s[9]=y,s[10]=-1,s[11]=-1,s[12]=0,s[13]=0,s[14]=l,s[15]=0,s}static computeViewportTransformation(t,e,a,p){U(p)||(p=new r);let n=(t=t??z1.EMPTY_OBJECT).x??0,s=t.y??0;e=e??0;let c=.5*(t.width??0),i=.5*(t.height??0),o=.5*((a=a??1)-e),y=c,l=i,u=o,f=n+c,O=s+i,b=e+o;return p[0]=y,p[1]=0,p[2]=0,p[3]=0,p[4]=0,p[5]=l,p[6]=0,p[7]=0,p[8]=0,p[9]=0,p[10]=u,p[11]=0,p[12]=f,p[13]=O,p[14]=b,p[15]=1,p}static computeView(t,e,r,a,n){return p.typeOf.object("position",t),p.typeOf.object("direction",e),p.typeOf.object("up",r),p.typeOf.object("right",a),p.typeOf.object("result",n),n[0]=a.x,n[1]=r.x,n[2]=-e.x,n[3]=0,n[4]=a.y,n[5]=r.y,n[6]=-e.y,n[7]=0,n[8]=a.z,n[9]=r.z,n[10]=-e.z,n[11]=0,n[12]=-W.dot(a,t),n[13]=-W.dot(r,t),n[14]=W.dot(e,t),n[15]=1,n}static toArray(t,e){return p.typeOf.object("matrix",t),U(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}static getElementIndex(t,e){return p.typeOf.number.greaterThanOrEquals("row",e,0),p.typeOf.number.lessThanOrEquals("row",e,3),p.typeOf.number.greaterThanOrEquals("column",t,0),p.typeOf.number.lessThanOrEquals("column",t,3),4*t+e}static getColumn(t,e,r){p.typeOf.object("matrix",t),p.typeOf.number.greaterThanOrEquals("index",e,0),p.typeOf.number.lessThanOrEquals("index",e,3),p.typeOf.object("result",r);let a=4*e,n=t[a],s=t[a+1],c=t[a+2],i=t[a+3];return r.x=n,r.y=s,r.z=c,r.w=i,r}static setColumn(t,e,a,n){p.typeOf.object("matrix",t),p.typeOf.number.greaterThanOrEquals("index",e,0),p.typeOf.number.lessThanOrEquals("index",e,3),p.typeOf.object("cartesian",a),p.typeOf.object("result",n);let s=4*e;return(n=r.clone(t,n))[s]=a.x,n[s+1]=a.y,n[s+2]=a.z,n[s+3]=a.w,n}static getRow(t,e,r){p.typeOf.object("matrix",t),p.typeOf.number.greaterThanOrEquals("index",e,0),p.typeOf.number.lessThanOrEquals("index",e,3),p.typeOf.object("result",r);let a=t[e],n=t[e+4],s=t[e+8],c=t[e+12];return r.x=a,r.y=n,r.z=s,r.w=c,r}static setRow(t,e,a,n){return p.typeOf.object("matrix",t),p.typeOf.number.greaterThanOrEquals("index",e,0),p.typeOf.number.lessThanOrEquals("index",e,3),p.typeOf.object("cartesian",a),p.typeOf.object("result",n),(n=r.clone(t,n))[e]=a.x,n[e+4]=a.y,n[e+8]=a.z,n[e+12]=a.w,n}static setTranslation(t,e,r){return p.typeOf.object("matrix",t),p.typeOf.object("translation",e),p.typeOf.object("result",r),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=t[15],r}static setScale(t,e,a){p.typeOf.object("matrix",t),p.typeOf.object("scale",e),p.typeOf.object("result",a);let n=r.getScale(t,A1),s=e.x/n.x,c=e.y/n.y,i=e.z/n.z;return a[0]=t[0]*s,a[1]=t[1]*s,a[2]=t[2]*s,a[3]=t[3],a[4]=t[4]*c,a[5]=t[5]*c,a[6]=t[6]*c,a[7]=t[7],a[8]=t[8]*i,a[9]=t[9]*i,a[10]=t[10]*i,a[11]=t[11],a[12]=t[12],a[13]=t[13],a[14]=t[14],a[15]=t[15],a}static setUniformScale(t,e,a){p.typeOf.object("matrix",t),p.typeOf.number("scale",e),p.typeOf.object("result",a);let n=r.getScale(t,L1),s=e/n.x,c=e/n.y,i=e/n.z;return a[0]=t[0]*s,a[1]=t[1]*s,a[2]=t[2]*s,a[3]=t[3],a[4]=t[4]*c,a[5]=t[5]*c,a[6]=t[6]*c,a[7]=t[7],a[8]=t[8]*i,a[9]=t[9]*i,a[10]=t[10]*i,a[11]=t[11],a[12]=t[12],a[13]=t[13],a[14]=t[14],a[15]=t[15],a}static getScale(t,e){return p.typeOf.object("matrix",t),p.typeOf.object("result",e),e.x=W.magnitude(W.fromElements(t[0],t[1],t[2],j1)),e.y=W.magnitude(W.fromElements(t[4],t[5],t[6],j1)),e.z=W.magnitude(W.fromElements(t[8],t[9],t[10],j1)),e}static getMaximumScale(t){return r.getScale(t,T1),W.maximumComponent(T1)}static setRotation(t,e,a){p.typeOf.object("matrix",t),p.typeOf.object("result",a);let n=r.getScale(t,W1);return a[0]=e[0]*n.x,a[1]=e[1]*n.x,a[2]=e[2]*n.x,a[3]=t[3],a[4]=e[3]*n.y,a[5]=e[4]*n.y,a[6]=e[5]*n.y,a[7]=t[7],a[8]=e[6]*n.z,a[9]=e[7]*n.z,a[10]=e[8]*n.z,a[11]=t[11],a[12]=t[12],a[13]=t[13],a[14]=t[14],a[15]=t[15],a}static getRotation(t,e){p.typeOf.object("matrix",t),p.typeOf.object("result",e);let a=r.getScale(t,$1);return e[0]=t[0]/a.x,e[1]=t[1]/a.x,e[2]=t[2]/a.x,e[3]=t[4]/a.y,e[4]=t[5]/a.y,e[5]=t[6]/a.y,e[6]=t[8]/a.z,e[7]=t[9]/a.z,e[8]=t[10]/a.z,e}static multiply(t,e,r){p.typeOf.object("left",t),p.typeOf.object("right",e),p.typeOf.object("result",r);let a=t[0],n=t[1],s=t[2],c=t[3],i=t[4],o=t[5],y=t[6],l=t[7],u=t[8],f=t[9],O=t[10],b=t[11],m=t[12],h=t[13],j=t[14],x=t[15],w=e[0],z=e[1],g=e[2],d=e[3],M=e[4],U=e[5],T=e[6],L=e[7],W=e[8],E=e[9],N=e[10],q=e[11],R=e[12],S=e[13],C=e[14],A=e[15],k=a*w+i*z+u*g+m*d,V=n*w+o*z+f*g+h*d,I=s*w+y*z+O*g+j*d,v=c*w+l*z+b*g+x*d,F=a*M+i*U+u*T+m*L,$=n*M+o*U+f*T+h*L,B=s*M+y*U+O*T+j*L,G=c*M+l*U+b*T+x*L,_=a*W+i*E+u*N+m*q,P=n*W+o*E+f*N+h*q,Y=s*W+y*E+O*N+j*q,Z=c*W+l*E+b*N+x*q,D=a*R+i*S+u*C+m*A,X=n*R+o*S+f*C+h*A,K=s*R+y*S+O*C+j*A,H=c*R+l*S+b*C+x*A;return r[0]=k,r[1]=V,r[2]=I,r[3]=v,r[4]=F,r[5]=$,r[6]=B,r[7]=G,r[8]=_,r[9]=P,r[10]=Y,r[11]=Z,r[12]=D,r[13]=X,r[14]=K,r[15]=H,r}static add(t,e,r){return p.typeOf.object("left",t),p.typeOf.object("right",e),p.typeOf.object("result",r),r[0]=t[0]+e[0],r[1]=t[1]+e[1],r[2]=t[2]+e[2],r[3]=t[3]+e[3],r[4]=t[4]+e[4],r[5]=t[5]+e[5],r[6]=t[6]+e[6],r[7]=t[7]+e[7],r[8]=t[8]+e[8],r[9]=t[9]+e[9],r[10]=t[10]+e[10],r[11]=t[11]+e[11],r[12]=t[12]+e[12],r[13]=t[13]+e[13],r[14]=t[14]+e[14],r[15]=t[15]+e[15],r}static subtract(t,e,r){return p.typeOf.object("left",t),p.typeOf.object("right",e),p.typeOf.object("result",r),r[0]=t[0]-e[0],r[1]=t[1]-e[1],r[2]=t[2]-e[2],r[3]=t[3]-e[3],r[4]=t[4]-e[4],r[5]=t[5]-e[5],r[6]=t[6]-e[6],r[7]=t[7]-e[7],r[8]=t[8]-e[8],r[9]=t[9]-e[9],r[10]=t[10]-e[10],r[11]=t[11]-e[11],r[12]=t[12]-e[12],r[13]=t[13]-e[13],r[14]=t[14]-e[14],r[15]=t[15]-e[15],r}static multiplyTransformation(t,e,r){p.typeOf.object("left",t),p.typeOf.object("right",e),p.typeOf.object("result",r);let a=t[0],n=t[1],s=t[2],c=t[4],i=t[5],o=t[6],y=t[8],l=t[9],u=t[10],f=t[12],O=t[13],b=t[14],m=e[0],h=e[1],j=e[2],x=e[4],w=e[5],z=e[6],g=e[8],d=e[9],M=e[10],U=e[12],T=e[13],L=e[14],W=a*m+c*h+y*j,E=n*m+i*h+l*j,N=s*m+o*h+u*j,q=a*x+c*w+y*z,R=n*x+i*w+l*z,S=s*x+o*w+u*z,C=a*g+c*d+y*M,A=n*g+i*d+l*M,k=s*g+o*d+u*M,V=a*U+c*T+y*L+f,I=n*U+i*T+l*L+O,v=s*U+o*T+u*L+b;return r[0]=W,r[1]=E,r[2]=N,r[3]=0,r[4]=q,r[5]=R,r[6]=S,r[7]=0,r[8]=C,r[9]=A,r[10]=k,r[11]=0,r[12]=V,r[13]=I,r[14]=v,r[15]=1,r}static multiplyByMatrix3(t,e,r){p.typeOf.object("matrix",t),p.typeOf.object("rotation",e),p.typeOf.object("result",r);let a=t[0],n=t[1],s=t[2],c=t[4],i=t[5],o=t[6],y=t[8],l=t[9],u=t[10],f=e[0],O=e[1],b=e[2],m=e[3],h=e[4],j=e[5],x=e[6],w=e[7],z=e[8],g=a*f+c*O+y*b,d=n*f+i*O+l*b,M=s*f+o*O+u*b,U=a*m+c*h+y*j,T=n*m+i*h+l*j,L=s*m+o*h+u*j,W=a*x+c*w+y*z,E=n*x+i*w+l*z,N=s*x+o*w+u*z;return r[0]=g,r[1]=d,r[2]=M,r[3]=0,r[4]=U,r[5]=T,r[6]=L,r[7]=0,r[8]=W,r[9]=E,r[10]=N,r[11]=0,r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15],r}static multiplyByTranslation(t,e,r){p.typeOf.object("matrix",t),p.typeOf.object("translation",e),p.typeOf.object("result",r);let a=e.x,n=e.y,s=e.z,c=a*t[0]+n*t[4]+s*t[8]+t[12],i=a*t[1]+n*t[5]+s*t[9]+t[13],o=a*t[2]+n*t[6]+s*t[10]+t[14];return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=c,r[13]=i,r[14]=o,r[15]=t[15],r}static multiplyByScale(t,e,a){p.typeOf.object("matrix",t),p.typeOf.object("scale",e),p.typeOf.object("result",a);let n=e.x,s=e.y,c=e.z;return 1===n&&1===s&&1===c?r.clone(t,a):(a[0]=n*t[0],a[1]=n*t[1],a[2]=n*t[2],a[3]=t[3],a[4]=s*t[4],a[5]=s*t[5],a[6]=s*t[6],a[7]=t[7],a[8]=c*t[8],a[9]=c*t[9],a[10]=c*t[10],a[11]=t[11],a[12]=t[12],a[13]=t[13],a[14]=t[14],a[15]=t[15],a)}static multiplyByUniformScale(t,e,r){return p.typeOf.object("matrix",t),p.typeOf.number("scale",e),p.typeOf.object("result",r),r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e,r[3]=t[3],r[4]=t[4]*e,r[5]=t[5]*e,r[6]=t[6]*e,r[7]=t[7],r[8]=t[8]*e,r[9]=t[9]*e,r[10]=t[10]*e,r[11]=t[11],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15],r}static multiplyByVector(t,e,r){p.typeOf.object("matrix",t),p.typeOf.object("cartesian",e),p.typeOf.object("result",r);let a=e.x,n=e.y,s=e.z,c=e.w,i=t[0]*a+t[4]*n+t[8]*s+t[12]*c,o=t[1]*a+t[5]*n+t[9]*s+t[13]*c,y=t[2]*a+t[6]*n+t[10]*s+t[14]*c,l=t[3]*a+t[7]*n+t[11]*s+t[15]*c;return r.x=i,r.y=o,r.z=y,r.w=l,r}static multiplyByPointAsVector(t,e,r){p.typeOf.object("matrix",t),p.typeOf.object("cartesian",e),p.typeOf.object("result",r);let a=e.x,n=e.y,s=e.z,c=t[0]*a+t[4]*n+t[8]*s,i=t[1]*a+t[5]*n+t[9]*s,o=t[2]*a+t[6]*n+t[10]*s;return r.x=c,r.y=i,r.z=o,r}static multiplyByPoint(t,e,r){p.typeOf.object("matrix",t),p.typeOf.object("cartesian",e),p.typeOf.object("result",r);let a=e.x,n=e.y,s=e.z,c=t[0]*a+t[4]*n+t[8]*s+t[12],i=t[1]*a+t[5]*n+t[9]*s+t[13],o=t[2]*a+t[6]*n+t[10]*s+t[14];return r.x=c,r.y=i,r.z=o,r}static multiplyByScalar(t,e,r){return p.typeOf.object("matrix",t),p.typeOf.number("scalar",e),p.typeOf.object("result",r),r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e,r[3]=t[3]*e,r[4]=t[4]*e,r[5]=t[5]*e,r[6]=t[6]*e,r[7]=t[7]*e,r[8]=t[8]*e,r[9]=t[9]*e,r[10]=t[10]*e,r[11]=t[11]*e,r[12]=t[12]*e,r[13]=t[13]*e,r[14]=t[14]*e,r[15]=t[15]*e,r}static negate(t,e){return p.typeOf.object("matrix",t),p.typeOf.object("result",e),e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=-t[7],e[8]=-t[8],e[9]=-t[9],e[10]=-t[10],e[11]=-t[11],e[12]=-t[12],e[13]=-t[13],e[14]=-t[14],e[15]=-t[15],e}static transpose(t,e){p.typeOf.object("matrix",t),p.typeOf.object("result",e);let r=t[1],a=t[2],n=t[3],s=t[6],c=t[7],i=t[11];return e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=a,e[9]=s,e[10]=t[10],e[11]=t[14],e[12]=n,e[13]=c,e[14]=i,e[15]=t[15],e}static abs(t,e){return p.typeOf.object("matrix",t),p.typeOf.object("result",e),e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e[4]=Math.abs(t[4]),e[5]=Math.abs(t[5]),e[6]=Math.abs(t[6]),e[7]=Math.abs(t[7]),e[8]=Math.abs(t[8]),e[9]=Math.abs(t[9]),e[10]=Math.abs(t[10]),e[11]=Math.abs(t[11]),e[12]=Math.abs(t[12]),e[13]=Math.abs(t[13]),e[14]=Math.abs(t[14]),e[15]=Math.abs(t[15]),e}static equals(t,e){return t===e||U(t)&&U(e)&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[3]===e[3]&&t[7]===e[7]&&t[11]===e[11]&&t[15]===e[15]}static equalsEpsilon(t,e,r){return r=r??0,t===e||U(t)&&U(e)&&Math.abs(t[0]-e[0])<=r&&Math.abs(t[1]-e[1])<=r&&Math.abs(t[2]-e[2])<=r&&Math.abs(t[3]-e[3])<=r&&Math.abs(t[4]-e[4])<=r&&Math.abs(t[5]-e[5])<=r&&Math.abs(t[6]-e[6])<=r&&Math.abs(t[7]-e[7])<=r&&Math.abs(t[8]-e[8])<=r&&Math.abs(t[9]-e[9])<=r&&Math.abs(t[10]-e[10])<=r&&Math.abs(t[11]-e[11])<=r&&Math.abs(t[12]-e[12])<=r&&Math.abs(t[13]-e[13])<=r&&Math.abs(t[14]-e[14])<=r&&Math.abs(t[15]-e[15])<=r}static getTranslation(t,e){return p.typeOf.object("matrix",t),p.typeOf.object("result",e),e.x=t[12],e.y=t[13],e.z=t[14],e}static getMatrix3(t,e){return p.typeOf.object("matrix",t),p.typeOf.object("result",e),e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}static inverse(t,e){p.typeOf.object("matrix",t),p.typeOf.object("result",e);let a=t[0],n=t[4],s=t[8],c=t[12],i=t[1],o=t[5],y=t[9],l=t[13],f=t[2],O=t[6],b=t[10],m=t[14],h=t[3],j=t[7],x=t[11],w=t[15],z=b*w,g=m*x,d=O*w,M=m*j,U=O*x,T=b*j,L=f*w,W=m*h,E=f*x,N=b*h,q=f*j,R=O*h,S=z*o+M*y+U*l-(g*o+d*y+T*l),C=g*i+L*y+N*l-(z*i+W*y+E*l),A=d*i+W*o+q*l-(M*i+L*o+R*l),k=T*i+E*o+R*y-(U*i+N*o+q*y),V=g*n+d*s+T*c-(z*n+M*s+U*c),I=z*a+W*s+E*c-(g*a+L*s+N*c),v=M*a+L*n+R*c-(d*a+W*n+q*c),F=U*a+N*n+q*s-(T*a+E*n+R*s);z=s*l,g=c*y,d=n*l,M=c*o,U=n*y,T=s*o,L=a*l,W=c*i,E=a*y,N=s*i,q=a*o,R=n*i;let $=z*j+M*x+U*w-(g*j+d*x+T*w),B=g*h+L*x+N*w-(z*h+W*x+E*w),_=d*h+W*j+q*w-(M*h+L*j+R*w),P=T*h+E*j+R*x-(U*h+N*j+q*x),Y=d*b+T*m+g*O-(U*m+z*O+M*b),Z=E*m+z*f+W*b-(L*b+N*m+g*f),D=L*O+R*m+M*f-(q*m+d*f+W*O),X=q*b+U*f+N*O-(E*O+R*b+T*f),K=a*S+n*C+s*A+c*k;if(Math.abs(K)<G.EPSILON21){if(u.equalsEpsilon(r.getMatrix3(t,Z1),B1,G.EPSILON7)&&c1.equals(r.getRow(t,3,Y1),k1))return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=0,e[11]=0,e[12]=-t[12],e[13]=-t[13],e[14]=-t[14],e[15]=1,e;throw new h1("matrix is not invertible because its determinate is zero.")}return K=1/K,e[0]=S*K,e[1]=C*K,e[2]=A*K,e[3]=k*K,e[4]=V*K,e[5]=I*K,e[6]=v*K,e[7]=F*K,e[8]=$*K,e[9]=B*K,e[10]=_*K,e[11]=P*K,e[12]=Y*K,e[13]=Z*K,e[14]=D*K,e[15]=X*K,e}static inverseTransformation(t,e){p.typeOf.object("matrix",t),p.typeOf.object("result",e);let r=t[0],a=t[1],n=t[2],s=t[4],c=t[5],i=t[6],o=t[8],y=t[9],l=t[10],u=t[12],f=t[13],O=t[14],b=-r*u-a*f-n*O,m=-s*u-c*f-i*O,h=-o*u-y*f-l*O;return e[0]=r,e[1]=s,e[2]=o,e[3]=0,e[4]=a,e[5]=c,e[6]=y,e[7]=0,e[8]=n,e[9]=i,e[10]=l,e[11]=0,e[12]=b,e[13]=m,e[14]=h,e[15]=1,e}static inverseTranspose(t,e){return p.typeOf.object("matrix",t),p.typeOf.object("result",e),r.inverse(r.transpose(t,X1),e)}get length(){return r.packedLength}clone(t){return r.clone(this,t)}equals(t){return r.equals(this,t)}static equalsArray(t,e,r){return t[0]===e[r]&&t[1]===e[r+1]&&t[2]===e[r+2]&&t[3]===e[r+3]&&t[4]===e[r+4]&&t[5]===e[r+5]&&t[6]===e[r+6]&&t[7]===e[r+7]&&t[8]===e[r+8]&&t[9]===e[r+9]&&t[10]===e[r+10]&&t[11]===e[r+11]&&t[12]===e[r+12]&&t[13]===e[r+13]&&t[14]===e[r+14]&&t[15]===e[r+15]}equalsEpsilon(t,e){return r.equalsEpsilon(this,t,e)}toString(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})\n(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})\n(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})\n(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`}};L.packedLength=16,L.fromArray=L.unpack,L.IDENTITY=Object.freeze(new L(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),L.ZERO=Object.freeze(new L(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),L.COLUMN0ROW0=0,L.COLUMN0ROW1=1,L.COLUMN0ROW2=2,L.COLUMN0ROW3=3,L.COLUMN1ROW0=4,L.COLUMN1ROW1=5,L.COLUMN1ROW2=6,L.COLUMN1ROW3=7,L.COLUMN2ROW0=8,L.COLUMN2ROW1=9,L.COLUMN2ROW2=10,L.COLUMN2ROW3=11,L.COLUMN3ROW0=12,L.COLUMN3ROW1=13,L.COLUMN3ROW2=14,L.COLUMN3ROW3=15;var e=new W,t=new W,l=new W,A1=new W,L1=new W,j1=new W,T1=new W,W1=new W,$1=new W,Z1=new u,B1=new u,Y1=new c1,k1=new c1(0,0,0,1),X1=new L,e1=L;export{c1 as a,e1 as b};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.143.0
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
import{a as A}from"./chunk-3VUCSHGU.js";import{j as W}from"./chunk-LNJEJFV5.js";import{b as Z}from"./chunk-BPABSUDY.js";import{a as v,c as N}from"./chunk-2AIOP76V.js";import{a as t,b as U}from"./chunk-IAE6APK2.js";import{a as ot}from"./chunk-3E7FIXV7.js";import{a as ct,b as h}from"./chunk-NZBME2JK.js";import{f as x}from"./chunk-6DLS2UKD.js";var X=class{constructor(t){this._ellipsoid=t??N.default,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}get ellipsoid(){return this._ellipsoid}project(e,r){let n=this._semimajorAxis,a=e.longitude*n,c=e.latitude*n,i=e.height;return x(r)?(r.x=a,r.y=c,r.z=i,r):new t(a,c,i)}unproject(t,e){if(!x(t))throw new ct("cartesian is required");let r=this._oneOverSemimajorAxis,n=t.x*r,a=t.y*r,c=t.z;return x(e)?(e.longitude=n,e.latitude=a,e.height=c,e):new v(n,a,c)}},F=X;function ft(t,e){this.start=t??0,this.stop=e??0}var at=ft,k=class e{constructor(e,r){this.center=t.clone(e??t.ZERO),this.radius=r??0}static fromPoints(r,n){if(x(n)||(n=new e),!x(r)||0===r.length)return n.center=t.clone(t.ZERO,n.center),n.radius=0,n;let a,c=t.clone(r[0],$),i=t.clone(c,Y),s=t.clone(c,G),o=t.clone(c,I),l=t.clone(c,J),u=t.clone(c,K),d=t.clone(c,Q),h=r.length;for(a=1;a<h;a++){t.clone(r[a],c);let e=c.x,n=c.y,h=c.z;e<i.x&&t.clone(c,i),e>l.x&&t.clone(c,l),n<s.y&&t.clone(c,s),n>u.y&&t.clone(c,u),h<o.z&&t.clone(c,o),h>d.z&&t.clone(c,d)}let m=t.magnitudeSquared(t.subtract(l,i,j)),y=t.magnitudeSquared(t.subtract(u,s,j)),f=t.magnitudeSquared(t.subtract(d,o,j)),p=i,g=l,z=m;y>z&&(z=y,p=s,g=u),f>z&&(z=f,p=o,g=d);let w=L;w.x=.5*(p.x+g.x),w.y=.5*(p.y+g.y),w.z=.5*(p.z+g.z);let b=t.magnitudeSquared(t.subtract(g,w,j)),O=Math.sqrt(b),S=H;S.x=i.x,S.y=s.y,S.z=o.z;let q=_;q.x=l.x,q.y=u.y,q.z=d.z;let E=t.midpoint(S,q,tt),P=0;for(a=0;a<h;a++){t.clone(r[a],c);let e=t.magnitude(t.subtract(c,E,j));e>P&&(P=e);let n=t.magnitudeSquared(t.subtract(c,w,j));if(n>b){let t=Math.sqrt(n);O=.5*(O+t),b=O*O;let e=t-O;w.x=(O*w.x+e*c.x)/t,w.y=(O*w.y+e*c.y)/t,w.z=(O*w.z+e*c.z)/t}}return O<P?(t.clone(w,n.center),n.radius=O):(t.clone(E,n.center),n.radius=P),n}static fromRectangle2D(t,r,n){return e.fromRectangleWithHeights2D(t,r,0,0,n)}static fromRectangleWithHeights2D(r,n,a,c,i){if(x(i)||(i=new e),!x(r))return i.center=t.clone(t.ZERO,i.center),i.radius=0,i;rt._ellipsoid=N.default,n=n??rt,W.southwest(r,nt),nt.height=a,W.northeast(r,et),et.height=c;let s=n.project(nt,ut),o=n.project(et,xt),l=o.x-s.x,u=o.y-s.y,d=o.z-s.z;i.radius=.5*Math.sqrt(l*l+u*u+d*d);let h=i.center;return h.x=s.x+.5*l,h.y=s.y+.5*u,h.z=s.z+.5*d,i}static fromRectangle3D(r,n,a,c){if(n=n??N.default,a=a??0,x(c)||(c=new e),!x(r))return c.center=t.clone(t.ZERO,c.center),c.radius=0,c;let i=W.subsample(r,n,a,yt);return e.fromPoints(i,c)}static fromVertices(r,n,a,c){if(x(c)||(c=new e),!x(r)||0===r.length)return c.center=t.clone(t.ZERO,c.center),c.radius=0,c;n=n??t.ZERO,a=a??3,h.typeOf.number.greaterThanOrEquals("stride",a,3);let i=$;i.x=r[0]+n.x,i.y=r[1]+n.y,i.z=r[2]+n.z;let s,o=t.clone(i,Y),l=t.clone(i,G),u=t.clone(i,I),d=t.clone(i,J),m=t.clone(i,K),y=t.clone(i,Q),f=r.length;for(s=0;s<f;s+=a){let e=r[s]+n.x,a=r[s+1]+n.y,c=r[s+2]+n.z;i.x=e,i.y=a,i.z=c,e<o.x&&t.clone(i,o),e>d.x&&t.clone(i,d),a<l.y&&t.clone(i,l),a>m.y&&t.clone(i,m),c<u.z&&t.clone(i,u),c>y.z&&t.clone(i,y)}let p=t.magnitudeSquared(t.subtract(d,o,j)),g=t.magnitudeSquared(t.subtract(m,l,j)),z=t.magnitudeSquared(t.subtract(y,u,j)),w=o,b=d,O=p;g>O&&(O=g,w=l,b=m),z>O&&(O=z,w=u,b=y);let S=L;S.x=.5*(w.x+b.x),S.y=.5*(w.y+b.y),S.z=.5*(w.z+b.z);let q=t.magnitudeSquared(t.subtract(b,S,j)),E=Math.sqrt(q),P=H;P.x=o.x,P.y=l.y,P.z=u.z;let R=_;R.x=d.x,R.y=m.y,R.z=y.z;let Z=t.midpoint(P,R,tt),A=0;for(s=0;s<f;s+=a){i.x=r[s]+n.x,i.y=r[s+1]+n.y,i.z=r[s+2]+n.z;let e=t.magnitude(t.subtract(i,Z,j));e>A&&(A=e);let a=t.magnitudeSquared(t.subtract(i,S,j));if(a>q){let t=Math.sqrt(a);E=.5*(E+t),q=E*E;let e=t-E;S.x=(E*S.x+e*i.x)/t,S.y=(E*S.y+e*i.y)/t,S.z=(E*S.z+e*i.z)/t}}return E<A?(t.clone(S,c.center),c.radius=E):(t.clone(Z,c.center),c.radius=A),c}static fromEncodedCartesianVertices(r,n,a){if(x(a)||(a=new e),!x(r)||!x(n)||r.length!==n.length||0===r.length)return a.center=t.clone(t.ZERO,a.center),a.radius=0,a;let c=$;c.x=r[0]+n[0],c.y=r[1]+n[1],c.z=r[2]+n[2];let i,s=t.clone(c,Y),o=t.clone(c,G),l=t.clone(c,I),u=t.clone(c,J),d=t.clone(c,K),h=t.clone(c,Q),m=r.length;for(i=0;i<m;i+=3){let e=r[i]+n[i],a=r[i+1]+n[i+1],m=r[i+2]+n[i+2];c.x=e,c.y=a,c.z=m,e<s.x&&t.clone(c,s),e>u.x&&t.clone(c,u),a<o.y&&t.clone(c,o),a>d.y&&t.clone(c,d),m<l.z&&t.clone(c,l),m>h.z&&t.clone(c,h)}let y=t.magnitudeSquared(t.subtract(u,s,j)),f=t.magnitudeSquared(t.subtract(d,o,j)),p=t.magnitudeSquared(t.subtract(h,l,j)),g=s,z=u,w=y;f>w&&(w=f,g=o,z=d),p>w&&(w=p,g=l,z=h);let b=L;b.x=.5*(g.x+z.x),b.y=.5*(g.y+z.y),b.z=.5*(g.z+z.z);let O=t.magnitudeSquared(t.subtract(z,b,j)),S=Math.sqrt(O),q=H;q.x=s.x,q.y=o.y,q.z=l.z;let E=_;E.x=u.x,E.y=d.y,E.z=h.z;let P=t.midpoint(q,E,tt),R=0;for(i=0;i<m;i+=3){c.x=r[i]+n[i],c.y=r[i+1]+n[i+1],c.z=r[i+2]+n[i+2];let e=t.magnitude(t.subtract(c,P,j));e>R&&(R=e);let a=t.magnitudeSquared(t.subtract(c,b,j));if(a>O){let t=Math.sqrt(a);S=.5*(S+t),O=S*S;let e=t-S;b.x=(S*b.x+e*c.x)/t,b.y=(S*b.y+e*c.y)/t,b.z=(S*b.z+e*c.z)/t}}return S<R?(t.clone(b,a.center),a.radius=S):(t.clone(P,a.center),a.radius=R),a}static fromCornerPoints(r,n,a){h.typeOf.object("corner",r),h.typeOf.object("oppositeCorner",n),x(a)||(a=new e);let c=t.midpoint(r,n,a.center);return a.radius=t.distance(c,n),a}static fromEllipsoid(r,n){return h.typeOf.object("ellipsoid",r),x(n)||(n=new e),t.clone(t.ZERO,n.center),n.radius=r.maximumRadius,n}static fromBoundingSpheres(r,n){if(x(n)||(n=new e),!x(r)||0===r.length)return n.center=t.clone(t.ZERO,n.center),n.radius=0,n;let a=r.length;if(1===a)return e.clone(r[0],n);if(2===a)return e.union(r[0],r[1],n);let c,i=[];for(c=0;c<a;c++)i.push(r[c].center);let s=(n=e.fromPoints(i,n)).center,o=n.radius;for(c=0;c<a;c++){let e=r[c];o=Math.max(o,t.distance(s,e.center)+e.radius)}return n.radius=o,n}static fromOrientedBoundingBox(r,n){h.defined("orientedBoundingBox",r),x(n)||(n=new e);let a=r.halfAxes,c=U.getColumn(a,0,lt),i=U.getColumn(a,1,zt),s=U.getColumn(a,2,ht);return t.add(c,i,c),t.add(c,s,c),n.center=t.clone(r.center,n.center),n.radius=t.magnitude(c),n}static fromTransformation(r,n){h.typeOf.object("transformation",r),x(n)||(n=new e);let a=Z.getTranslation(r,St),c=Z.getScale(r,wt),i=.5*t.magnitude(c);return n.center=t.clone(a,n.center),n.radius=i,n}static clone(r,n){if(x(r))return x(n)?(n.center=t.clone(r.center,n.center),n.radius=r.radius,n):new e(r.center,r.radius)}static pack(t,e,r){h.typeOf.object("value",t),h.defined("array",e),r=r??0;let n=t.center;return e[r++]=n.x,e[r++]=n.y,e[r++]=n.z,e[r]=t.radius,e}static unpack(t,r,n){h.defined("array",t),r=r??0,x(n)||(n=new e);let a=n.center;return a.x=t[r++],a.y=t[r++],a.z=t[r++],n.radius=t[r],n}static union(r,n,a){h.typeOf.object("left",r),h.typeOf.object("right",n),x(a)||(a=new e);let c=r.center,i=r.radius,s=n.center,o=n.radius,l=t.subtract(s,c,pt),u=t.magnitude(l);if(i>=u+o)return r.clone(a),a;if(o>=u+i)return n.clone(a),a;let d=.5*(i+u+o),m=t.multiplyByScalar(l,(-i+d)/u,Pt);return t.add(m,c,m),t.clone(m,a.center),a.radius=d,a}static expand(r,n,a){h.typeOf.object("sphere",r),h.typeOf.object("point",n),a=e.clone(r,a);let c=t.magnitude(t.subtract(n,a.center,Ot));return c>a.radius&&(a.radius=c),a}static intersectPlane(e,r){h.typeOf.object("sphere",e),h.typeOf.object("plane",r);let n=e.center,a=e.radius,c=r.normal,i=t.dot(c,n)+r.distance;return i<-a?A.OUTSIDE:i<a?A.INTERSECTING:A.INSIDE}static transform(t,r,n){return h.typeOf.object("sphere",t),h.typeOf.object("transform",r),x(n)||(n=new e),n.center=Z.multiplyByPoint(r,t.center,n.center),n.radius=Z.getMaximumScale(r)*t.radius,n}static distanceSquaredTo(e,r){h.typeOf.object("sphere",e),h.typeOf.object("cartesian",r);let n=t.subtract(e.center,r,gt),a=t.magnitude(n)-e.radius;return a<=0?0:a*a}static transformWithoutScale(t,r,n){return h.typeOf.object("sphere",t),h.typeOf.object("transform",r),x(n)||(n=new e),n.center=Z.multiplyByPoint(r,t.center,n.center),n.radius=t.radius,n}static computePlaneDistances(e,r,n,a){h.typeOf.object("sphere",e),h.typeOf.object("position",r),h.typeOf.object("direction",n),x(a)||(a=new at);let c=t.subtract(e.center,r,bt),i=t.dot(n,c);return a.start=i-e.radius,a.stop=i+e.radius,a}static projectTo2D(r,n,a){h.typeOf.object("sphere",r),dt._ellipsoid=N.default;let c,i=(n=n??dt).ellipsoid,s=r.center,o=r.radius;c=t.equals(s,t.ZERO)?t.clone(t.UNIT_X,it):i.geodeticSurfaceNormal(s,it);let l=t.cross(t.UNIT_Z,c,jt);t.normalize(l,l);let u=t.cross(c,l,qt);t.normalize(u,u),t.multiplyByScalar(c,o,c),t.multiplyByScalar(u,o,u),t.multiplyByScalar(l,o,l);let d=t.negate(u,Ct),m=t.negate(l,Mt),x=st,y=x[0];t.add(c,u,y),t.add(y,l,y),y=x[1],t.add(c,u,y),t.add(y,m,y),y=x[2],t.add(c,d,y),t.add(y,m,y),y=x[3],t.add(c,d,y),t.add(y,l,y),t.negate(c,c),y=x[4],t.add(c,u,y),t.add(y,l,y),y=x[5],t.add(c,u,y),t.add(y,m,y),y=x[6],t.add(c,d,y),t.add(y,m,y),y=x[7],t.add(c,d,y),t.add(y,l,y);let f=x.length;for(let e=0;e<f;++e){let r=x[e];t.add(s,r,r);let a=i.cartesianToCartographic(r,Rt);n.project(a,r)}s=(a=e.fromPoints(x,a)).center;let p=s.x,g=s.y,j=s.z;return s.x=j,s.y=p,s.z=g,a}static isOccluded(t,e){return h.typeOf.object("sphere",t),h.typeOf.object("occluder",e),!e.isBoundingSphereVisible(t)}static equals(e,r){return e===r||x(e)&&x(r)&&t.equals(e.center,r.center)&&e.radius===r.radius}intersectPlane(t){return e.intersectPlane(this,t)}distanceSquaredTo(t){return e.distanceSquaredTo(this,t)}computePlaneDistances(t,r,n){return e.computePlaneDistances(this,t,r,n)}isOccluded(t){return e.isOccluded(this,t)}equals(t){return e.equals(this,t)}clone(t){return e.clone(this,t)}volume(){let t=this.radius;return mt*t*t*t}};k.packedLength=4;var Y=new t,G=new t,I=new t,J=new t,K=new t,Q=new t,$=new t,j=new t,L=new t,H=new t,_=new t,tt=new t,mt=4/3*ot.PI,rt=new F,ut=new t,xt=new t,nt=new v,et=new v,yt=[],lt=new t,zt=new t,ht=new t,St=new t,wt=new t,pt=new t,Pt=new t,Ot=new t,gt=new t,bt=new t,it=new t,jt=new t,qt=new t,Mt=new t,Ct=new t,Rt=new v,st=new Array(8);for(let e=0;e<8;++e)st[e]=new t;var dt=new F,Qt=k;export{F as a,at as b,Qt as c};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.143.0
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
import{a as G}from"./chunk-P7N43FDO.js";import{a as At}from"./chunk-XRJOFXJF.js";import{a as yt}from"./chunk-QNPYEODC.js";import{a as $}from"./chunk-ML6MR2RA.js";import{a as v}from"./chunk-AKELQO2L.js";import{a as st}from"./chunk-4WQ4VT5S.js";import{a as ht}from"./chunk-6EINM7EY.js";import{b as ct,c as rt,d as F}from"./chunk-A4I25VN7.js";import{a as lt,c as it}from"./chunk-D3TVNJ6W.js";import{h as nt,j as bt}from"./chunk-LNJEJFV5.js";import{a as P}from"./chunk-ATKJRN2G.js";import{a as _t,b as Q,c as D}from"./chunk-2AIOP76V.js";import{a,b as C,c as dt}from"./chunk-IAE6APK2.js";import{a as R}from"./chunk-3E7FIXV7.js";import{a as ot,b as k}from"./chunk-NZBME2JK.js";import{f as Z}from"./chunk-6DLS2UKD.js";var tt=new a,pt=new a,xt=new a,wt=new a,w=new Q,Mt=new C,Vt=new C,gt=new nt,Tt=new a,Nt=new a,Et=new a,ft=new _t,Pt=new a,Ft=new Q,St=new Q;function Ot(t,e,i){let o=e.vertexFormat,r=e.center,n=e.semiMajorAxis,s=e.semiMinorAxis,l=e.ellipsoid,u=e.stRotation,m=i?t.length/3*2:t.length/3,c=e.shadowVolume,p=o.st?new Float32Array(2*m):void 0,f=o.normal?new Float32Array(3*m):void 0,h=o.tangent?new Float32Array(3*m):void 0,d=o.bitangent?new Float32Array(3*m):void 0,A=c?new Float32Array(3*m):void 0,y=0,x=Tt,g=Nt,_=Et,b=new lt(l),v=b.project(l.cartesianToCartographic(r,ft),Pt),N=l.scaleToGeodeticSurface(r,tt);l.geodeticSurfaceNormal(N,N);let T=Mt,I=Vt;if(0!==u){let t=nt.fromAxisAngle(N,u,gt);T=C.fromQuaternion(t,T),t=nt.fromAxisAngle(N,-u,gt),I=C.fromQuaternion(t,I)}else T=C.clone(C.IDENTITY,T),I=C.clone(C.IDENTITY,I);let E=Q.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Ft),M=Q.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,St),R=t.length,j=i?R:0,O=j/3*2;for(let e=0;e<R;e+=3){let r=e+1,u=e+2,m=a.fromArray(t,e,tt);if(o.st){let t=C.multiplyByVector(T,m,pt),e=b.project(l.cartesianToCartographic(t,ft),xt);a.subtract(e,v,e),w.x=(e.x+n)/(2*n),w.y=(e.y+s)/(2*s),E.x=Math.min(w.x,E.x),E.y=Math.min(w.y,E.y),M.x=Math.max(w.x,M.x),M.y=Math.max(w.y,M.y),i&&(p[y+O]=w.x,p[y+1+O]=w.y),p[y++]=w.x,p[y++]=w.y}(o.normal||o.tangent||o.bitangent||c)&&(x=l.geodeticSurfaceNormal(m,x),c&&(A[e+j]=-x.x,A[r+j]=-x.y,A[u+j]=-x.z),(o.normal||o.tangent||o.bitangent)&&((o.tangent||o.bitangent)&&(g=a.normalize(a.cross(a.UNIT_Z,x,g),g),C.multiplyByVector(I,g,g)),o.normal&&(f[e]=x.x,f[r]=x.y,f[u]=x.z,i&&(f[e+j]=-x.x,f[r+j]=-x.y,f[u+j]=-x.z)),o.tangent&&(h[e]=g.x,h[r]=g.y,h[u]=g.z,i&&(h[e+j]=-g.x,h[r+j]=-g.y,h[u+j]=-g.z)),o.bitangent&&(_=a.normalize(a.cross(x,g,_),_),d[e]=_.x,d[r]=_.y,d[u]=_.z,i&&(d[e+j]=_.x,d[r+j]=_.y,d[u+j]=_.z))))}if(o.st){R=p.length;for(let t=0;t<R;t+=2)p[t]=(p[t]-E.x)/(M.x-E.x),p[t+1]=(p[t+1]-E.y)/(M.y-E.y)}let k=new ht;if(o.position){let o=G.raisePositionsToHeight(t,e,i);k.position=new F({componentDatatype:P.DOUBLE,componentsPerAttribute:3,values:o})}if(o.st&&(k.st=new F({componentDatatype:P.FLOAT,componentsPerAttribute:2,values:p})),o.normal&&(k.normal=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:f})),o.tangent&&(k.tangent=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:h})),o.bitangent&&(k.bitangent=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:d})),c&&(k.extrudeDirection=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:A})),i&&Z(e.offsetAttribute)){let t=new Uint8Array(m);if(e.offsetAttribute===$.TOP)t=t.fill(1,0,m/2);else{let i=e.offsetAttribute===$.NONE?0:1;t=t.fill(i)}k.applyOffset=new F({componentDatatype:P.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return k}function jt(t){let e,i,o,r,n,a=new Array(t*(t+1)*12-6),s=0;for(e=0,o=1,r=0;r<3;r++)a[s++]=o++,a[s++]=e,a[s++]=o;for(r=2;r<t+1;++r){for(o=r*(r+1)-1,e=(r-1)*r-1,a[s++]=o++,a[s++]=e,a[s++]=o,i=2*r,n=0;n<i-1;++n)a[s++]=o,a[s++]=e++,a[s++]=e,a[s++]=o++,a[s++]=e,a[s++]=o;a[s++]=o++,a[s++]=e,a[s++]=o}for(i=2*t,++o,++e,r=0;r<i-1;++r)a[s++]=o,a[s++]=e++,a[s++]=e,a[s++]=o++,a[s++]=e,a[s++]=o;for(a[s++]=o,a[s++]=e++,a[s++]=e,a[s++]=o++,a[s++]=e++,a[s++]=e,++e,r=t-1;r>1;--r){for(a[s++]=e++,a[s++]=e,a[s++]=o,i=2*r,n=0;n<i-1;++n)a[s++]=o,a[s++]=e++,a[s++]=e,a[s++]=o++,a[s++]=e,a[s++]=o;a[s++]=e++,a[s++]=e++,a[s++]=o++}for(r=0;r<3;r++)a[s++]=e++,a[s++]=e,a[s++]=o;return a}var K=new a;function Dt(t){let e=t.center;K=a.multiplyByScalar(t.ellipsoid.geodeticSurfaceNormal(e,K),t.height,K),K=a.add(e,K,K);let i=new it(K,t.semiMajorAxis),o=G.computeEllipsePositions(t,!0,!1),r=o.positions,n=o.numPts,s=Ot(r,t,!1),l=jt(n);return l=st.createTypedArray(r.length/3,l),{boundingSphere:i,attributes:s,indices:l}}function vt(t,e){let i=e.vertexFormat,o=e.center,r=e.semiMajorAxis,n=e.semiMinorAxis,s=e.ellipsoid,l=e.height,u=e.extrudedHeight,m=e.stRotation,c=t.length/3*2,p=new Float64Array(3*c),f=i.st?new Float32Array(2*c):void 0,h=i.normal?new Float32Array(3*c):void 0,d=i.tangent?new Float32Array(3*c):void 0,A=i.bitangent?new Float32Array(3*c):void 0,y=e.shadowVolume,x=y?new Float32Array(3*c):void 0,g=0,_=Tt,b=Nt,v=Et,N=new lt(s),T=N.project(s.cartesianToCartographic(o,ft),Pt),I=s.scaleToGeodeticSurface(o,tt);s.geodeticSurfaceNormal(I,I);let E=nt.fromAxisAngle(I,m,gt),M=C.fromQuaternion(E,Mt),R=Q.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Ft),j=Q.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,St),O=t.length,k=O/3*2;for(let e=0;e<O;e+=3){let o,m=e+1,c=e+2,P=a.fromArray(t,e,tt);if(i.st){let t=C.multiplyByVector(M,P,pt),e=N.project(s.cartesianToCartographic(t,ft),xt);a.subtract(e,T,e),w.x=(e.x+r)/(2*r),w.y=(e.y+n)/(2*n),R.x=Math.min(w.x,R.x),R.y=Math.min(w.y,R.y),j.x=Math.max(w.x,j.x),j.y=Math.max(w.y,j.y),f[g+k]=w.x,f[g+1+k]=w.y,f[g++]=w.x,f[g++]=w.y}P=s.scaleToGeodeticSurface(P,P),o=a.clone(P,pt),_=s.geodeticSurfaceNormal(P,_),y&&(x[e+O]=-_.x,x[m+O]=-_.y,x[c+O]=-_.z);let I=a.multiplyByScalar(_,l,wt);if(P=a.add(P,I,P),I=a.multiplyByScalar(_,u,I),o=a.add(o,I,o),i.position&&(p[e+O]=o.x,p[m+O]=o.y,p[c+O]=o.z,p[e]=P.x,p[m]=P.y,p[c]=P.z),i.normal||i.tangent||i.bitangent){v=a.clone(_,v);let r=a.fromArray(t,(e+3)%O,wt);a.subtract(r,P,r);let n=a.subtract(o,P,xt);_=a.normalize(a.cross(n,r,_),_),i.normal&&(h[e]=_.x,h[m]=_.y,h[c]=_.z,h[e+O]=_.x,h[m+O]=_.y,h[c+O]=_.z),i.tangent&&(b=a.normalize(a.cross(v,_,b),b),d[e]=b.x,d[m]=b.y,d[c]=b.z,d[e+O]=b.x,d[e+1+O]=b.y,d[e+2+O]=b.z),i.bitangent&&(A[e]=v.x,A[m]=v.y,A[c]=v.z,A[e+O]=v.x,A[m+O]=v.y,A[c+O]=v.z)}}if(i.st){O=f.length;for(let t=0;t<O;t+=2)f[t]=(f[t]-R.x)/(j.x-R.x),f[t+1]=(f[t+1]-R.y)/(j.y-R.y)}let D=new ht;if(i.position&&(D.position=new F({componentDatatype:P.DOUBLE,componentsPerAttribute:3,values:p})),i.st&&(D.st=new F({componentDatatype:P.FLOAT,componentsPerAttribute:2,values:f})),i.normal&&(D.normal=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:h})),i.tangent&&(D.tangent=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:d})),i.bitangent&&(D.bitangent=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:A})),y&&(D.extrudeDirection=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:x})),Z(e.offsetAttribute)){let t=new Uint8Array(c);if(e.offsetAttribute===$.TOP)t=t.fill(1,0,c/2);else{let i=e.offsetAttribute===$.NONE?0:1;t=t.fill(i)}D.applyOffset=new F({componentDatatype:P.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return D}function zt(t){let e=t.length/3,i=st.createTypedArray(e,6*e),o=0;for(let t=0;t<e;t++){let r=t,n=t+e,a=(r+1)%e,s=a+e;i[o++]=r,i[o++]=n,i[o++]=a,i[o++]=a,i[o++]=n,i[o++]=s}return i}var mt=new it,ut=new it;function Bt(t){let e=t.center,i=t.ellipsoid,o=t.semiMajorAxis,r=a.multiplyByScalar(i.geodeticSurfaceNormal(e,tt),t.height,tt);mt.center=a.add(e,r,mt.center),mt.radius=o,r=a.multiplyByScalar(i.geodeticSurfaceNormal(e,r),t.extrudedHeight,r),ut.center=a.add(e,r,ut.center),ut.radius=o;let n=G.computeEllipsePositions(t,!0,!0),s=n.positions,l=n.numPts,u=n.outerPositions,m=it.union(mt,ut),c=Ot(s,t,!0),p=jt(l),f=p.length;p.length=2*f;let h=s.length/3;for(let t=0;t<f;t+=3)p[t+f]=p[t+2]+h,p[t+1+f]=p[t+1]+h,p[t+2+f]=p[t]+h;let d=st.createTypedArray(2*h/3,p),A=new rt({attributes:c,indices:d,primitiveType:ct.TRIANGLES}),y=vt(u,t);p=zt(u);let x=st.createTypedArray(2*u.length/3,p),g=new rt({attributes:y,indices:x,primitiveType:ct.TRIANGLES}),_=yt.combineInstances([new At({geometry:A}),new At({geometry:g})]);return{boundingSphere:m,attributes:_[0].attributes,indices:_[0].indices}}function Ct(t,e,i,o,r,n,s){let l=G.computeEllipsePositions({center:t,semiMajorAxis:e,semiMinorAxis:i,rotation:o,granularity:r},!1,!0).outerPositions,u=l.length/3,m=new Array(u);for(let t=0;t<u;++t)m[t]=a.fromArray(l,3*t);let c=bt.fromCartesianArray(m,n,s);return c.width>R.PI&&(c.north=c.north>0?R.PI_OVER_TWO-R.EPSILON7:c.north,c.south=c.south<0?R.EPSILON7-R.PI_OVER_TWO:c.south,c.east=R.PI,c.west=-R.PI),c}function Y(t){let e=(t=t??dt.EMPTY_OBJECT).center,i=t.ellipsoid??D.default,o=t.semiMajorAxis,r=t.semiMinorAxis,n=t.granularity??R.RADIANS_PER_DEGREE,s=t.vertexFormat??v.DEFAULT;if(k.defined("options.center",e),k.typeOf.number("options.semiMajorAxis",o),k.typeOf.number("options.semiMinorAxis",r),o<r)throw new ot("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(n<=0)throw new ot("granularity must be greater than zero.");let l=t.height??0,u=t.extrudedHeight??l;this._center=a.clone(e),this._semiMajorAxis=o,this._semiMinorAxis=r,this._ellipsoid=D.clone(i),this._rotation=t.rotation??0,this._stRotation=t.stRotation??0,this._height=Math.max(u,l),this._granularity=n,this._vertexFormat=v.clone(s),this._extrudedHeight=Math.min(u,l),this._shadowVolume=t.shadowVolume??!1,this._workerName="createEllipseGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}Y.packedLength=a.packedLength+D.packedLength+v.packedLength+9,Y.pack=function(t,e,i){return k.defined("value",t),k.defined("array",e),i=i??0,a.pack(t._center,e,i),i+=a.packedLength,D.pack(t._ellipsoid,e,i),i+=D.packedLength,v.pack(t._vertexFormat,e,i),i+=v.packedLength,e[i++]=t._semiMajorAxis,e[i++]=t._semiMinorAxis,e[i++]=t._rotation,e[i++]=t._stRotation,e[i++]=t._height,e[i++]=t._granularity,e[i++]=t._extrudedHeight,e[i++]=t._shadowVolume?1:0,e[i]=t._offsetAttribute??-1,e};var Rt=new a,It=new D,Lt=new v,H={center:Rt,ellipsoid:It,vertexFormat:Lt,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};function kt(t){let e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];let i=G.computeEllipsePositions({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,rotation:t._rotation,granularity:t._granularity},!1,!0).outerPositions,o=i.length/3,r=new Array(o);for(let t=0;t<o;++t)r[t]=a.fromArray(i,3*t);let n=t._ellipsoid,s=t.rectangle;return rt._textureCoordinateRotationPoints(r,e,n,s)}Y.unpack=function(t,e,i){k.defined("array",t),e=e??0;let o=a.unpack(t,e,Rt);e+=a.packedLength;let r=D.unpack(t,e,It);e+=D.packedLength;let n=v.unpack(t,e,Lt);e+=v.packedLength;let s=t[e++],l=t[e++],u=t[e++],m=t[e++],c=t[e++],p=t[e++],f=t[e++],h=1===t[e++],d=t[e];return Z(i)?(i._center=a.clone(o,i._center),i._ellipsoid=D.clone(r,i._ellipsoid),i._vertexFormat=v.clone(n,i._vertexFormat),i._semiMajorAxis=s,i._semiMinorAxis=l,i._rotation=u,i._stRotation=m,i._height=c,i._granularity=p,i._extrudedHeight=f,i._shadowVolume=h,i._offsetAttribute=-1===d?void 0:d,i):(H.height=c,H.extrudedHeight=f,H.granularity=p,H.stRotation=m,H.rotation=u,H.semiMajorAxis=s,H.semiMinorAxis=l,H.shadowVolume=h,H.offsetAttribute=-1===d?void 0:d,new Y(H))},Y.computeRectangle=function(t,e){let i=(t=t??dt.EMPTY_OBJECT).center,o=t.ellipsoid??D.default,r=t.semiMajorAxis,n=t.semiMinorAxis,a=t.granularity??R.RADIANS_PER_DEGREE,s=t.rotation??0;if(k.defined("options.center",i),k.typeOf.number("options.semiMajorAxis",r),k.typeOf.number("options.semiMinorAxis",n),r<n)throw new ot("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(a<=0)throw new ot("granularity must be greater than zero.");return Ct(i,r,n,s,a,o,e)},Y.createGeometry=function(t){if(t._semiMajorAxis<=0||t._semiMinorAxis<=0)return;let e=t._height,i=t._extrudedHeight,o=!R.equalsEpsilon(e,i,0,R.EPSILON2);t._center=t._ellipsoid.scaleToGeodeticSurface(t._center,t._center);let r,n={center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:t._ellipsoid,rotation:t._rotation,height:e,granularity:t._granularity,vertexFormat:t._vertexFormat,stRotation:t._stRotation};if(o)n.extrudedHeight=i,n.shadowVolume=t._shadowVolume,n.offsetAttribute=t._offsetAttribute,r=Bt(n);else if(r=Dt(n),Z(t._offsetAttribute)){let e=r.attributes.position.values.length,i=t._offsetAttribute===$.NONE?0:1,o=new Uint8Array(e/3).fill(i);r.attributes.applyOffset=new F({componentDatatype:P.UNSIGNED_BYTE,componentsPerAttribute:1,values:o})}return new rt({attributes:r.attributes,indices:r.indices,primitiveType:ct.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:t._offsetAttribute})},Y.createShadowVolume=function(t,e,i){let o=t._granularity,r=t._ellipsoid,n=e(o,r),a=i(o,r);return new Y({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:r,rotation:t._rotation,stRotation:t._stRotation,granularity:o,extrudedHeight:n,height:a,vertexFormat:v.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(Y.prototype,{rectangle:{get:function(){return Z(this._rectangle)||(this._rectangle=Ct(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return Z(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=kt(this)),this._textureCoordinateRotationPoints}}});var de=Y;export{de as a};
|