@sl-utils/cesium 1.0.0 → 1.0.1
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/LICENSE copy +201 -0
- package/README.md +5 -0
- package/demo/App.vue +26 -0
- package/demo/main.ts +5 -0
- package/demo/style.css +3 -0
- package/index.cjs +12 -0
- package/index.html +13 -0
- package/package.json +31 -3
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_27.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1 -0
- package/public/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1 -0
- package/public/Assets/Images/bing_maps_credit.png +0 -0
- package/public/Assets/Images/cesium_credit.png +0 -0
- package/public/Assets/Images/google_earth_credit.png +0 -0
- package/public/Assets/Images/ion-credit.png +0 -0
- package/public/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
- package/public/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
- package/public/Assets/Textures/NaturalEarthII/tilemapresource.xml +14 -0
- package/public/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
- package/public/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
- package/public/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
- package/public/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
- package/public/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
- package/public/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
- package/public/Assets/Textures/maki/airfield.png +0 -0
- package/public/Assets/Textures/maki/airport.png +0 -0
- package/public/Assets/Textures/maki/alcohol-shop.png +0 -0
- package/public/Assets/Textures/maki/america-football.png +0 -0
- package/public/Assets/Textures/maki/art-gallery.png +0 -0
- package/public/Assets/Textures/maki/bakery.png +0 -0
- package/public/Assets/Textures/maki/bank.png +0 -0
- package/public/Assets/Textures/maki/bar.png +0 -0
- package/public/Assets/Textures/maki/baseball.png +0 -0
- package/public/Assets/Textures/maki/basketball.png +0 -0
- package/public/Assets/Textures/maki/beer.png +0 -0
- package/public/Assets/Textures/maki/bicycle.png +0 -0
- package/public/Assets/Textures/maki/building.png +0 -0
- package/public/Assets/Textures/maki/bus.png +0 -0
- package/public/Assets/Textures/maki/cafe.png +0 -0
- package/public/Assets/Textures/maki/camera.png +0 -0
- package/public/Assets/Textures/maki/campsite.png +0 -0
- package/public/Assets/Textures/maki/car.png +0 -0
- package/public/Assets/Textures/maki/cemetery.png +0 -0
- package/public/Assets/Textures/maki/cesium.png +0 -0
- package/public/Assets/Textures/maki/chemist.png +0 -0
- package/public/Assets/Textures/maki/cinema.png +0 -0
- package/public/Assets/Textures/maki/circle-stroked.png +0 -0
- package/public/Assets/Textures/maki/circle.png +0 -0
- package/public/Assets/Textures/maki/city.png +0 -0
- package/public/Assets/Textures/maki/clothing-store.png +0 -0
- package/public/Assets/Textures/maki/college.png +0 -0
- package/public/Assets/Textures/maki/commercial.png +0 -0
- package/public/Assets/Textures/maki/cricket.png +0 -0
- package/public/Assets/Textures/maki/cross.png +0 -0
- package/public/Assets/Textures/maki/dam.png +0 -0
- package/public/Assets/Textures/maki/danger.png +0 -0
- package/public/Assets/Textures/maki/disability.png +0 -0
- package/public/Assets/Textures/maki/dog-park.png +0 -0
- package/public/Assets/Textures/maki/embassy.png +0 -0
- package/public/Assets/Textures/maki/emergency-telephone.png +0 -0
- package/public/Assets/Textures/maki/entrance.png +0 -0
- package/public/Assets/Textures/maki/farm.png +0 -0
- package/public/Assets/Textures/maki/fast-food.png +0 -0
- package/public/Assets/Textures/maki/ferry.png +0 -0
- package/public/Assets/Textures/maki/fire-station.png +0 -0
- package/public/Assets/Textures/maki/fuel.png +0 -0
- package/public/Assets/Textures/maki/garden.png +0 -0
- package/public/Assets/Textures/maki/gift.png +0 -0
- package/public/Assets/Textures/maki/golf.png +0 -0
- package/public/Assets/Textures/maki/grocery.png +0 -0
- package/public/Assets/Textures/maki/hairdresser.png +0 -0
- package/public/Assets/Textures/maki/harbor.png +0 -0
- package/public/Assets/Textures/maki/heart.png +0 -0
- package/public/Assets/Textures/maki/heliport.png +0 -0
- package/public/Assets/Textures/maki/hospital.png +0 -0
- package/public/Assets/Textures/maki/ice-cream.png +0 -0
- package/public/Assets/Textures/maki/industrial.png +0 -0
- package/public/Assets/Textures/maki/land-use.png +0 -0
- package/public/Assets/Textures/maki/laundry.png +0 -0
- package/public/Assets/Textures/maki/library.png +0 -0
- package/public/Assets/Textures/maki/lighthouse.png +0 -0
- package/public/Assets/Textures/maki/lodging.png +0 -0
- package/public/Assets/Textures/maki/logging.png +0 -0
- package/public/Assets/Textures/maki/london-underground.png +0 -0
- package/public/Assets/Textures/maki/marker-stroked.png +0 -0
- package/public/Assets/Textures/maki/marker.png +0 -0
- package/public/Assets/Textures/maki/minefield.png +0 -0
- package/public/Assets/Textures/maki/mobilephone.png +0 -0
- package/public/Assets/Textures/maki/monument.png +0 -0
- package/public/Assets/Textures/maki/museum.png +0 -0
- package/public/Assets/Textures/maki/music.png +0 -0
- package/public/Assets/Textures/maki/oil-well.png +0 -0
- package/public/Assets/Textures/maki/park.png +0 -0
- package/public/Assets/Textures/maki/park2.png +0 -0
- package/public/Assets/Textures/maki/parking-garage.png +0 -0
- package/public/Assets/Textures/maki/parking.png +0 -0
- package/public/Assets/Textures/maki/pharmacy.png +0 -0
- package/public/Assets/Textures/maki/pitch.png +0 -0
- package/public/Assets/Textures/maki/place-of-worship.png +0 -0
- package/public/Assets/Textures/maki/playground.png +0 -0
- package/public/Assets/Textures/maki/police.png +0 -0
- package/public/Assets/Textures/maki/polling-place.png +0 -0
- package/public/Assets/Textures/maki/post.png +0 -0
- package/public/Assets/Textures/maki/prison.png +0 -0
- package/public/Assets/Textures/maki/rail-above.png +0 -0
- package/public/Assets/Textures/maki/rail-light.png +0 -0
- package/public/Assets/Textures/maki/rail-metro.png +0 -0
- package/public/Assets/Textures/maki/rail-underground.png +0 -0
- package/public/Assets/Textures/maki/rail.png +0 -0
- package/public/Assets/Textures/maki/religious-christian.png +0 -0
- package/public/Assets/Textures/maki/religious-jewish.png +0 -0
- package/public/Assets/Textures/maki/religious-muslim.png +0 -0
- package/public/Assets/Textures/maki/restaurant.png +0 -0
- package/public/Assets/Textures/maki/roadblock.png +0 -0
- package/public/Assets/Textures/maki/rocket.png +0 -0
- package/public/Assets/Textures/maki/school.png +0 -0
- package/public/Assets/Textures/maki/scooter.png +0 -0
- package/public/Assets/Textures/maki/shop.png +0 -0
- package/public/Assets/Textures/maki/skiing.png +0 -0
- package/public/Assets/Textures/maki/slaughterhouse.png +0 -0
- package/public/Assets/Textures/maki/soccer.png +0 -0
- package/public/Assets/Textures/maki/square-stroked.png +0 -0
- package/public/Assets/Textures/maki/square.png +0 -0
- package/public/Assets/Textures/maki/star-stroked.png +0 -0
- package/public/Assets/Textures/maki/star.png +0 -0
- package/public/Assets/Textures/maki/suitcase.png +0 -0
- package/public/Assets/Textures/maki/swimming.png +0 -0
- package/public/Assets/Textures/maki/telephone.png +0 -0
- package/public/Assets/Textures/maki/tennis.png +0 -0
- package/public/Assets/Textures/maki/theatre.png +0 -0
- package/public/Assets/Textures/maki/toilets.png +0 -0
- package/public/Assets/Textures/maki/town-hall.png +0 -0
- package/public/Assets/Textures/maki/town.png +0 -0
- package/public/Assets/Textures/maki/triangle-stroked.png +0 -0
- package/public/Assets/Textures/maki/triangle.png +0 -0
- package/public/Assets/Textures/maki/village.png +0 -0
- package/public/Assets/Textures/maki/warehouse.png +0 -0
- package/public/Assets/Textures/maki/waste-basket.png +0 -0
- package/public/Assets/Textures/maki/water.png +0 -0
- package/public/Assets/Textures/maki/wetland.png +0 -0
- package/public/Assets/Textures/maki/zoo.png +0 -0
- package/public/Assets/Textures/moonSmall.jpg +0 -0
- package/public/Assets/Textures/pin.svg +1 -0
- package/public/Assets/Textures/waterNormals.jpg +0 -0
- package/public/Assets/Textures/waterNormalsSmall.jpg +0 -0
- package/public/Assets/approximateTerrainHeights.json +1 -0
- package/public/Cesium.js +16587 -0
- package/public/ThirdParty/Workers/package.json +1 -0
- package/public/ThirdParty/Workers/zip-web-worker.js +1 -0
- package/public/ThirdParty/basis_transcoder.wasm +0 -0
- package/public/ThirdParty/draco_decoder.wasm +0 -0
- package/public/ThirdParty/google-earth-dbroot-parser.js +1 -0
- package/public/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/public/ThirdParty/zip-module.wasm +0 -0
- package/public/Widgets/Animation/Animation.css +127 -0
- package/public/Widgets/Animation/lighter.css +70 -0
- package/public/Widgets/BaseLayerPicker/BaseLayerPicker.css +108 -0
- package/public/Widgets/BaseLayerPicker/lighter.css +22 -0
- package/public/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +102 -0
- package/public/Widgets/CesiumInspector/CesiumInspector.css +113 -0
- package/public/Widgets/CesiumWidget/CesiumWidget.css +119 -0
- package/public/Widgets/CesiumWidget/lighter.css +14 -0
- package/public/Widgets/FullscreenButton/FullscreenButton.css +8 -0
- package/public/Widgets/Geocoder/Geocoder.css +70 -0
- package/public/Widgets/Geocoder/lighter.css +17 -0
- package/public/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +27 -0
- package/public/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
- package/public/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
- package/public/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
- package/public/Widgets/Images/ImageryProviders/azureAerial.png +0 -0
- package/public/Widgets/Images/ImageryProviders/azureRoads.png +0 -0
- package/public/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
- package/public/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
- package/public/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
- package/public/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
- package/public/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
- package/public/Widgets/Images/ImageryProviders/googleContour.png +0 -0
- package/public/Widgets/Images/ImageryProviders/googleRoadmap.png +0 -0
- package/public/Widgets/Images/ImageryProviders/googleSatellite.png +0 -0
- package/public/Widgets/Images/ImageryProviders/googleSatelliteLabels.png +0 -0
- package/public/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
- package/public/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
- package/public/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
- package/public/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
- package/public/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
- package/public/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
- package/public/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
- package/public/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
- package/public/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
- package/public/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
- package/public/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
- package/public/Widgets/Images/NavigationHelp/Mouse.svg +84 -0
- package/public/Widgets/Images/NavigationHelp/MouseLeft.svg +76 -0
- package/public/Widgets/Images/NavigationHelp/MouseMiddle.svg +76 -0
- package/public/Widgets/Images/NavigationHelp/MouseRight.svg +76 -0
- package/public/Widgets/Images/NavigationHelp/Touch.svg +120 -0
- package/public/Widgets/Images/NavigationHelp/TouchDrag.svg +129 -0
- package/public/Widgets/Images/NavigationHelp/TouchRotate.svg +76 -0
- package/public/Widgets/Images/NavigationHelp/TouchTilt.svg +135 -0
- package/public/Widgets/Images/NavigationHelp/TouchZoom.svg +74 -0
- package/public/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
- package/public/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
- package/public/Widgets/Images/TimelineIcons.png +0 -0
- package/public/Widgets/Images/info-loading.gif +0 -0
- package/public/Widgets/InfoBox/InfoBox.css +92 -0
- package/public/Widgets/InfoBox/InfoBoxDescription.css +178 -0
- package/public/Widgets/NavigationHelpButton/NavigationHelpButton.css +93 -0
- package/public/Widgets/NavigationHelpButton/lighter.css +38 -0
- package/public/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +15 -0
- package/public/Widgets/ProjectionPicker/ProjectionPicker.css +38 -0
- package/public/Widgets/SceneModePicker/SceneModePicker.css +56 -0
- package/public/Widgets/SelectionIndicator/SelectionIndicator.css +20 -0
- package/public/Widgets/Timeline/Timeline.css +103 -0
- package/public/Widgets/Timeline/lighter.css +23 -0
- package/public/Widgets/VRButton/VRButton.css +8 -0
- package/public/Widgets/Viewer/Viewer.css +107 -0
- package/public/Widgets/VoxelInspector/VoxelInspector.css +16 -0
- package/public/Widgets/lighter.css +237 -0
- package/public/Widgets/lighterShared.css +46 -0
- package/public/Widgets/shared.css +103 -0
- package/public/Widgets/widgets.css +1342 -0
- package/public/Workers/chunk-3DKU5AMY.js +26 -0
- package/public/Workers/chunk-3MO6V622.js +26 -0
- package/public/Workers/chunk-3ULTL2FZ.js +26 -0
- package/public/Workers/chunk-43YDDN2L.js +26 -0
- package/public/Workers/chunk-453UE67U.js +26 -0
- package/public/Workers/chunk-5JJC62LP.js +26 -0
- package/public/Workers/chunk-65WPDQMK.js +26 -0
- package/public/Workers/chunk-6J7K26F7.js +26 -0
- package/public/Workers/chunk-A3G5ORRJ.js +26 -0
- package/public/Workers/chunk-AIXDAWPZ.js +26 -0
- package/public/Workers/chunk-ANKVUFZB.js +26 -0
- package/public/Workers/chunk-AZ67KQQB.js +26 -0
- package/public/Workers/chunk-C5F5JZAC.js +26 -0
- package/public/Workers/chunk-CK62LO4L.js +26 -0
- package/public/Workers/chunk-DXDIQEOK.js +26 -0
- package/public/Workers/chunk-E7ZPYMUI.js +26 -0
- package/public/Workers/chunk-GDE4VUE6.js +26 -0
- package/public/Workers/chunk-GGYRJCFH.js +29 -0
- package/public/Workers/chunk-HBIOVTO5.js +27 -0
- package/public/Workers/chunk-HJIURIT6.js +26 -0
- package/public/Workers/chunk-IDLM42AV.js +26 -0
- package/public/Workers/chunk-IFBNVX3N.js +26 -0
- package/public/Workers/chunk-IR47TAV5.js +26 -0
- package/public/Workers/chunk-ISGFCDPW.js +26 -0
- package/public/Workers/chunk-JJ24SU25.js +26 -0
- package/public/Workers/chunk-LAGV6F3C.js +29 -0
- package/public/Workers/chunk-LLCMCKFU.js +26 -0
- package/public/Workers/chunk-MSR5BKMH.js +26 -0
- package/public/Workers/chunk-MWVHSLYS.js +26 -0
- package/public/Workers/chunk-MYNU3I3W.js +26 -0
- package/public/Workers/chunk-NSDLDP72.js +26 -0
- package/public/Workers/chunk-NUY3PECV.js +26 -0
- package/public/Workers/chunk-OHMLE6SB.js +26 -0
- package/public/Workers/chunk-OJH7UFER.js +28 -0
- package/public/Workers/chunk-OUZ34R6R.js +26 -0
- package/public/Workers/chunk-OWJWRYGM.js +26 -0
- package/public/Workers/chunk-PAML32O3.js +26 -0
- package/public/Workers/chunk-PNKG35NX.js +26 -0
- package/public/Workers/chunk-Q6F3SO7I.js +26 -0
- package/public/Workers/chunk-QROIA2H7.js +26 -0
- package/public/Workers/chunk-RH6XN2ZV.js +28 -0
- package/public/Workers/chunk-SCMY6ELS.js +26 -0
- package/public/Workers/chunk-SP3AH7D2.js +26 -0
- package/public/Workers/chunk-SRXN2PE4.js +26 -0
- package/public/Workers/chunk-SUBLUDWJ.js +26 -0
- package/public/Workers/chunk-T4S74O3D.js +26 -0
- package/public/Workers/chunk-TITUTZNR.js +63 -0
- package/public/Workers/chunk-UWS7N7FB.js +26 -0
- package/public/Workers/chunk-V5C26K4F.js +26 -0
- package/public/Workers/chunk-VAPRBQYE.js +26 -0
- package/public/Workers/chunk-VBYW5FXW.js +26 -0
- package/public/Workers/chunk-VLPLGYXT.js +26 -0
- package/public/Workers/chunk-W5T7UWKW.js +26 -0
- package/public/Workers/chunk-XLJBHQML.js +26 -0
- package/public/Workers/chunk-XWXQVSYW.js +26 -0
- package/public/Workers/chunk-YSN2K4FT.js +27 -0
- package/public/Workers/chunk-ZTSD53QT.js +26 -0
- package/public/Workers/combineGeometry.js +26 -0
- package/public/Workers/createBoxGeometry.js +26 -0
- package/public/Workers/createBoxOutlineGeometry.js +26 -0
- package/public/Workers/createCircleGeometry.js +26 -0
- package/public/Workers/createCircleOutlineGeometry.js +26 -0
- package/public/Workers/createCoplanarPolygonGeometry.js +26 -0
- package/public/Workers/createCoplanarPolygonOutlineGeometry.js +26 -0
- package/public/Workers/createCorridorGeometry.js +26 -0
- package/public/Workers/createCorridorOutlineGeometry.js +26 -0
- package/public/Workers/createCylinderGeometry.js +26 -0
- package/public/Workers/createCylinderOutlineGeometry.js +26 -0
- package/public/Workers/createEllipseGeometry.js +26 -0
- package/public/Workers/createEllipseOutlineGeometry.js +26 -0
- package/public/Workers/createEllipsoidGeometry.js +26 -0
- package/public/Workers/createEllipsoidOutlineGeometry.js +26 -0
- package/public/Workers/createFrustumGeometry.js +26 -0
- package/public/Workers/createFrustumOutlineGeometry.js +26 -0
- package/public/Workers/createGeometry.js +26 -0
- package/public/Workers/createGroundPolylineGeometry.js +26 -0
- package/public/Workers/createPlaneGeometry.js +26 -0
- package/public/Workers/createPlaneOutlineGeometry.js +26 -0
- package/public/Workers/createPolygonGeometry.js +26 -0
- package/public/Workers/createPolygonOutlineGeometry.js +26 -0
- package/public/Workers/createPolylineGeometry.js +26 -0
- package/public/Workers/createPolylineVolumeGeometry.js +26 -0
- package/public/Workers/createPolylineVolumeOutlineGeometry.js +26 -0
- package/public/Workers/createRectangleGeometry.js +26 -0
- package/public/Workers/createRectangleOutlineGeometry.js +26 -0
- package/public/Workers/createSimplePolylineGeometry.js +26 -0
- package/public/Workers/createSphereGeometry.js +26 -0
- package/public/Workers/createSphereOutlineGeometry.js +26 -0
- package/public/Workers/createTaskProcessorWorker.js +26 -0
- package/public/Workers/createVectorTileClampedPolylines.js +26 -0
- package/public/Workers/createVectorTileGeometries.js +26 -0
- package/public/Workers/createVectorTilePoints.js +26 -0
- package/public/Workers/createVectorTilePolygons.js +26 -0
- package/public/Workers/createVectorTilePolylines.js +26 -0
- package/public/Workers/createVerticesFromCesium3DTilesTerrain.js +26 -0
- package/public/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +26 -0
- package/public/Workers/createVerticesFromHeightmap.js +26 -0
- package/public/Workers/createVerticesFromQuantizedTerrainMesh.js +26 -0
- package/public/Workers/createWallGeometry.js +26 -0
- package/public/Workers/createWallOutlineGeometry.js +26 -0
- package/public/Workers/decodeDraco.js +26 -0
- package/public/Workers/decodeGoogleEarthEnterprisePacket.js +26 -0
- package/public/Workers/decodeI3S.js +26 -0
- package/public/Workers/gaussianSplatSorter.js +26 -0
- package/public/Workers/gaussianSplatTextureGenerator.js +26 -0
- package/public/Workers/incrementallyBuildTerrainPicker.js +26 -0
- package/public/Workers/transcodeKTX2.js +56 -0
- package/public/Workers/transferTypedArrayTest.js +26 -0
- package/public/Workers/upsampleQuantizedTerrainMesh.js +26 -0
- package/public/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -0
- package/public/index.cjs +16587 -0
- package/public/index.js +16587 -0
- package/src/Assets/geojson/BaiYangDian.geojson +699 -0
- package/src/Assets/geojson/HeBei.geojson +97754 -0
- package/src/Assets/geojson//344/270/255/345/233/275_/347/234/201.geojson +1 -0
- package/src/Assets/images/BYD.png +0 -0
- package/src/Assets/images/BYH.png +0 -0
- package/src/Assets/images/CZD.png +0 -0
- package/src/Assets/images/bouys.png +0 -0
- package/src/Assets/images/hebei.ico +0 -0
- package/src/Assets/images/jinzhou.ico +0 -0
- package/src/Assets/images/map_bg.png +0 -0
- package/src/Assets/images/map_bridge.png +0 -0
- package/src/Assets/images/map_radar.png +0 -0
- package/src/Assets/images/map_vhf.png +0 -0
- package/src/Assets/images/shenlan.png +0 -0
- package/src/Assets/images/ship.png +0 -0
- package/src/Assets/images/ship_1.png +0 -0
- package/src/Assets/images/ship_1_e.png +0 -0
- package/src/Assets/images/ship_1_tv.png +0 -0
- package/src/Assets/images/ship_2.png +0 -0
- package/src/Assets/images/ship_2_e.png +0 -0
- package/src/Assets/images/ship_2_tv.png +0 -0
- package/src/Assets/images/ship_3.png +0 -0
- package/src/Assets/images/ship_3_e.png +0 -0
- package/src/Assets/images/ship_3_tv.png +0 -0
- package/src/Assets/images/ship_4.png +0 -0
- package/src/Assets/images/ship_4_e.png +0 -0
- package/src/Assets/images/ship_4_tv.png +0 -0
- package/src/Assets/images/ship_5.png +0 -0
- package/src/Assets/images/ship_5_e.png +0 -0
- package/src/Assets/images/ship_5_tv.png +0 -0
- package/src/Assets/images/snowflake_particle.png +0 -0
- package/src/Assets/models/fengche.gltf +2920 -0
- package/src/Assets/resource.ts +32 -0
- package/src/const/color.ts +10 -0
- package/src/const/config/camera.ts +16 -0
- package/src/const/config/index.ts +2 -0
- package/src/const/config/viewer.ts +42 -0
- package/src/const/index.ts +3 -0
- package/src/const/position.ts +34 -0
- package/src/core/cdk/compass.ts +24 -0
- package/src/core/cdk/index.ts +36 -0
- package/src/core/cdk/lnglat.ts +125 -0
- package/src/core/cdk/orbit.ts +118 -0
- package/src/core/cdk/overlay.ts +90 -0
- package/src/core/cdk/slider.ts +54 -0
- package/src/core/cdk/svg_compass.svg +33 -0
- package/src/core/index.ts +2 -0
- package/src/core/layers/baidu-map-layer.ts +117 -0
- package/src/core/libs/gui.ts +88 -0
- package/src/core/scene/camera.ts +211 -0
- package/src/core/scene/globe.ts +33 -0
- package/src/core/scene/index.ts +5 -0
- package/src/core/scene/layers.ts +240 -0
- package/src/core/scene/primitives.ts +55 -0
- package/src/core/scene/scene.ts +44 -0
- package/src/core/viewer/clock.ts +93 -0
- package/src/core/viewer/data.ts +17 -0
- package/src/core/viewer/element.ts +146 -0
- package/src/core/viewer/entities.ts +74 -0
- package/src/core/viewer/event.ts +155 -0
- package/src/core/viewer/index.ts +7 -0
- package/src/core/viewer/result.ts +7 -0
- package/src/core/viewer/terrain.ts +30 -0
- package/src/core/viewer/viewer.ts +255 -0
- package/src/entities/ellipse.ts +68 -0
- package/src/entities/geojson.ts +19 -0
- package/src/entities/image.ts +28 -0
- package/src/entities/index.ts +42 -0
- package/src/entities/label.ts +37 -0
- package/src/entities/point.ts +48 -0
- package/src/entities/polygon.ts +59 -0
- package/src/entities/polyline.ts +55 -0
- package/src/entities/radar.ts +18 -0
- package/src/entities/rectangle.ts +50 -0
- package/src/entities/trailing.ts +22 -0
- package/src/index.ts +10 -0
- package/src/plugins/bathymetry.ts +107 -0
- package/src/plugins/elevation.ts +146 -0
- package/src/plugins/index.ts +3 -0
- package/src/plugins/post-process-snow.glsl +99 -0
- package/src/plugins/post-process-snow.ts +45 -0
- package/src/plugins/thunder.glsl +159 -0
- package/src/primitives/appearance/demo.ts +27 -0
- package/src/primitives/appearance/index.ts +1 -0
- package/src/primitives/area.ts +40 -0
- package/src/primitives/geometry/geometry.ts +44 -0
- package/src/primitives/image-2d.ts +73 -0
- package/src/primitives/index.ts +9 -0
- package/src/primitives/instance/instance.ts +58 -0
- package/src/primitives/material/image2d.ts +25 -0
- package/src/primitives/material/index.ts +8 -0
- package/src/primitives/material/ship2d.ts +55 -0
- package/src/primitives/particle.ts +47 -0
- package/src/primitives/shaders/EllipsoidSurfaceAppearanceFS.glsl +31 -0
- package/src/primitives/shaders/EllipsoidSurfaceAppearanceVS.glsl +19 -0
- package/src/primitives/shaders/imageFS.glsl +22 -0
- package/src/primitives/shaders/raedme.md +187 -0
- package/src/property/index.ts +1 -0
- package/src/property/material/core.ts +52 -0
- package/src/property/material/index.ts +5 -0
- package/src/property/material/radar.ts +41 -0
- package/src/property/material/road.ts +35 -0
- package/src/property/material/trailing.ts +31 -0
- package/src/property/material/wall.ts +31 -0
- package/src/scene/TJG/area.ts +37 -0
- package/src/scene/TJG/billboard.ts +89 -0
- package/src/scene/TJG/entityies.ts +131 -0
- package/src/scene/TJG/lines.ts +14 -0
- package/src/scene/TJG/maps.ts +16 -0
- package/src/scene/TJG/scene-tjg.ts +212 -0
- package/src/scene/TJG/ships.ts +32 -0
- package/src/scene/TJG/tileset.ts +144 -0
- package/src/scene/TJG/tjg.d.ts +14 -0
- package/src/scene/cdk/fog.ts +47 -0
- package/src/scene/cdk/index.ts +4 -0
- package/src/scene/cdk/measure.ts +108 -0
- package/src/scene/cdk/plot.ts +182 -0
- package/src/scene/cdk/source.ts +33 -0
- package/src/shaders/3d-tileset.ts +41 -0
- package/src/shaders/index.ts +1 -0
- package/src/shaders/material-property/a-readme.md +2 -0
- package/src/shaders/material-property/radarFS.glsl +25 -0
- package/src/shaders/material-property/roadFS.glsl +14 -0
- package/src/shaders/material-property/trailingFS.glsl +18 -0
- package/src/shaders/material-property/wallFS.glsl +31 -0
- package/src/shaders/raedme.md +187 -0
- package/src/shaders/ship/ShipVS.glsl +19 -0
- package/src/sl-utils-cesium.ts +1 -0
- package/src/types/cdk.d.ts +20 -0
- package/src/types/core.d.ts +6 -0
- package/src/types/entity.d.ts +628 -0
- package/src/types/event.d.ts +32 -0
- package/src/types/extend.Cesium.d.ts +28 -0
- package/src/types/geometry.d.ts +55 -0
- package/src/types/plugins.d.ts +34 -0
- package/src/types/primitive.d.ts +69 -0
- package/src/types/scene.d.ts +25 -0
- package/src/types/viewer.d.ts +114 -0
- package/src/utils/cesium.ts +189 -0
- package/src/utils/common.ts +87 -0
- package/src/utils/index.ts +5 -0
- package/src/utils/map.ts +112 -0
- package/src/utils/types.ts +44 -0
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +34 -0
- package/types/billboard.d.ts +8 -0
- package/types/entities.d.ts +224 -0
- package/types/property.d.ts +12 -0
- package/types/resource.d.ts +26 -0
- package/types/sl-utils-cesium.d.ts +17 -0
- package/vite.config.ts +43 -0
- package/webpack.config.js +29 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.139.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
|
+
|
|
26
|
+
import{a as R}from"./chunk-CK62LO4L.js";import{a as ct}from"./chunk-MWVHSLYS.js";import{a as Z,b as H}from"./chunk-NSDLDP72.js";import{a as V}from"./chunk-OHMLE6SB.js";import{a as U}from"./chunk-IFBNVX3N.js";import{b as ot}from"./chunk-PNKG35NX.js";import{a as it}from"./chunk-453UE67U.js";import{a as nt}from"./chunk-Q6F3SO7I.js";import{a as et}from"./chunk-DXDIQEOK.js";import{b as J,c as X,d as z}from"./chunk-XLJBHQML.js";import{h as K}from"./chunk-TITUTZNR.js";import{a as k}from"./chunk-PAML32O3.js";import{a as q,b as M,c as tt}from"./chunk-3MO6V622.js";import{a as w,b as F}from"./chunk-OJH7UFER.js";import{a as I}from"./chunk-6J7K26F7.js";import{e as x}from"./chunk-VAPRBQYE.js";function ft(n,i){this.positions=x(n)?n:[],this.holes=x(i)?i:[]}var st=ft;function S(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(S.prototype,{length:{get:function(){return this._length}}});S.prototype.enqueue=function(n){this._array.push(n),this._length++};S.prototype.dequeue=function(){if(this._length===0)return;let n=this._array,i=this._offset,u=n[i];return n[i]=void 0,i++,i>10&&i*2>n.length&&(this._array=n.slice(i),i=0),this._offset=i,this._length--,u};S.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};S.prototype.contains=function(n){return this._array.indexOf(n)!==-1};S.prototype.clear=function(){this._array.length=this._offset=this._length=0};S.prototype.sort=function(n){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(n)};var $=S;var b={};b.computeHierarchyPackedLength=function(n,i){let u=0,s=[n];for(;s.length>0;){let c=s.pop();if(!x(c))continue;u+=2;let a=c.positions,t=c.holes;if(x(a)&&a.length>0&&(u+=a.length*i.packedLength),x(t)){let o=t.length;for(let e=0;e<o;++e)s.push(t[e])}}return u};b.packPolygonHierarchy=function(n,i,u,s){let c=[n];for(;c.length>0;){let a=c.pop();if(!x(a))continue;let t=a.positions,o=a.holes;if(i[u++]=x(t)?t.length:0,i[u++]=x(o)?o.length:0,x(t)){let e=t.length;for(let r=0;r<e;++r,u+=s.packedLength)s.pack(t[r],i,u)}if(x(o)){let e=o.length;for(let r=0;r<e;++r)c.push(o[r])}}return u};b.unpackPolygonHierarchy=function(n,i,u){let s=n[i++],c=n[i++],a=new Array(s),t=c>0?new Array(c):void 0;for(let o=0;o<s;++o,i+=u.packedLength)a[o]=u.unpack(n,i);for(let o=0;o<c;++o)t[o]=b.unpackPolygonHierarchy(n,i,u),i=t[o].startingIndex,delete t[o].startingIndex;return{positions:a,holes:t,startingIndex:i}};var O=new M;function at(n,i,u,s){return M.subtract(i,n,O),M.multiplyByScalar(O,u/s,O),M.add(n,O,O),[O.x,O.y]}var G=new w;function gt(n,i,u,s){return w.subtract(i,n,G),w.multiplyByScalar(G,u/s,G),w.add(n,G,G),[G.x,G.y,G.z]}b.subdivideLineCount=function(n,i,u){let c=w.distance(n,i)/u,a=Math.max(0,Math.ceil(I.log2(c)));return Math.pow(2,a)};var j=new q,Q=new q,dt=new q,pt=new w,Y=new U;b.subdivideRhumbLineCount=function(n,i,u,s){let c=n.cartesianToCartographic(i,j),a=n.cartesianToCartographic(u,Q),o=new U(c,a,n).surfaceDistance/s,e=Math.max(0,Math.ceil(I.log2(o)));return Math.pow(2,e)};b.subdivideTexcoordLine=function(n,i,u,s,c,a){let t=b.subdivideLineCount(u,s,c),o=M.distance(n,i),e=o/t,r=a;r.length=t*2;let l=0;for(let h=0;h<t;h++){let f=at(n,i,h*e,o);r[l++]=f[0],r[l++]=f[1]}return r};b.subdivideLine=function(n,i,u,s){let c=b.subdivideLineCount(n,i,u),a=w.distance(n,i),t=a/c;x(s)||(s=[]);let o=s;o.length=c*3;let e=0;for(let r=0;r<c;r++){let l=gt(n,i,r*t,a);o[e++]=l[0],o[e++]=l[1],o[e++]=l[2]}return o};b.subdivideTexcoordRhumbLine=function(n,i,u,s,c,a,t){let o=u.cartesianToCartographic(s,j),e=u.cartesianToCartographic(c,Q);Y.setEndPoints(o,e);let r=Y.surfaceDistance/a,l=Math.max(0,Math.ceil(I.log2(r))),h=Math.pow(2,l),f=M.distance(n,i),d=f/h,m=t;m.length=h*2;let p=0;for(let g=0;g<h;g++){let y=at(n,i,g*d,f);m[p++]=y[0],m[p++]=y[1]}return m};b.subdivideRhumbLine=function(n,i,u,s,c){let a=n.cartesianToCartographic(i,j),t=n.cartesianToCartographic(u,Q),o=new U(a,t,n);if(x(c)||(c=[]),o.surfaceDistance<=s)return c.length=3,c[0]=i.x,c[1]=i.y,c[2]=i.z,c;let e=o.surfaceDistance/s,r=Math.max(0,Math.ceil(I.log2(e))),l=Math.pow(2,r),h=o.surfaceDistance/l,f=c;f.length=l*3;let d=0;for(let m=0;m<l;m++){let p=o.interpolateUsingSurfaceDistance(m*h,dt),g=n.cartographicToCartesian(p,pt);f[d++]=g.x,f[d++]=g.y,f[d++]=g.z}return f};var mt=new w,yt=new w,xt=new w,wt=new w;b.scaleToGeodeticHeightExtruded=function(n,i,u,s,c){s=s??tt.default;let a=mt,t=yt,o=xt,e=wt;if(x(n)&&x(n.attributes)&&x(n.attributes.position)){let r=n.attributes.position.values,l=r.length/2;for(let h=0;h<l;h+=3)w.fromArray(r,h,o),s.geodeticSurfaceNormal(o,a),e=s.scaleToGeodeticSurface(o,e),t=w.multiplyByScalar(a,u,t),t=w.add(e,t,t),r[h+l]=t.x,r[h+1+l]=t.y,r[h+2+l]=t.z,c&&(e=w.clone(o,e)),t=w.multiplyByScalar(a,i,t),t=w.add(e,t,t),r[h]=t.x,r[h+1]=t.y,r[h+2]=t.z}return n};b.polygonOutlinesFromHierarchy=function(n,i,u){let s=[],c=new $;c.enqueue(n);let a,t,o;for(;c.length!==0;){let e=c.dequeue(),r=e.positions;if(i)for(o=r.length,a=0;a<o;a++)u.scaleToGeodeticSurface(r[a],r[a]);if(r=V(r,w.equalsEpsilon,!0),r.length<3)continue;let l=e.holes?e.holes.length:0;for(a=0;a<l;a++){let h=e.holes[a],f=h.positions;if(i)for(o=f.length,t=0;t<o;++t)u.scaleToGeodeticSurface(f[t],f[t]);if(f=V(f,w.equalsEpsilon,!0),f.length<3)continue;s.push(f);let d=0;for(x(h.holes)&&(d=h.holes.length),t=0;t<d;t++)c.enqueue(h.holes[t])}s.push(r)}return s};var bt=new q;function Lt(n,i,u){let s=u.cartesianToCartographic(n,j),c=u.cartesianToCartographic(i,Q);if(Math.sign(s.latitude)===Math.sign(c.latitude))return;Y.setEndPoints(s,c);let a=Y.findIntersectionWithLatitude(0,bt);if(!x(a))return;let t=Math.min(s.longitude,c.longitude),o=Math.max(s.longitude,c.longitude);if(Math.abs(o-t)>I.PI){let e=t;t=o,o=e}if(!(a.longitude<t||a.longitude>o))return u.cartographicToCartesian(a)}function Tt(n,i,u,s){if(s===R.RHUMB)return Lt(n,i,u);let c=ot.lineSegmentPlane(n,i,it.ORIGIN_XY_PLANE);if(x(c))return u.scaleToGeodeticSurface(c,c)}var Et=new q;function vt(n,i,u){let s=[],c,a,t,o,e,r=0;for(;r<n.length;){c=n[r],a=n[(r+1)%n.length],t=I.sign(c.z),o=I.sign(a.z);let l=h=>i.cartesianToCartographic(h,Et).longitude;if(t===0)s.push({position:r,type:t,visited:!1,next:o,theta:l(c)});else if(o!==0){if(e=Tt(c,a,i,u),++r,!x(e))continue;n.splice(r,0,e),s.push({position:r,type:t,visited:!1,next:o,theta:l(e)})}++r}return s}function ht(n,i,u,s,c,a,t){let o=[],e=a,r=h=>f=>f.position===h,l=[];do{let h=u[e];o.push(h);let f=s.findIndex(r(e)),d=s[f];if(!x(d)){++e;continue}let{visited:m,type:p,next:g}=d;if(d.visited=!0,p===0){if(g===0){let C=s[f-(t?1:-1)];if(C?.position===e+1)C.visited=!0;else{++e;continue}}if(!m&&t&&g>0||a===e&&!t&&g<0){++e;continue}}if(!(t?p>=0:p<=0)){++e;continue}m||l.push(e);let L=f+(t?1:-1),_=s[L];if(!x(_)){++e;continue}e=_.position}while(e<u.length&&e>=0&&e!==a&&o.length<u.length);n.splice(i,c,o);for(let h of l)i=ht(n,++i,u,s,0,h,!t);return i}b.splitPolygonsOnEquator=function(n,i,u,s){x(s)||(s=[]),s.splice(0,0,...n),s.length=n.length;let c=0;for(;c<s.length;){let a=s[c],t=a.slice();if(a.length<3){s[c]=t,++c;continue}let o=vt(t,i,u);if(t.length===a.length||o.length<=1){s[c]=t,++c;continue}o.sort((r,l)=>r.theta-l.theta);let e=t[0].z>=0;c=ht(s,c,t,o,1,0,e)}return s};b.polygonsFromHierarchy=function(n,i,u,s,c,a){let t=[],o=[],e=new $;e.enqueue(n);let r=x(a);for(;e.length!==0;){let l=e.dequeue(),h=l.positions,f=l.holes,d,m;if(s)for(m=h.length,d=0;d<m;d++)c.scaleToGeodeticSurface(h[d],h[d]);if(i||(h=V(h,w.equalsEpsilon,!0)),h.length<3)continue;let p=u(h);if(!x(p))continue;let g=[],y=H.computeWindingOrder2D(p);if(y===Z.CLOCKWISE&&(p.reverse(),h=h.slice().reverse()),r){r=!1;let P=[h];if(P=a(P,P),P.length>1){for(let v of P)e.enqueue(new st(v,f));continue}}let L=h.slice(),_=x(f)?f.length:0,C=[],T;for(d=0;d<_;d++){let P=f[d],v=P.positions;if(s)for(m=v.length,T=0;T<m;++T)c.scaleToGeodeticSurface(v[T],v[T]);if(i||(v=V(v,w.equalsEpsilon,!0)),v.length<3)continue;let E=u(v);if(!x(E))continue;y=H.computeWindingOrder2D(E),y===Z.CLOCKWISE&&(E.reverse(),v=v.slice().reverse()),C.push(v),g.push(L.length),L=L.concat(v),p=p.concat(E);let D=0;for(x(P.holes)&&(D=P.holes.length),T=0;T<D;T++)e.enqueue(P.holes[T])}t.push({outerRing:h,holes:C}),o.push({positions:L,positions2D:p,holes:g})}return{hierarchy:t,polygons:o}};var Ct=new M,Pt=new w,Dt=new K,It=new F;b.computeBoundingRectangle=function(n,i,u,s,c){let a=K.fromAxisAngle(n,s,Dt),t=F.fromQuaternion(a,It),o=Number.POSITIVE_INFINITY,e=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,h=u.length;for(let f=0;f<h;++f){let d=w.clone(u[f],Pt);F.multiplyByVector(t,d,d);let m=i(d,Ct);x(m)&&(o=Math.min(o,m.x),e=Math.max(e,m.x),r=Math.min(r,m.y),l=Math.max(l,m.y))}return c.x=o,c.y=r,c.width=e-o,c.height=l-r,c};b.createGeometryFromPositions=function(n,i,u,s,c,a,t){let o=H.triangulate(i.positions2D,i.holes);o.length<3&&(o=[0,1,2]);let e=i.positions,r=x(u),l=r?u.positions:void 0;if(c){let h=e.length,f=new Array(h*3),d=0;for(let g=0;g<h;g++){let y=e[g];f[d++]=y.x,f[d++]=y.y,f[d++]=y.z}let m={attributes:{position:new z({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:f})},indices:o,primitiveType:J.TRIANGLES};r&&(m.attributes.st=new z({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:M.packArray(l)}));let p=new X(m);return a.normal?ct.computeNormal(p):p}if(t===R.GEODESIC)return H.computeSubdivision(n,e,o,l,s);if(t===R.RHUMB)return H.computeRhumbLineSubdivision(n,e,o,l,s)};var rt=[],ut=[],_t=new w,At=new w;b.computeWallGeometry=function(n,i,u,s,c,a){let t,o,e,r,l,h,f,d,m,p=n.length,g=0,y=0,L=x(i),_=L?i.positions:void 0;if(c)for(o=p*3*2,t=new Array(o*2),L&&(m=p*2*2,d=new Array(m*2)),e=0;e<p;e++)r=n[e],l=n[(e+1)%p],t[g]=t[g+o]=r.x,++g,t[g]=t[g+o]=r.y,++g,t[g]=t[g+o]=r.z,++g,t[g]=t[g+o]=l.x,++g,t[g]=t[g+o]=l.y,++g,t[g]=t[g+o]=l.z,++g,L&&(h=_[e],f=_[(e+1)%p],d[y]=d[y+m]=h.x,++y,d[y]=d[y+m]=h.y,++y,d[y]=d[y+m]=f.x,++y,d[y]=d[y+m]=f.y,++y);else{let E=I.chordLength(s,u.maximumRadius),D=0;if(a===R.GEODESIC)for(e=0;e<p;e++)D+=b.subdivideLineCount(n[e],n[(e+1)%p],E);else if(a===R.RHUMB)for(e=0;e<p;e++)D+=b.subdivideRhumbLineCount(u,n[e],n[(e+1)%p],E);for(o=(D+p)*3,t=new Array(o*2),L&&(m=(D+p)*2,d=new Array(m*2)),e=0;e<p;e++){r=n[e],l=n[(e+1)%p];let A,N;L&&(h=_[e],f=_[(e+1)%p]),a===R.GEODESIC?(A=b.subdivideLine(r,l,E,ut),L&&(N=b.subdivideTexcoordLine(h,f,r,l,E,rt))):a===R.RHUMB&&(A=b.subdivideRhumbLine(u,r,l,E,ut),L&&(N=b.subdivideTexcoordRhumbLine(h,f,u,r,l,E,rt)));let lt=A.length;for(let B=0;B<lt;++B,++g)t[g]=A[B],t[g+o]=A[B];if(t[g]=l.x,t[g+o]=l.x,++g,t[g]=l.y,t[g+o]=l.y,++g,t[g]=l.z,t[g+o]=l.z,++g,L){let B=N.length;for(let W=0;W<B;++W,++y)d[y]=N[W],d[y+m]=N[W];d[y]=f.x,d[y+m]=f.x,++y,d[y]=f.y,d[y+m]=f.y,++y}}}p=t.length;let C=nt.createTypedArray(p/3,p-n.length*6),T=0;for(p/=6,e=0;e<p;e++){let E=e,D=E+1,A=E+p,N=A+1;r=w.fromArray(t,E*3,_t),l=w.fromArray(t,D*3,At),!w.equalsEpsilon(r,l,I.EPSILON10,I.EPSILON10)&&(C[T++]=E,C[T++]=A,C[T++]=D,C[T++]=D,C[T++]=A,C[T++]=N)}let P={attributes:new et({position:new z({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:t})}),indices:C,primitiveType:J.TRIANGLES};return L&&(P.attributes.st=new z({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:d})),new X(P)};var ie=b;export{ie as a};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.139.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
|
+
|
|
26
|
+
var e={NONE:0,TOP:1,ALL:2},t=Object.freeze(e);export{t as a};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.139.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
|
+
|
|
26
|
+
import{a as z1}from"./chunk-HBIOVTO5.js";import{a as L,b as u,c as j1}from"./chunk-OJH7UFER.js";import{a as F}from"./chunk-6J7K26F7.js";import{a as g,b as p}from"./chunk-YSN2K4FT.js";import{e as U}from"./chunk-VAPRBQYE.js";var P=class c{constructor(n,o,y,O){this.x=n??0,this.y=o??0,this.z=y??0,this.w=O??0}static fromElements(n,o,y,O,f){return U(f)?(f.x=n,f.y=o,f.z=y,f.w=O,f):new c(n,o,y,O)}static fromColor(n,o){return p.typeOf.object("color",n),U(o)?(o.x=n.red,o.y=n.green,o.z=n.blue,o.w=n.alpha,o):new c(n.red,n.green,n.blue,n.alpha)}static clone(n,o){if(U(n))return U(o)?(o.x=n.x,o.y=n.y,o.z=n.z,o.w=n.w,o):new c(n.x,n.y,n.z,n.w)}static pack(n,o,y){return p.typeOf.object("value",n),p.defined("array",o),y=y??0,o[y++]=n.x,o[y++]=n.y,o[y++]=n.z,o[y]=n.w,o}static unpack(n,o,y){return p.defined("array",n),o=o??0,U(y)||(y=new c),y.x=n[o++],y.y=n[o++],y.z=n[o++],y.w=n[o],y}static packArray(n,o){p.defined("array",n);let y=n.length,O=y*4;if(!U(o))o=new Array(O);else{if(!Array.isArray(o)&&o.length!==O)throw new g("If result is a typed array, it must have exactly array.length * 4 elements");o.length!==O&&(o.length=O)}for(let f=0;f<y;++f)c.pack(n[f],o,f*4);return o}static unpackArray(n,o){if(p.defined("array",n),p.typeOf.number.greaterThanOrEquals("array.length",n.length,4),n.length%4!==0)throw new g("array length must be a multiple of 4.");let y=n.length;U(o)?o.length=y/4:o=new Array(y/4);for(let O=0;O<y;O+=4){let f=O/4;o[f]=c.unpack(n,O,o[f])}return o}static maximumComponent(n){return p.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z,n.w)}static minimumComponent(n){return p.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z,n.w)}static minimumByComponent(n,o,y){return p.typeOf.object("first",n),p.typeOf.object("second",o),p.typeOf.object("result",y),y.x=Math.min(n.x,o.x),y.y=Math.min(n.y,o.y),y.z=Math.min(n.z,o.z),y.w=Math.min(n.w,o.w),y}static maximumByComponent(n,o,y){return p.typeOf.object("first",n),p.typeOf.object("second",o),p.typeOf.object("result",y),y.x=Math.max(n.x,o.x),y.y=Math.max(n.y,o.y),y.z=Math.max(n.z,o.z),y.w=Math.max(n.w,o.w),y}static clamp(n,o,y,O){p.typeOf.object("value",n),p.typeOf.object("min",o),p.typeOf.object("max",y),p.typeOf.object("result",O);let f=F.clamp(n.x,o.x,y.x),w=F.clamp(n.y,o.y,y.y),j=F.clamp(n.z,o.z,y.z),z=F.clamp(n.w,o.w,y.w);return O.x=f,O.y=w,O.z=j,O.w=z,O}static magnitudeSquared(n){return p.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z+n.w*n.w}static magnitude(n){return Math.sqrt(c.magnitudeSquared(n))}static distance(n,o){return p.typeOf.object("left",n),p.typeOf.object("right",o),c.subtract(n,o,l),c.magnitude(l)}static distanceSquared(n,o){return p.typeOf.object("left",n),p.typeOf.object("right",o),c.subtract(n,o,l),c.magnitudeSquared(l)}static normalize(n,o){p.typeOf.object("cartesian",n),p.typeOf.object("result",o);let y=c.magnitude(n);if(o.x=n.x/y,o.y=n.y/y,o.z=n.z/y,o.w=n.w/y,isNaN(o.x)||isNaN(o.y)||isNaN(o.z)||isNaN(o.w))throw new g("normalized result is not a number");return o}static dot(n,o){return p.typeOf.object("left",n),p.typeOf.object("right",o),n.x*o.x+n.y*o.y+n.z*o.z+n.w*o.w}static multiplyComponents(n,o,y){return p.typeOf.object("left",n),p.typeOf.object("right",o),p.typeOf.object("result",y),y.x=n.x*o.x,y.y=n.y*o.y,y.z=n.z*o.z,y.w=n.w*o.w,y}static divideComponents(n,o,y){return p.typeOf.object("left",n),p.typeOf.object("right",o),p.typeOf.object("result",y),y.x=n.x/o.x,y.y=n.y/o.y,y.z=n.z/o.z,y.w=n.w/o.w,y}static add(n,o,y){return p.typeOf.object("left",n),p.typeOf.object("right",o),p.typeOf.object("result",y),y.x=n.x+o.x,y.y=n.y+o.y,y.z=n.z+o.z,y.w=n.w+o.w,y}static subtract(n,o,y){return p.typeOf.object("left",n),p.typeOf.object("right",o),p.typeOf.object("result",y),y.x=n.x-o.x,y.y=n.y-o.y,y.z=n.z-o.z,y.w=n.w-o.w,y}static multiplyByScalar(n,o,y){return p.typeOf.object("cartesian",n),p.typeOf.number("scalar",o),p.typeOf.object("result",y),y.x=n.x*o,y.y=n.y*o,y.z=n.z*o,y.w=n.w*o,y}static divideByScalar(n,o,y){return p.typeOf.object("cartesian",n),p.typeOf.number("scalar",o),p.typeOf.object("result",y),y.x=n.x/o,y.y=n.y/o,y.z=n.z/o,y.w=n.w/o,y}static negate(n,o){return p.typeOf.object("cartesian",n),p.typeOf.object("result",o),o.x=-n.x,o.y=-n.y,o.z=-n.z,o.w=-n.w,o}static abs(n,o){return p.typeOf.object("cartesian",n),p.typeOf.object("result",o),o.x=Math.abs(n.x),o.y=Math.abs(n.y),o.z=Math.abs(n.z),o.w=Math.abs(n.w),o}static lerp(n,o,y,O){return p.typeOf.object("start",n),p.typeOf.object("end",o),p.typeOf.number("t",y),p.typeOf.object("result",O),c.multiplyByScalar(o,y,h1),O=c.multiplyByScalar(n,1-y,O),c.add(h1,O,O)}static mostOrthogonalAxis(n,o){p.typeOf.object("cartesian",n),p.typeOf.object("result",o);let y=c.normalize(n,E1);return c.abs(y,y),y.x<=y.y?y.x<=y.z?y.x<=y.w?o=c.clone(c.UNIT_X,o):o=c.clone(c.UNIT_W,o):y.z<=y.w?o=c.clone(c.UNIT_Z,o):o=c.clone(c.UNIT_W,o):y.y<=y.z?y.y<=y.w?o=c.clone(c.UNIT_Y,o):o=c.clone(c.UNIT_W,o):y.z<=y.w?o=c.clone(c.UNIT_Z,o):o=c.clone(c.UNIT_W,o),o}static equals(n,o){return n===o||U(n)&&U(o)&&n.x===o.x&&n.y===o.y&&n.z===o.z&&n.w===o.w}static equalsArray(n,o,y){return n.x===o[y]&&n.y===o[y+1]&&n.z===o[y+2]&&n.w===o[y+3]}static equalsEpsilon(n,o,y,O){return n===o||U(n)&&U(o)&&F.equalsEpsilon(n.x,o.x,y,O)&&F.equalsEpsilon(n.y,o.y,y,O)&&F.equalsEpsilon(n.z,o.z,y,O)&&F.equalsEpsilon(n.w,o.w,y,O)}clone(n){return c.clone(this,n)}equals(n){return c.equals(this,n)}equalsEpsilon(n,o,y){return c.equalsEpsilon(this,n,o,y)}toString(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`}static packFloat(n,o){return p.typeOf.number("value",n),U(o)||(o=new c),b1[0]=n,R1?(o.x=D[0],o.y=D[1],o.z=D[2],o.w=D[3]):(o.x=D[3],o.y=D[2],o.z=D[1],o.w=D[0]),o}static unpackFloat(n){return p.typeOf.object("packedFloat",n),R1?(D[0]=n.x,D[1]=n.y,D[2]=n.z,D[3]=n.w):(D[0]=n.w,D[1]=n.z,D[2]=n.y,D[3]=n.x),b1[0]}};P.packedLength=4;P.fromArray=P.unpack;var l=new P,h1=new P,E1=new P;P.ZERO=Object.freeze(new P(0,0,0,0));P.ONE=Object.freeze(new P(1,1,1,1));P.UNIT_X=Object.freeze(new P(1,0,0,0));P.UNIT_Y=Object.freeze(new P(0,1,0,0));P.UNIT_Z=Object.freeze(new P(0,0,1,0));P.UNIT_W=Object.freeze(new P(0,0,0,1));var b1=new Float32Array(1),D=new Uint8Array(b1.buffer),U1=new Uint32Array([287454020]),S1=new Uint8Array(U1.buffer),R1=S1[0]===68,r=P;function b(c,n,o,y,O,f,w,j,z,h,R,M,T,C,q,N){this[0]=c??0,this[1]=O??0,this[2]=z??0,this[3]=T??0,this[4]=n??0,this[5]=f??0,this[6]=h??0,this[7]=C??0,this[8]=o??0,this[9]=w??0,this[10]=R??0,this[11]=q??0,this[12]=y??0,this[13]=j??0,this[14]=M??0,this[15]=N??0}b.packedLength=16;b.pack=function(c,n,o){return p.typeOf.object("value",c),p.defined("array",n),o=o??0,n[o++]=c[0],n[o++]=c[1],n[o++]=c[2],n[o++]=c[3],n[o++]=c[4],n[o++]=c[5],n[o++]=c[6],n[o++]=c[7],n[o++]=c[8],n[o++]=c[9],n[o++]=c[10],n[o++]=c[11],n[o++]=c[12],n[o++]=c[13],n[o++]=c[14],n[o]=c[15],n};b.unpack=function(c,n,o){return p.defined("array",c),n=n??0,U(o)||(o=new b),o[0]=c[n++],o[1]=c[n++],o[2]=c[n++],o[3]=c[n++],o[4]=c[n++],o[5]=c[n++],o[6]=c[n++],o[7]=c[n++],o[8]=c[n++],o[9]=c[n++],o[10]=c[n++],o[11]=c[n++],o[12]=c[n++],o[13]=c[n++],o[14]=c[n++],o[15]=c[n],o};b.packArray=function(c,n){p.defined("array",c);let o=c.length,y=o*16;if(!U(n))n=new Array(y);else{if(!Array.isArray(n)&&n.length!==y)throw new g("If result is a typed array, it must have exactly array.length * 16 elements");n.length!==y&&(n.length=y)}for(let O=0;O<o;++O)b.pack(c[O],n,O*16);return n};b.unpackArray=function(c,n){if(p.defined("array",c),p.typeOf.number.greaterThanOrEquals("array.length",c.length,16),c.length%16!==0)throw new g("array length must be a multiple of 16.");let o=c.length;U(n)?n.length=o/16:n=new Array(o/16);for(let y=0;y<o;y+=16){let O=y/16;n[O]=b.unpack(c,y,n[O])}return n};b.clone=function(c,n){if(U(c))return U(n)?(n[0]=c[0],n[1]=c[1],n[2]=c[2],n[3]=c[3],n[4]=c[4],n[5]=c[5],n[6]=c[6],n[7]=c[7],n[8]=c[8],n[9]=c[9],n[10]=c[10],n[11]=c[11],n[12]=c[12],n[13]=c[13],n[14]=c[14],n[15]=c[15],n):new b(c[0],c[4],c[8],c[12],c[1],c[5],c[9],c[13],c[2],c[6],c[10],c[14],c[3],c[7],c[11],c[15])};b.fromArray=b.unpack;b.fromColumnMajorArray=function(c,n){return p.defined("values",c),b.clone(c,n)};b.fromRowMajorArray=function(c,n){return p.defined("values",c),U(n)?(n[0]=c[0],n[1]=c[4],n[2]=c[8],n[3]=c[12],n[4]=c[1],n[5]=c[5],n[6]=c[9],n[7]=c[13],n[8]=c[2],n[9]=c[6],n[10]=c[10],n[11]=c[14],n[12]=c[3],n[13]=c[7],n[14]=c[11],n[15]=c[15],n):new b(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15])};b.fromRotationTranslation=function(c,n,o){return p.typeOf.object("rotation",c),n=n??L.ZERO,U(o)?(o[0]=c[0],o[1]=c[1],o[2]=c[2],o[3]=0,o[4]=c[3],o[5]=c[4],o[6]=c[5],o[7]=0,o[8]=c[6],o[9]=c[7],o[10]=c[8],o[11]=0,o[12]=n.x,o[13]=n.y,o[14]=n.z,o[15]=1,o):new b(c[0],c[3],c[6],n.x,c[1],c[4],c[7],n.y,c[2],c[5],c[8],n.z,0,0,0,1)};b.fromTranslationQuaternionRotationScale=function(c,n,o,y){p.typeOf.object("translation",c),p.typeOf.object("rotation",n),p.typeOf.object("scale",o),U(y)||(y=new b);let O=o.x,f=o.y,w=o.z,j=n.x*n.x,z=n.x*n.y,h=n.x*n.z,R=n.x*n.w,M=n.y*n.y,T=n.y*n.z,C=n.y*n.w,q=n.z*n.z,N=n.z*n.w,E=n.w*n.w,S=j-M-q+E,d=2*(z-N),A=2*(h+C),W=2*(z+N),$=-j+M-q+E,Z=2*(T-R),B=2*(h-C),Y=2*(T+R),k=-j-M+q+E;return y[0]=S*O,y[1]=W*O,y[2]=B*O,y[3]=0,y[4]=d*f,y[5]=$*f,y[6]=Y*f,y[7]=0,y[8]=A*w,y[9]=Z*w,y[10]=k*w,y[11]=0,y[12]=c.x,y[13]=c.y,y[14]=c.z,y[15]=1,y};b.fromTranslationRotationScale=function(c,n){return p.typeOf.object("translationRotationScale",c),b.fromTranslationQuaternionRotationScale(c.translation,c.rotation,c.scale,n)};b.fromTranslation=function(c,n){return p.typeOf.object("translation",c),b.fromRotationTranslation(u.IDENTITY,c,n)};b.fromScale=function(c,n){return p.typeOf.object("scale",c),U(n)?(n[0]=c.x,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=c.y,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=c.z,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new b(c.x,0,0,0,0,c.y,0,0,0,0,c.z,0,0,0,0,1)};b.fromUniformScale=function(c,n){return p.typeOf.number("scale",c),U(n)?(n[0]=c,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=c,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=c,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new b(c,0,0,0,0,c,0,0,0,0,c,0,0,0,0,1)};b.fromRotation=function(c,n){return p.typeOf.object("rotation",c),U(n)||(n=new b),n[0]=c[0],n[1]=c[1],n[2]=c[2],n[3]=0,n[4]=c[3],n[5]=c[4],n[6]=c[5],n[7]=0,n[8]=c[6],n[9]=c[7],n[10]=c[8],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n};var m=new L,e=new L,a=new L;b.fromCamera=function(c,n){p.typeOf.object("camera",c);let o=c.position,y=c.direction,O=c.up;p.typeOf.object("camera.position",o),p.typeOf.object("camera.direction",y),p.typeOf.object("camera.up",O),L.normalize(y,m),L.normalize(L.cross(m,O,e),e),L.normalize(L.cross(e,m,a),a);let f=e.x,w=e.y,j=e.z,z=m.x,h=m.y,R=m.z,M=a.x,T=a.y,C=a.z,q=o.x,N=o.y,E=o.z,S=f*-q+w*-N+j*-E,d=M*-q+T*-N+C*-E,A=z*q+h*N+R*E;return U(n)?(n[0]=f,n[1]=M,n[2]=-z,n[3]=0,n[4]=w,n[5]=T,n[6]=-h,n[7]=0,n[8]=j,n[9]=C,n[10]=-R,n[11]=0,n[12]=S,n[13]=d,n[14]=A,n[15]=1,n):new b(f,w,j,S,M,T,C,d,-z,-h,-R,A,0,0,0,1)};b.computePerspectiveFieldOfView=function(c,n,o,y,O){p.typeOf.number.greaterThan("fovY",c,0),p.typeOf.number.lessThan("fovY",c,Math.PI),p.typeOf.number.greaterThan("near",o,0),p.typeOf.number.greaterThan("far",y,0),p.typeOf.object("result",O);let w=1/Math.tan(c*.5),j=w/n,z=(y+o)/(o-y),h=2*y*o/(o-y);return O[0]=j,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=w,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[10]=z,O[11]=-1,O[12]=0,O[13]=0,O[14]=h,O[15]=0,O};b.computeOrthographicOffCenter=function(c,n,o,y,O,f,w){p.typeOf.number("left",c),p.typeOf.number("right",n),p.typeOf.number("bottom",o),p.typeOf.number("top",y),p.typeOf.number("near",O),p.typeOf.number("far",f),p.typeOf.object("result",w);let j=1/(n-c),z=1/(y-o),h=1/(f-O),R=-(n+c)*j,M=-(y+o)*z,T=-(f+O)*h;return j*=2,z*=2,h*=-2,w[0]=j,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=z,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=h,w[11]=0,w[12]=R,w[13]=M,w[14]=T,w[15]=1,w};b.computePerspectiveOffCenter=function(c,n,o,y,O,f,w){p.typeOf.number("left",c),p.typeOf.number("right",n),p.typeOf.number("bottom",o),p.typeOf.number("top",y),p.typeOf.number("near",O),p.typeOf.number("far",f),p.typeOf.object("result",w);let j=2*O/(n-c),z=2*O/(y-o),h=(n+c)/(n-c),R=(y+o)/(y-o),M=-(f+O)/(f-O),T=-1,C=-2*f*O/(f-O);return w[0]=j,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=z,w[6]=0,w[7]=0,w[8]=h,w[9]=R,w[10]=M,w[11]=T,w[12]=0,w[13]=0,w[14]=C,w[15]=0,w};b.computeInfinitePerspectiveOffCenter=function(c,n,o,y,O,f){p.typeOf.number("left",c),p.typeOf.number("right",n),p.typeOf.number("bottom",o),p.typeOf.number("top",y),p.typeOf.number("near",O),p.typeOf.object("result",f);let w=2*O/(n-c),j=2*O/(y-o),z=(n+c)/(n-c),h=(y+o)/(y-o),R=-1,M=-1,T=-2*O;return f[0]=w,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=j,f[6]=0,f[7]=0,f[8]=z,f[9]=h,f[10]=R,f[11]=M,f[12]=0,f[13]=0,f[14]=T,f[15]=0,f};b.computeViewportTransformation=function(c,n,o,y){U(y)||(y=new b),c=c??j1.EMPTY_OBJECT;let O=c.x??0,f=c.y??0,w=c.width??0,j=c.height??0;n=n??0,o=o??1;let z=w*.5,h=j*.5,R=(o-n)*.5,M=z,T=h,C=R,q=O+z,N=f+h,E=n+R,S=1;return y[0]=M,y[1]=0,y[2]=0,y[3]=0,y[4]=0,y[5]=T,y[6]=0,y[7]=0,y[8]=0,y[9]=0,y[10]=C,y[11]=0,y[12]=q,y[13]=N,y[14]=E,y[15]=S,y};b.computeView=function(c,n,o,y,O){return p.typeOf.object("position",c),p.typeOf.object("direction",n),p.typeOf.object("up",o),p.typeOf.object("right",y),p.typeOf.object("result",O),O[0]=y.x,O[1]=o.x,O[2]=-n.x,O[3]=0,O[4]=y.y,O[5]=o.y,O[6]=-n.y,O[7]=0,O[8]=y.z,O[9]=o.z,O[10]=-n.z,O[11]=0,O[12]=-L.dot(y,c),O[13]=-L.dot(o,c),O[14]=L.dot(n,c),O[15]=1,O};b.toArray=function(c,n){return p.typeOf.object("matrix",c),U(n)?(n[0]=c[0],n[1]=c[1],n[2]=c[2],n[3]=c[3],n[4]=c[4],n[5]=c[5],n[6]=c[6],n[7]=c[7],n[8]=c[8],n[9]=c[9],n[10]=c[10],n[11]=c[11],n[12]=c[12],n[13]=c[13],n[14]=c[14],n[15]=c[15],n):[c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]]};b.getElementIndex=function(c,n){return p.typeOf.number.greaterThanOrEquals("row",n,0),p.typeOf.number.lessThanOrEquals("row",n,3),p.typeOf.number.greaterThanOrEquals("column",c,0),p.typeOf.number.lessThanOrEquals("column",c,3),c*4+n};b.getColumn=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.number.greaterThanOrEquals("index",n,0),p.typeOf.number.lessThanOrEquals("index",n,3),p.typeOf.object("result",o);let y=n*4,O=c[y],f=c[y+1],w=c[y+2],j=c[y+3];return o.x=O,o.y=f,o.z=w,o.w=j,o};b.setColumn=function(c,n,o,y){p.typeOf.object("matrix",c),p.typeOf.number.greaterThanOrEquals("index",n,0),p.typeOf.number.lessThanOrEquals("index",n,3),p.typeOf.object("cartesian",o),p.typeOf.object("result",y),y=b.clone(c,y);let O=n*4;return y[O]=o.x,y[O+1]=o.y,y[O+2]=o.z,y[O+3]=o.w,y};b.getRow=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.number.greaterThanOrEquals("index",n,0),p.typeOf.number.lessThanOrEquals("index",n,3),p.typeOf.object("result",o);let y=c[n],O=c[n+4],f=c[n+8],w=c[n+12];return o.x=y,o.y=O,o.z=f,o.w=w,o};b.setRow=function(c,n,o,y){return p.typeOf.object("matrix",c),p.typeOf.number.greaterThanOrEquals("index",n,0),p.typeOf.number.lessThanOrEquals("index",n,3),p.typeOf.object("cartesian",o),p.typeOf.object("result",y),y=b.clone(c,y),y[n]=o.x,y[n+4]=o.y,y[n+8]=o.z,y[n+12]=o.w,y};b.setTranslation=function(c,n,o){return p.typeOf.object("matrix",c),p.typeOf.object("translation",n),p.typeOf.object("result",o),o[0]=c[0],o[1]=c[1],o[2]=c[2],o[3]=c[3],o[4]=c[4],o[5]=c[5],o[6]=c[6],o[7]=c[7],o[8]=c[8],o[9]=c[9],o[10]=c[10],o[11]=c[11],o[12]=n.x,o[13]=n.y,o[14]=n.z,o[15]=c[15],o};var d1=new L;b.setScale=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("scale",n),p.typeOf.object("result",o);let y=b.getScale(c,d1),O=n.x/y.x,f=n.y/y.y,w=n.z/y.z;return o[0]=c[0]*O,o[1]=c[1]*O,o[2]=c[2]*O,o[3]=c[3],o[4]=c[4]*f,o[5]=c[5]*f,o[6]=c[6]*f,o[7]=c[7],o[8]=c[8]*w,o[9]=c[9]*w,o[10]=c[10]*w,o[11]=c[11],o[12]=c[12],o[13]=c[13],o[14]=c[14],o[15]=c[15],o};var A1=new L;b.setUniformScale=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.number("scale",n),p.typeOf.object("result",o);let y=b.getScale(c,A1),O=n/y.x,f=n/y.y,w=n/y.z;return o[0]=c[0]*O,o[1]=c[1]*O,o[2]=c[2]*O,o[3]=c[3],o[4]=c[4]*f,o[5]=c[5]*f,o[6]=c[6]*f,o[7]=c[7],o[8]=c[8]*w,o[9]=c[9]*w,o[10]=c[10]*w,o[11]=c[11],o[12]=c[12],o[13]=c[13],o[14]=c[14],o[15]=c[15],o};var w1=new L;b.getScale=function(c,n){return p.typeOf.object("matrix",c),p.typeOf.object("result",n),n.x=L.magnitude(L.fromElements(c[0],c[1],c[2],w1)),n.y=L.magnitude(L.fromElements(c[4],c[5],c[6],w1)),n.z=L.magnitude(L.fromElements(c[8],c[9],c[10],w1)),n};var M1=new L;b.getMaximumScale=function(c){return b.getScale(c,M1),L.maximumComponent(M1)};var L1=new L;b.setRotation=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("result",o);let y=b.getScale(c,L1);return o[0]=n[0]*y.x,o[1]=n[1]*y.x,o[2]=n[2]*y.x,o[3]=c[3],o[4]=n[3]*y.y,o[5]=n[4]*y.y,o[6]=n[5]*y.y,o[7]=c[7],o[8]=n[6]*y.z,o[9]=n[7]*y.z,o[10]=n[8]*y.z,o[11]=c[11],o[12]=c[12],o[13]=c[13],o[14]=c[14],o[15]=c[15],o};var W1=new L;b.getRotation=function(c,n){p.typeOf.object("matrix",c),p.typeOf.object("result",n);let o=b.getScale(c,W1);return n[0]=c[0]/o.x,n[1]=c[1]/o.x,n[2]=c[2]/o.x,n[3]=c[4]/o.y,n[4]=c[5]/o.y,n[5]=c[6]/o.y,n[6]=c[8]/o.z,n[7]=c[9]/o.z,n[8]=c[10]/o.z,n};b.multiply=function(c,n,o){p.typeOf.object("left",c),p.typeOf.object("right",n),p.typeOf.object("result",o);let y=c[0],O=c[1],f=c[2],w=c[3],j=c[4],z=c[5],h=c[6],R=c[7],M=c[8],T=c[9],C=c[10],q=c[11],N=c[12],E=c[13],S=c[14],d=c[15],A=n[0],W=n[1],$=n[2],Z=n[3],B=n[4],Y=n[5],k=n[6],V=n[7],Q=n[8],H=n[9],J=n[10],G=n[11],K=n[12],I=n[13],_=n[14],v=n[15],t=y*A+j*W+M*$+N*Z,x=O*A+z*W+T*$+E*Z,i=f*A+h*W+C*$+S*Z,s=w*A+R*W+q*$+d*Z,n1=y*B+j*Y+M*k+N*V,c1=O*B+z*Y+T*k+E*V,o1=f*B+h*Y+C*k+S*V,y1=w*B+R*Y+q*k+d*V,p1=y*Q+j*H+M*J+N*G,O1=O*Q+z*H+T*J+E*G,f1=f*Q+h*H+C*J+S*G,X=w*Q+R*H+q*J+d*G,T1=y*K+j*I+M*_+N*v,C1=O*K+z*I+T*_+E*v,N1=f*K+h*I+C*_+S*v,q1=w*K+R*I+q*_+d*v;return o[0]=t,o[1]=x,o[2]=i,o[3]=s,o[4]=n1,o[5]=c1,o[6]=o1,o[7]=y1,o[8]=p1,o[9]=O1,o[10]=f1,o[11]=X,o[12]=T1,o[13]=C1,o[14]=N1,o[15]=q1,o};b.add=function(c,n,o){return p.typeOf.object("left",c),p.typeOf.object("right",n),p.typeOf.object("result",o),o[0]=c[0]+n[0],o[1]=c[1]+n[1],o[2]=c[2]+n[2],o[3]=c[3]+n[3],o[4]=c[4]+n[4],o[5]=c[5]+n[5],o[6]=c[6]+n[6],o[7]=c[7]+n[7],o[8]=c[8]+n[8],o[9]=c[9]+n[9],o[10]=c[10]+n[10],o[11]=c[11]+n[11],o[12]=c[12]+n[12],o[13]=c[13]+n[13],o[14]=c[14]+n[14],o[15]=c[15]+n[15],o};b.subtract=function(c,n,o){return p.typeOf.object("left",c),p.typeOf.object("right",n),p.typeOf.object("result",o),o[0]=c[0]-n[0],o[1]=c[1]-n[1],o[2]=c[2]-n[2],o[3]=c[3]-n[3],o[4]=c[4]-n[4],o[5]=c[5]-n[5],o[6]=c[6]-n[6],o[7]=c[7]-n[7],o[8]=c[8]-n[8],o[9]=c[9]-n[9],o[10]=c[10]-n[10],o[11]=c[11]-n[11],o[12]=c[12]-n[12],o[13]=c[13]-n[13],o[14]=c[14]-n[14],o[15]=c[15]-n[15],o};b.multiplyTransformation=function(c,n,o){p.typeOf.object("left",c),p.typeOf.object("right",n),p.typeOf.object("result",o);let y=c[0],O=c[1],f=c[2],w=c[4],j=c[5],z=c[6],h=c[8],R=c[9],M=c[10],T=c[12],C=c[13],q=c[14],N=n[0],E=n[1],S=n[2],d=n[4],A=n[5],W=n[6],$=n[8],Z=n[9],B=n[10],Y=n[12],k=n[13],V=n[14],Q=y*N+w*E+h*S,H=O*N+j*E+R*S,J=f*N+z*E+M*S,G=y*d+w*A+h*W,K=O*d+j*A+R*W,I=f*d+z*A+M*W,_=y*$+w*Z+h*B,v=O*$+j*Z+R*B,t=f*$+z*Z+M*B,x=y*Y+w*k+h*V+T,i=O*Y+j*k+R*V+C,s=f*Y+z*k+M*V+q;return o[0]=Q,o[1]=H,o[2]=J,o[3]=0,o[4]=G,o[5]=K,o[6]=I,o[7]=0,o[8]=_,o[9]=v,o[10]=t,o[11]=0,o[12]=x,o[13]=i,o[14]=s,o[15]=1,o};b.multiplyByMatrix3=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("rotation",n),p.typeOf.object("result",o);let y=c[0],O=c[1],f=c[2],w=c[4],j=c[5],z=c[6],h=c[8],R=c[9],M=c[10],T=n[0],C=n[1],q=n[2],N=n[3],E=n[4],S=n[5],d=n[6],A=n[7],W=n[8],$=y*T+w*C+h*q,Z=O*T+j*C+R*q,B=f*T+z*C+M*q,Y=y*N+w*E+h*S,k=O*N+j*E+R*S,V=f*N+z*E+M*S,Q=y*d+w*A+h*W,H=O*d+j*A+R*W,J=f*d+z*A+M*W;return o[0]=$,o[1]=Z,o[2]=B,o[3]=0,o[4]=Y,o[5]=k,o[6]=V,o[7]=0,o[8]=Q,o[9]=H,o[10]=J,o[11]=0,o[12]=c[12],o[13]=c[13],o[14]=c[14],o[15]=c[15],o};b.multiplyByTranslation=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("translation",n),p.typeOf.object("result",o);let y=n.x,O=n.y,f=n.z,w=y*c[0]+O*c[4]+f*c[8]+c[12],j=y*c[1]+O*c[5]+f*c[9]+c[13],z=y*c[2]+O*c[6]+f*c[10]+c[14];return o[0]=c[0],o[1]=c[1],o[2]=c[2],o[3]=c[3],o[4]=c[4],o[5]=c[5],o[6]=c[6],o[7]=c[7],o[8]=c[8],o[9]=c[9],o[10]=c[10],o[11]=c[11],o[12]=w,o[13]=j,o[14]=z,o[15]=c[15],o};b.multiplyByScale=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("scale",n),p.typeOf.object("result",o);let y=n.x,O=n.y,f=n.z;return y===1&&O===1&&f===1?b.clone(c,o):(o[0]=y*c[0],o[1]=y*c[1],o[2]=y*c[2],o[3]=c[3],o[4]=O*c[4],o[5]=O*c[5],o[6]=O*c[6],o[7]=c[7],o[8]=f*c[8],o[9]=f*c[9],o[10]=f*c[10],o[11]=c[11],o[12]=c[12],o[13]=c[13],o[14]=c[14],o[15]=c[15],o)};b.multiplyByUniformScale=function(c,n,o){return p.typeOf.object("matrix",c),p.typeOf.number("scale",n),p.typeOf.object("result",o),o[0]=c[0]*n,o[1]=c[1]*n,o[2]=c[2]*n,o[3]=c[3],o[4]=c[4]*n,o[5]=c[5]*n,o[6]=c[6]*n,o[7]=c[7],o[8]=c[8]*n,o[9]=c[9]*n,o[10]=c[10]*n,o[11]=c[11],o[12]=c[12],o[13]=c[13],o[14]=c[14],o[15]=c[15],o};b.multiplyByVector=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("cartesian",n),p.typeOf.object("result",o);let y=n.x,O=n.y,f=n.z,w=n.w,j=c[0]*y+c[4]*O+c[8]*f+c[12]*w,z=c[1]*y+c[5]*O+c[9]*f+c[13]*w,h=c[2]*y+c[6]*O+c[10]*f+c[14]*w,R=c[3]*y+c[7]*O+c[11]*f+c[15]*w;return o.x=j,o.y=z,o.z=h,o.w=R,o};b.multiplyByPointAsVector=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("cartesian",n),p.typeOf.object("result",o);let y=n.x,O=n.y,f=n.z,w=c[0]*y+c[4]*O+c[8]*f,j=c[1]*y+c[5]*O+c[9]*f,z=c[2]*y+c[6]*O+c[10]*f;return o.x=w,o.y=j,o.z=z,o};b.multiplyByPoint=function(c,n,o){p.typeOf.object("matrix",c),p.typeOf.object("cartesian",n),p.typeOf.object("result",o);let y=n.x,O=n.y,f=n.z,w=c[0]*y+c[4]*O+c[8]*f+c[12],j=c[1]*y+c[5]*O+c[9]*f+c[13],z=c[2]*y+c[6]*O+c[10]*f+c[14];return o.x=w,o.y=j,o.z=z,o};b.multiplyByScalar=function(c,n,o){return p.typeOf.object("matrix",c),p.typeOf.number("scalar",n),p.typeOf.object("result",o),o[0]=c[0]*n,o[1]=c[1]*n,o[2]=c[2]*n,o[3]=c[3]*n,o[4]=c[4]*n,o[5]=c[5]*n,o[6]=c[6]*n,o[7]=c[7]*n,o[8]=c[8]*n,o[9]=c[9]*n,o[10]=c[10]*n,o[11]=c[11]*n,o[12]=c[12]*n,o[13]=c[13]*n,o[14]=c[14]*n,o[15]=c[15]*n,o};b.negate=function(c,n){return p.typeOf.object("matrix",c),p.typeOf.object("result",n),n[0]=-c[0],n[1]=-c[1],n[2]=-c[2],n[3]=-c[3],n[4]=-c[4],n[5]=-c[5],n[6]=-c[6],n[7]=-c[7],n[8]=-c[8],n[9]=-c[9],n[10]=-c[10],n[11]=-c[11],n[12]=-c[12],n[13]=-c[13],n[14]=-c[14],n[15]=-c[15],n};b.transpose=function(c,n){p.typeOf.object("matrix",c),p.typeOf.object("result",n);let o=c[1],y=c[2],O=c[3],f=c[6],w=c[7],j=c[11];return n[0]=c[0],n[1]=c[4],n[2]=c[8],n[3]=c[12],n[4]=o,n[5]=c[5],n[6]=c[9],n[7]=c[13],n[8]=y,n[9]=f,n[10]=c[10],n[11]=c[14],n[12]=O,n[13]=w,n[14]=j,n[15]=c[15],n};b.abs=function(c,n){return p.typeOf.object("matrix",c),p.typeOf.object("result",n),n[0]=Math.abs(c[0]),n[1]=Math.abs(c[1]),n[2]=Math.abs(c[2]),n[3]=Math.abs(c[3]),n[4]=Math.abs(c[4]),n[5]=Math.abs(c[5]),n[6]=Math.abs(c[6]),n[7]=Math.abs(c[7]),n[8]=Math.abs(c[8]),n[9]=Math.abs(c[9]),n[10]=Math.abs(c[10]),n[11]=Math.abs(c[11]),n[12]=Math.abs(c[12]),n[13]=Math.abs(c[13]),n[14]=Math.abs(c[14]),n[15]=Math.abs(c[15]),n};b.equals=function(c,n){return c===n||U(c)&&U(n)&&c[12]===n[12]&&c[13]===n[13]&&c[14]===n[14]&&c[0]===n[0]&&c[1]===n[1]&&c[2]===n[2]&&c[4]===n[4]&&c[5]===n[5]&&c[6]===n[6]&&c[8]===n[8]&&c[9]===n[9]&&c[10]===n[10]&&c[3]===n[3]&&c[7]===n[7]&&c[11]===n[11]&&c[15]===n[15]};b.equalsEpsilon=function(c,n,o){return o=o??0,c===n||U(c)&&U(n)&&Math.abs(c[0]-n[0])<=o&&Math.abs(c[1]-n[1])<=o&&Math.abs(c[2]-n[2])<=o&&Math.abs(c[3]-n[3])<=o&&Math.abs(c[4]-n[4])<=o&&Math.abs(c[5]-n[5])<=o&&Math.abs(c[6]-n[6])<=o&&Math.abs(c[7]-n[7])<=o&&Math.abs(c[8]-n[8])<=o&&Math.abs(c[9]-n[9])<=o&&Math.abs(c[10]-n[10])<=o&&Math.abs(c[11]-n[11])<=o&&Math.abs(c[12]-n[12])<=o&&Math.abs(c[13]-n[13])<=o&&Math.abs(c[14]-n[14])<=o&&Math.abs(c[15]-n[15])<=o};b.getTranslation=function(c,n){return p.typeOf.object("matrix",c),p.typeOf.object("result",n),n.x=c[12],n.y=c[13],n.z=c[14],n};b.getMatrix3=function(c,n){return p.typeOf.object("matrix",c),p.typeOf.object("result",n),n[0]=c[0],n[1]=c[1],n[2]=c[2],n[3]=c[4],n[4]=c[5],n[5]=c[6],n[6]=c[8],n[7]=c[9],n[8]=c[10],n};var $1=new u,Z1=new u,B1=new r,Y1=new r(0,0,0,1);b.inverse=function(c,n){p.typeOf.object("matrix",c),p.typeOf.object("result",n);let o=c[0],y=c[4],O=c[8],f=c[12],w=c[1],j=c[5],z=c[9],h=c[13],R=c[2],M=c[6],T=c[10],C=c[14],q=c[3],N=c[7],E=c[11],S=c[15],d=T*S,A=C*E,W=M*S,$=C*N,Z=M*E,B=T*N,Y=R*S,k=C*q,V=R*E,Q=T*q,H=R*N,J=M*q,G=d*j+$*z+Z*h-(A*j+W*z+B*h),K=A*w+Y*z+Q*h-(d*w+k*z+V*h),I=W*w+k*j+H*h-($*w+Y*j+J*h),_=B*w+V*j+J*z-(Z*w+Q*j+H*z),v=A*y+W*O+B*f-(d*y+$*O+Z*f),t=d*o+k*O+V*f-(A*o+Y*O+Q*f),x=$*o+Y*y+J*f-(W*o+k*y+H*f),i=Z*o+Q*y+H*O-(B*o+V*y+J*O);d=O*h,A=f*z,W=y*h,$=f*j,Z=y*z,B=O*j,Y=o*h,k=f*w,V=o*z,Q=O*w,H=o*j,J=y*w;let s=d*N+$*E+Z*S-(A*N+W*E+B*S),n1=A*q+Y*E+Q*S-(d*q+k*E+V*S),c1=W*q+k*N+H*S-($*q+Y*N+J*S),o1=B*q+V*N+J*E-(Z*q+Q*N+H*E),y1=W*T+B*C+A*M-(Z*C+d*M+$*T),p1=V*C+d*R+k*T-(Y*T+Q*C+A*R),O1=Y*M+J*C+$*R-(H*C+W*R+k*M),f1=H*T+Z*R+Q*M-(V*M+J*T+B*R),X=o*G+y*K+O*I+f*_;if(Math.abs(X)<F.EPSILON21){if(u.equalsEpsilon(b.getMatrix3(c,$1),Z1,F.EPSILON7)&&r.equals(b.getRow(c,3,B1),Y1))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-c[12],n[13]=-c[13],n[14]=-c[14],n[15]=1,n;throw new z1("matrix is not invertible because its determinate is zero.")}return X=1/X,n[0]=G*X,n[1]=K*X,n[2]=I*X,n[3]=_*X,n[4]=v*X,n[5]=t*X,n[6]=x*X,n[7]=i*X,n[8]=s*X,n[9]=n1*X,n[10]=c1*X,n[11]=o1*X,n[12]=y1*X,n[13]=p1*X,n[14]=O1*X,n[15]=f1*X,n};b.inverseTransformation=function(c,n){p.typeOf.object("matrix",c),p.typeOf.object("result",n);let o=c[0],y=c[1],O=c[2],f=c[4],w=c[5],j=c[6],z=c[8],h=c[9],R=c[10],M=c[12],T=c[13],C=c[14],q=-o*M-y*T-O*C,N=-f*M-w*T-j*C,E=-z*M-h*T-R*C;return n[0]=o,n[1]=f,n[2]=z,n[3]=0,n[4]=y,n[5]=w,n[6]=h,n[7]=0,n[8]=O,n[9]=j,n[10]=R,n[11]=0,n[12]=q,n[13]=N,n[14]=E,n[15]=1,n};var k1=new b;b.inverseTranspose=function(c,n){return p.typeOf.object("matrix",c),p.typeOf.object("result",n),b.inverse(b.transpose(c,k1),n)};b.IDENTITY=Object.freeze(new b(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));b.ZERO=Object.freeze(new b(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));b.COLUMN0ROW0=0;b.COLUMN0ROW1=1;b.COLUMN0ROW2=2;b.COLUMN0ROW3=3;b.COLUMN1ROW0=4;b.COLUMN1ROW1=5;b.COLUMN1ROW2=6;b.COLUMN1ROW3=7;b.COLUMN2ROW0=8;b.COLUMN2ROW1=9;b.COLUMN2ROW2=10;b.COLUMN2ROW3=11;b.COLUMN3ROW0=12;b.COLUMN3ROW1=13;b.COLUMN3ROW2=14;b.COLUMN3ROW3=15;Object.defineProperties(b.prototype,{length:{get:function(){return b.packedLength}}});b.prototype.clone=function(c){return b.clone(this,c)};b.prototype.equals=function(c){return b.equals(this,c)};b.equalsArray=function(c,n,o){return c[0]===n[o]&&c[1]===n[o+1]&&c[2]===n[o+2]&&c[3]===n[o+3]&&c[4]===n[o+4]&&c[5]===n[o+5]&&c[6]===n[o+6]&&c[7]===n[o+7]&&c[8]===n[o+8]&&c[9]===n[o+9]&&c[10]===n[o+10]&&c[11]===n[o+11]&&c[12]===n[o+12]&&c[13]===n[o+13]&&c[14]===n[o+14]&&c[15]===n[o+15]};b.prototype.equalsEpsilon=function(c,n){return b.equalsEpsilon(this,c,n)};b.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
|
|
27
|
+
(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
|
|
28
|
+
(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
|
|
29
|
+
(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var m1=b;export{r as a,m1 as b};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.139.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
|
+
|
|
26
|
+
var r,u=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&u.decode();var a=null;function h(){return(a===null||a.byteLength===0)&&(a=new Uint8Array(r.memory.buffer)),a}function b(e,t){return e=e>>>0,u.decode(h().subarray(e,e+t))}var o=null;function g(){return(o===null||o.byteLength===0)&&(o=new Uint32Array(r.memory.buffer)),o}function m(e,t){return e=e>>>0,g().subarray(e/4,e/4+t)}var y=0;function x(e,t){let n=t(e.length*4,4)>>>0;return g().set(e,n/4),y=e.length,n}function c(e){let t=r.__wbindgen_export_0.get(e);return r.__externref_table_dealloc(e),t}function U(e,t,n,i,_){let s=r.generate_splat_texture(e,t,n,i,_);if(s[2])throw c(s[1]);return f.__wrap(s[0])}function M(e,t,n){let i=r.radix_sort_gaussians_indexes(e,t,n);if(i[2])throw c(i[1]);return c(i[0])}var w=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>r.__wbg_texturedata_free(e>>>0,1)),f=class e{static __wrap(t){t=t>>>0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,w.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,w.unregister(this),t}free(){let t=this.__destroy_into_raw();r.__wbg_texturedata_free(t,0)}get data(){let t=r.texturedata_data(this.__wbg_ptr);var n=m(t[0],t[1]).slice();return r.__wbindgen_free(t[0],t[1]*4,4),n}get width(){return r.texturedata_width(this.__wbg_ptr)>>>0}get height(){return r.texturedata_height(this.__wbg_ptr)>>>0}static new(t,n,i){let _=x(t,r.__wbindgen_malloc),s=y,p=r.texturedata_new(_,s,n,i);return e.__wrap(p)}};async function A(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(i){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",i);else throw i}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function d(){let e={};return e.wbg={},e.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},e.wbg.__wbg_length_3b4f022188ae8db6=function(t){return t.length},e.wbg.__wbg_length_a446193dc22c12f8=function(t){return t.length},e.wbg.__wbg_new_780abee5c1739fd7=function(t){return new Float32Array(t)},e.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},e.wbg.__wbg_new_e3b321dcfef89fc7=function(t){return new Uint32Array(t)},e.wbg.__wbg_newwithbyteoffsetandlength_f1dead44d1fc7212=function(t,n,i){return new Uint32Array(t,n>>>0,i>>>0)},e.wbg.__wbg_set_10bad9bee0e9c58b=function(t,n,i){t.set(n,i>>>0)},e.wbg.__wbg_set_65595bdd868b3009=function(t,n,i){t.set(n,i>>>0)},e.wbg.__wbindgen_init_externref_table=function(){let t=r.__wbindgen_export_0,n=t.grow(4);t.set(0,void 0),t.set(n+0,void 0),t.set(n+1,null),t.set(n+2,!0),t.set(n+3,!1)},e.wbg.__wbindgen_memory=function(){return r.memory},e.wbg.__wbindgen_string_new=function(t,n){return b(t,n)},e.wbg.__wbindgen_throw=function(t,n){throw new Error(b(t,n))},e}function l(e,t){return r=e.exports,W.__wbindgen_wasm_module=t,o=null,a=null,r.__wbindgen_start(),r}function O(e){if(r!==void 0)return r;typeof e<"u"&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=d();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let n=new WebAssembly.Instance(e,t);return l(n,e)}async function W(e){if(r!==void 0)return r;typeof e<"u"&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof e>"u"&&(e=new URL("wasm_splats_bg.wasm",import.meta.url));let t=d();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:i}=await A(await e,t);return l(n,i)}export{U as a,M as b,O as c};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.139.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
|
+
|
|
26
|
+
import{k as N}from"./chunk-TITUTZNR.js";import{a as S,b as z}from"./chunk-LAGV6F3C.js";import{a as p}from"./chunk-PAML32O3.js";import{b as C}from"./chunk-3MO6V622.js";import{a as T,b as w}from"./chunk-OJH7UFER.js";import{a as m}from"./chunk-6J7K26F7.js";import{a as h,b as c}from"./chunk-YSN2K4FT.js";import{e as b}from"./chunk-VAPRBQYE.js";var a={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};a.getMathType=function(e){switch(e){case a.SCALAR:return Number;case a.VEC2:return C;case a.VEC3:return T;case a.VEC4:return S;case a.MAT2:return N;case a.MAT3:return w;case a.MAT4:return z;default:throw new h("attributeType is not a valid value.")}};a.getNumberOfComponents=function(e){switch(e){case a.SCALAR:return 1;case a.VEC2:return 2;case a.VEC3:return 3;case a.VEC4:case a.MAT2:return 4;case a.MAT3:return 9;case a.MAT4:return 16;default:throw new h("attributeType is not a valid value.")}};a.getAttributeLocationCount=function(e){switch(e){case a.SCALAR:case a.VEC2:case a.VEC3:case a.VEC4:return 1;case a.MAT2:return 2;case a.MAT3:return 3;case a.MAT4:return 4;default:throw new h("attributeType is not a valid value.")}};a.getGlslType=function(e){switch(c.typeOf.string("attributeType",e),e){case a.SCALAR:return"float";case a.VEC2:return"vec2";case a.VEC3:return"vec3";case a.VEC4:return"vec4";case a.MAT2:return"mat2";case a.MAT3:return"mat3";case a.MAT4:return"mat4";default:throw new h("attributeType is not a valid value.")}};var F=Object.freeze(a);var V=1/256,k=65536,l=256,r={};r.octEncodeInRange=function(e,t,n){c.defined("vector",e),c.defined("result",n);let o=T.magnitudeSquared(e);if(Math.abs(o-1)>m.EPSILON6)throw new h("vector must be normalized.");if(n.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),n.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){let i=n.x,d=n.y;n.x=(1-Math.abs(d))*m.signNotZero(i),n.y=(1-Math.abs(i))*m.signNotZero(d)}return n.x=m.toSNorm(n.x,t),n.y=m.toSNorm(n.y,t),n};r.octEncode=function(e,t){return r.octEncodeInRange(e,255,t)};var E=new C,D=new Uint8Array(1);function M(e){return D[0]=e,D[0]}r.octEncodeToCartesian4=function(e,t){return r.octEncodeInRange(e,65535,E),t.x=M(E.x*V),t.y=M(E.x),t.z=M(E.y*V),t.w=M(E.y),t};r.octDecodeInRange=function(e,t,n,o){if(c.defined("result",o),e<0||e>n||t<0||t>n)throw new h(`x and y must be unsigned normalized integers between 0 and ${n}`);if(o.x=m.fromSNorm(e,n),o.y=m.fromSNorm(t,n),o.z=1-(Math.abs(o.x)+Math.abs(o.y)),o.z<0){let i=o.x;o.x=(1-Math.abs(o.y))*m.signNotZero(i),o.y=(1-Math.abs(i))*m.signNotZero(o.y)}return T.normalize(o,o)};r.octDecode=function(e,t,n){return r.octDecodeInRange(e,t,255,n)};r.octDecodeFromCartesian4=function(e,t){c.typeOf.object("encoded",e),c.typeOf.object("result",t);let n=e.x,o=e.y,i=e.z,d=e.w;if(n<0||n>255||o<0||o>255||i<0||i>255||d<0||d>255)throw new h("x, y, z, and w must be unsigned normalized integers between 0 and 255");let f=n*l+o,s=i*l+d;return r.octDecodeInRange(f,s,65535,t)};r.octPackFloat=function(e){return c.defined("encoded",e),256*e.x+e.y};var x=new C;r.octEncodeFloat=function(e){return r.octEncode(e,x),r.octPackFloat(x)};r.octDecodeFloat=function(e,t){c.defined("value",e);let n=e/256,o=Math.floor(n),i=(n-o)*256;return r.octDecode(o,i,t)};r.octPack=function(e,t,n,o){c.defined("v1",e),c.defined("v2",t),c.defined("v3",n),c.defined("result",o);let i=r.octEncodeFloat(e),d=r.octEncodeFloat(t),f=r.octEncode(n,x);return o.x=65536*f.x+i,o.y=65536*f.y+d,o};r.octUnpack=function(e,t,n,o){c.defined("packed",e),c.defined("v1",t),c.defined("v2",n),c.defined("v3",o);let i=e.x/65536,d=Math.floor(i),f=(i-d)*65536;i=e.y/65536;let s=Math.floor(i),u=(i-s)*65536;r.octDecodeFloat(f,t),r.octDecodeFloat(u,n),r.octDecode(d,s,o)};r.compressTextureCoordinates=function(e){c.defined("textureCoordinates",e);let t=e.x*4095|0,n=e.y*4095|0;return 4096*t+n};r.decompressTextureCoordinates=function(e,t){c.defined("compressed",e),c.defined("result",t);let n=e/4096,o=Math.floor(n);return t.x=o/4095,t.y=(e-o*4096)/4095,t};function g(e){return e>>1^-(e&1)}r.zigZagDeltaDecode=function(e,t,n){c.defined("uBuffer",e),c.defined("vBuffer",t),c.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),b(n)&&c.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,n.length);let o=e.length,i=0,d=0,f=0;for(let s=0;s<o;++s)i+=g(e[s]),d+=g(t[s]),e[s]=i,t[s]=d,b(n)&&(f+=g(n[s]),n[s]=f)};r.dequantize=function(e,t,n,o){c.defined("typedArray",e),c.defined("componentDatatype",t),c.defined("type",n),c.defined("count",o);let i=F.getNumberOfComponents(n),d;switch(t){case p.BYTE:d=127;break;case p.UNSIGNED_BYTE:d=255;break;case p.SHORT:d=32767;break;case p.UNSIGNED_SHORT:d=65535;break;case p.INT:d=2147483647;break;case p.UNSIGNED_INT:d=4294967295;break;default:throw new h(`Cannot dequantize component datatype: ${t}`)}let f=new Float32Array(o*i);for(let s=0;s<o;s++)for(let u=0;u<i;u++){let y=s*i+u;f[y]=Math.max(e[y]/d,-1)}return f};r.encodeRGB8=function(e){return c.typeOf.object("color",e),Math.round(m.clamp(e.red*255,0,255))*k+Math.round(m.clamp(e.green*255,0,255))*l+Math.round(m.clamp(e.blue*255,0,255))};r.decodeRGB8=function(e,t){return c.typeOf.number("encoded",e),c.typeOf.object("result",t),e=Math.floor(e),t.red=(e>>16&255)/255,t.green=(e>>8&255)/255,t.blue=(e&255)/255,t};r.decodeRGB565=function(e,t){c.defined("typedArray",e);let n=e.length*3;b(t)&&c.typeOf.number.equals("result.length","typedArray.length * 3",t.length,n);let o=e.length;b(t)||(t=new Float32Array(o*3));let i=31,d=63,f=1/31,s=1/63;for(let u=0;u<o;u++){let y=e[u],R=y>>11,O=y>>5&d,I=y&i,A=3*u;t[A]=R*f,t[A+1]=O*s,t[A+2]=I*f}return t};var B=r;export{B as a};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.139.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
|
+
|
|
26
|
+
import{a as tt}from"./chunk-MSR5BKMH.js";import{a as jt}from"./chunk-W5T7UWKW.js";import{b as Lt}from"./chunk-PNKG35NX.js";import{a as Et}from"./chunk-453UE67U.js";import{a as j}from"./chunk-Q6F3SO7I.js";import{a as dt,b as D,c as B,d as U}from"./chunk-XLJBHQML.js";import{a as _t,c as ot}from"./chunk-QROIA2H7.js";import{a as Ut}from"./chunk-ANKVUFZB.js";import{a as pt,b as H}from"./chunk-LAGV6F3C.js";import{a as F}from"./chunk-PAML32O3.js";import{a as Mt,b as V}from"./chunk-3MO6V622.js";import{a as r,b as gt,c as Ot}from"./chunk-OJH7UFER.js";import{a as N}from"./chunk-6J7K26F7.js";import{a as I,b as ft}from"./chunk-YSN2K4FT.js";import{e as f}from"./chunk-VAPRBQYE.js";var Yt=new r,Zt=new r,Xt=new r;function pe(t,e,n,s,i){ft.defined("point",t),ft.defined("p0",e),ft.defined("p1",n),ft.defined("p2",s),f(i)||(i=new r);let c,o,a,p,u,d,m,l;if(f(e.z)){if(r.equalsEpsilon(t,e,N.EPSILON14))return r.clone(r.UNIT_X,i);if(r.equalsEpsilon(t,n,N.EPSILON14))return r.clone(r.UNIT_Y,i);if(r.equalsEpsilon(t,s,N.EPSILON14))return r.clone(r.UNIT_Z,i);c=r.subtract(n,e,Yt),o=r.subtract(s,e,Zt),a=r.subtract(t,e,Xt),p=r.dot(c,c),u=r.dot(c,o),d=r.dot(c,a),m=r.dot(o,o),l=r.dot(o,a)}else{if(V.equalsEpsilon(t,e,N.EPSILON14))return r.clone(r.UNIT_X,i);if(V.equalsEpsilon(t,n,N.EPSILON14))return r.clone(r.UNIT_Y,i);if(V.equalsEpsilon(t,s,N.EPSILON14))return r.clone(r.UNIT_Z,i);c=V.subtract(n,e,Yt),o=V.subtract(s,e,Zt),a=V.subtract(t,e,Xt),p=V.dot(c,c),u=V.dot(c,o),d=V.dot(c,a),m=V.dot(o,o),l=V.dot(o,a)}i.y=m*d-u*l,i.z=p*l-u*d;let h=p*m-u*u;if(h!==0)return i.y/=h,i.z/=h,i.x=1-i.y-i.z,i}var Ht=pe;var Nt={};Nt.calculateACMR=function(t){t=t??Ot.EMPTY_OBJECT;let e=t.indices,n=t.maximumIndex,s=t.cacheSize??24;if(!f(e))throw new I("indices is required.");let i=e.length;if(i<3||i%3!==0)throw new I("indices length must be a multiple of three.");if(n<=0)throw new I("maximumIndex must be greater than zero.");if(s<3)throw new I("cacheSize must be greater than two.");if(!f(n)){n=0;let a=0,p=e[a];for(;a<i;)p>n&&(n=p),++a,p=e[a]}let c=[];for(let a=0;a<n+1;a++)c[a]=0;let o=s+1;for(let a=0;a<i;++a)o-c[e[a]]>s&&(c[e[a]]=o,++o);return(o-s+1)/(i/3)};Nt.tipsify=function(t){t=t??Ot.EMPTY_OBJECT;let e=t.indices,n=t.maximumIndex,s=t.cacheSize??24,i;function c(C,z,q,R){for(;z.length>=1;){let G=z[z.length-1];if(z.splice(z.length-1,1),C[G].numLiveTriangles>0)return G}for(;i<R;){if(C[i].numLiveTriangles>0)return++i,i-1;++i}return-1}function o(C,z,q,R,G,M,J){let Y=-1,_,St=-1,Pt=0;for(;Pt<q.length;){let lt=q[Pt];R[lt].numLiveTriangles&&(_=0,G-R[lt].timeStamp+2*R[lt].numLiveTriangles<=z&&(_=G-R[lt].timeStamp),(_>St||St===-1)&&(St=_,Y=lt)),++Pt}return Y===-1?c(R,M,C,J):Y}if(!f(e))throw new I("indices is required.");let a=e.length;if(a<3||a%3!==0)throw new I("indices length must be a multiple of three.");if(n<=0)throw new I("maximumIndex must be greater than zero.");if(s<3)throw new I("cacheSize must be greater than two.");let p=0,u=0,d=e[u],m=a;if(f(n))p=n+1;else{for(;u<m;)d>p&&(p=d),++u,d=e[u];if(p===-1)return 0;++p}let l=[],h;for(h=0;h<p;h++)l[h]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let y=0;for(;u<m;)l[e[u]].vertexTriangles.push(y),++l[e[u]].numLiveTriangles,l[e[u+1]].vertexTriangles.push(y),++l[e[u+1]].numLiveTriangles,l[e[u+2]].vertexTriangles.push(y),++l[e[u+2]].numLiveTriangles,++y,u+=3;let v=0,b=s+1;i=1;let S=[],x=[],w,A,E=0,P=[],O=a/3,L=[];for(h=0;h<O;h++)L[h]=!1;let g,T;for(;v!==-1;){S=[],A=l[v],T=A.vertexTriangles.length;for(let C=0;C<T;++C)if(y=A.vertexTriangles[C],!L[y]){L[y]=!0,u=y+y+y;for(let z=0;z<3;++z)g=e[u],S.push(g),x.push(g),P[E]=g,++E,w=l[g],--w.numLiveTriangles,b-w.timeStamp>s&&(w.timeStamp=b,++b),++u}v=o(e,s,S,l,b,x,p)}return P};var Wt=Nt;var k={};function It(t,e,n,s,i){t[e++]=n,t[e++]=s,t[e++]=s,t[e++]=i,t[e++]=i,t[e]=n}function de(t){let e=t.length,n=e/3*6,s=j.createTypedArray(e,n),i=0;for(let c=0;c<e;c+=3,i+=6)It(s,i,t[c],t[c+1],t[c+2]);return s}function me(t){let e=t.length;if(e>=3){let n=(e-2)*6,s=j.createTypedArray(e,n);It(s,0,t[0],t[1],t[2]);let i=6;for(let c=3;c<e;++c,i+=6)It(s,i,t[c-1],t[c],t[c-2]);return s}return new Uint16Array}function he(t){if(t.length>0){let e=t.length-1,n=(e-1)*6,s=j.createTypedArray(e,n),i=t[0],c=0;for(let o=1;o<e;++o,c+=6)It(s,c,i,t[o],t[o+1]);return s}return new Uint16Array}k.toWireframe=function(t){if(!f(t))throw new I("geometry is required.");let e=t.indices;if(f(e)){switch(t.primitiveType){case D.TRIANGLES:t.indices=de(e);break;case D.TRIANGLE_STRIP:t.indices=me(e);break;case D.TRIANGLE_FAN:t.indices=he(e);break;default:throw new I("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}t.primitiveType=D.LINES}return t};k.createLineSegmentsForVectors=function(t,e,n){if(e=e??"normal",!f(t))throw new I("geometry is required.");if(!f(t.attributes.position))throw new I("geometry.attributes.position is required.");if(!f(t.attributes[e]))throw new I(`geometry.attributes must have an attribute with the same name as the attributeName parameter, ${e}.`);n=n??1e4;let s=t.attributes.position.values,i=t.attributes[e].values,c=s.length,o=new Float64Array(2*c),a=0;for(let d=0;d<c;d+=3)o[a++]=s[d],o[a++]=s[d+1],o[a++]=s[d+2],o[a++]=s[d]+i[d]*n,o[a++]=s[d+1]+i[d+1]*n,o[a++]=s[d+2]+i[d+2]*n;let p,u=t.boundingSphere;return f(u)&&(p=new ot(u.center,u.radius+n)),new B({attributes:{position:new U({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:o})},primitiveType:D.LINES,boundingSphere:p})};k.createAttributeLocations=function(t){if(!f(t))throw new I("geometry is required.");let e=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=t.attributes,s={},i=0,c,o=e.length;for(c=0;c<o;++c){let a=e[c];f(n[a])&&(s[a]=i++)}for(let a in n)n.hasOwnProperty(a)&&!f(s[a])&&(s[a]=i++);return s};k.reorderForPreVertexCache=function(t){if(!f(t))throw new I("geometry is required.");let e=B.computeNumberOfVertices(t),n=t.indices;if(f(n)){let s=new Int32Array(e);for(let l=0;l<e;l++)s[l]=-1;let i=n,c=i.length,o=j.createTypedArray(e,c),a=0,p=0,u=0,d;for(;a<c;)d=s[i[a]],d!==-1?o[p]=d:(d=i[a],s[d]=u,o[p]=u,++u),++a,++p;t.indices=o;let m=t.attributes;for(let l in m)if(m.hasOwnProperty(l)&&f(m[l])&&f(m[l].values)){let h=m[l],y=h.values,v=0,b=h.componentsPerAttribute,S=F.createTypedArray(h.componentDatatype,u*b);for(;v<e;){let x=s[v];if(x!==-1)for(let w=0;w<b;w++)S[b*x+w]=y[b*v+w];++v}h.values=S}}return t};k.reorderForPostVertexCache=function(t,e){if(!f(t))throw new I("geometry is required.");let n=t.indices;if(t.primitiveType===D.TRIANGLES&&f(n)){let s=n.length,i=0;for(let c=0;c<s;c++)n[c]>i&&(i=n[c]);t.indices=Wt.tipsify({indices:n,maximumIndex:i,cacheSize:e})}return t};function $t(t){let e={};for(let n in t)if(t.hasOwnProperty(n)&&f(t[n])&&f(t[n].values)){let s=t[n];e[n]=new U({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:[]})}return e}function be(t,e,n){for(let s in e)if(e.hasOwnProperty(s)&&f(e[s])&&f(e[s].values)){let i=e[s];for(let c=0;c<i.componentsPerAttribute;++c)t[s].values.push(i.values[n*i.componentsPerAttribute+c])}}k.fitToUnsignedShortIndices=function(t){if(!f(t))throw new I("geometry is required.");if(f(t.indices)&&t.primitiveType!==D.TRIANGLES&&t.primitiveType!==D.LINES&&t.primitiveType!==D.POINTS)throw new I("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");let e=[],n=B.computeNumberOfVertices(t);if(f(t.indices)&&n>=N.SIXTY_FOUR_KILOBYTES){let s=[],i=[],c=0,o=$t(t.attributes),a=t.indices,p=a.length,u;t.primitiveType===D.TRIANGLES?u=3:t.primitiveType===D.LINES?u=2:t.primitiveType===D.POINTS&&(u=1);for(let d=0;d<p;d+=u){for(let m=0;m<u;++m){let l=a[d+m],h=s[l];f(h)||(h=c++,s[l]=h,be(o,t.attributes,l)),i.push(h)}c+u>=N.SIXTY_FOUR_KILOBYTES&&(e.push(new B({attributes:o,indices:i,primitiveType:t.primitiveType,boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV})),s=[],i=[],c=0,o=$t(t.attributes))}i.length!==0&&e.push(new B({attributes:o,indices:i,primitiveType:t.primitiveType,boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV}))}else e.push(t);return e};var Jt=new r,we=new Mt;k.projectTo2D=function(t,e,n,s,i){if(!f(t))throw new I("geometry is required.");if(!f(e))throw new I("attributeName is required.");if(!f(n))throw new I("attributeName3D is required.");if(!f(s))throw new I("attributeName2D is required.");if(!f(t.attributes[e]))throw new I(`geometry must have attribute matching the attributeName argument: ${e}.`);if(t.attributes[e].componentDatatype!==F.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let c=t.attributes[e];i=f(i)?i:new _t;let o=i.ellipsoid,a=c.values,p=new Float64Array(a.length),u=0;for(let d=0;d<a.length;d+=3){let m=r.fromArray(a,d,Jt),l=o.cartesianToCartographic(m,we);if(!f(l))throw new I(`Could not project point (${m.x}, ${m.y}, ${m.z}) to 2D.`);let h=i.project(l,Jt);p[u++]=h.x,p[u++]=h.y,p[u++]=h.z}return t.attributes[n]=c,t.attributes[s]=new U({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:p}),delete t.attributes[e],t};var zt={high:0,low:0};k.encodeAttribute=function(t,e,n,s){if(!f(t))throw new I("geometry is required.");if(!f(e))throw new I("attributeName is required.");if(!f(n))throw new I("attributeHighName is required.");if(!f(s))throw new I("attributeLowName is required.");if(!f(t.attributes[e]))throw new I(`geometry must have attribute matching the attributeName argument: ${e}.`);if(t.attributes[e].componentDatatype!==F.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let i=t.attributes[e],c=i.values,o=c.length,a=new Float32Array(o),p=new Float32Array(o);for(let d=0;d<o;++d)jt.encode(c[d],zt),a[d]=zt.high,p[d]=zt.low;let u=i.componentsPerAttribute;return t.attributes[n]=new U({componentDatatype:F.FLOAT,componentsPerAttribute:u,values:a}),t.attributes[s]=new U({componentDatatype:F.FLOAT,componentsPerAttribute:u,values:p}),delete t.attributes[e],t};var $=new r;function Dt(t,e){if(f(e)){let n=e.values,s=n.length;for(let i=0;i<s;i+=3)r.unpack(n,i,$),H.multiplyByPoint(t,$,$),r.pack($,n,i)}}function qt(t,e){if(f(e)){let n=e.values,s=n.length;for(let i=0;i<s;i+=3)r.unpack(n,i,$),gt.multiplyByVector(t,$,$),$=r.normalize($,$),r.pack($,n,i)}}var wt=new H,vt=new gt;k.transformToWorldCoordinates=function(t){if(!f(t))throw new I("instance is required.");let e=t.modelMatrix;if(H.equals(e,H.IDENTITY))return t;let n=t.geometry.attributes;Dt(e,n.position),Dt(e,n.prevPosition),Dt(e,n.nextPosition),(f(n.normal)||f(n.tangent)||f(n.bitangent))&&(H.inverse(e,wt),H.transpose(wt,wt),H.getMatrix3(wt,vt),qt(vt,n.normal),qt(vt,n.tangent),qt(vt,n.bitangent));let s=t.geometry.boundingSphere;return f(s)&&(t.geometry.boundingSphere=ot.transform(s,e,s)),t.modelMatrix=H.clone(H.IDENTITY),t};function ve(t,e){let n=t.length,s={},i=t[0][e].attributes,c;for(c in i)if(i.hasOwnProperty(c)&&f(i[c])&&f(i[c].values)){let o=i[c],a=o.values.length,p=!0;for(let u=1;u<n;++u){let d=t[u][e].attributes[c];if(!f(d)||o.componentDatatype!==d.componentDatatype||o.componentsPerAttribute!==d.componentsPerAttribute||o.normalize!==d.normalize){p=!1;break}a+=d.values.length}p&&(s[c]=new U({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:F.createTypedArray(o.componentDatatype,a)}))}return s}var ye=new r;function Rt(t,e){let n=t.length,s,i,c,o,a=t[0].modelMatrix,p=f(t[0][e].indices),u=t[0][e].primitiveType;for(i=1;i<n;++i){if(!H.equals(t[i].modelMatrix,a))throw new I("All instances must have the same modelMatrix.");if(f(t[i][e].indices)!==p)throw new I("All instance geometries must have an indices or not have one.");if(t[i][e].primitiveType!==u)throw new I("All instance geometries must have the same primitiveType.")}let d=ve(t,e),m,l,h;for(s in d)if(d.hasOwnProperty(s))for(m=d[s].values,o=0,i=0;i<n;++i)for(l=t[i][e].attributes[s].values,h=l.length,c=0;c<h;++c)m[o++]=l[c];let y;if(p){let x=0;for(i=0;i<n;++i)x+=t[i][e].indices.length;let w=B.computeNumberOfVertices(new B({attributes:d,primitiveType:D.POINTS})),A=j.createTypedArray(w,x),E=0,P=0;for(i=0;i<n;++i){let O=t[i][e].indices,L=O.length;for(o=0;o<L;++o)A[E++]=P+O[o];P+=B.computeNumberOfVertices(t[i][e])}y=A}let v=new r,b=0,S;for(i=0;i<n;++i){if(S=t[i][e].boundingSphere,!f(S)){v=void 0;break}r.add(S.center,v,v)}if(f(v))for(r.divideByScalar(v,n,v),i=0;i<n;++i){S=t[i][e].boundingSphere;let x=r.magnitude(r.subtract(S.center,v,ye))+S.radius;x>b&&(b=x)}return new B({attributes:d,indices:y,primitiveType:u,boundingSphere:f(v)?new ot(v,b):void 0})}k.combineInstances=function(t){if(!f(t)||t.length<1)throw new I("instances is required and must have length greater than zero.");let e=[],n=[],s=t.length;for(let c=0;c<s;++c){let o=t[c];f(o.geometry)?e.push(o):f(o.westHemisphereGeometry)&&f(o.eastHemisphereGeometry)&&n.push(o)}let i=[];return e.length>0&&i.push(Rt(e,"geometry")),n.length>0&&(i.push(Rt(n,"westHemisphereGeometry")),i.push(Rt(n,"eastHemisphereGeometry"))),i};var Z=new r,mt=new r,rt=new r,ct=new r;k.computeNormal=function(t){if(!f(t))throw new I("geometry is required.");if(!f(t.attributes.position)||!f(t.attributes.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(t.indices))throw new I("geometry.indices is required.");if(t.indices.length<2||t.indices.length%3!==0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(t.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let e=t.indices,n=t.attributes,s=n.position.values,i=n.position.values.length/3,c=e.length,o=new Array(i),a=new Array(c/3),p=new Array(c),u;for(u=0;u<i;u++)o[u]={indexOffset:0,count:0,currentCount:0};let d=0;for(u=0;u<c;u+=3){let y=e[u],v=e[u+1],b=e[u+2],S=y*3,x=v*3,w=b*3;mt.x=s[S],mt.y=s[S+1],mt.z=s[S+2],rt.x=s[x],rt.y=s[x+1],rt.z=s[x+2],ct.x=s[w],ct.y=s[w+1],ct.z=s[w+2],o[y].count++,o[v].count++,o[b].count++,r.subtract(rt,mt,rt),r.subtract(ct,mt,ct),a[d]=r.cross(rt,ct,new r),d++}let m=0;for(u=0;u<i;u++)o[u].indexOffset+=m,m+=o[u].count;d=0;let l;for(u=0;u<c;u+=3){l=o[e[u]];let y=l.indexOffset+l.currentCount;p[y]=d,l.currentCount++,l=o[e[u+1]],y=l.indexOffset+l.currentCount,p[y]=d,l.currentCount++,l=o[e[u+2]],y=l.indexOffset+l.currentCount,p[y]=d,l.currentCount++,d++}let h=new Float32Array(i*3);for(u=0;u<i;u++){let y=u*3;if(l=o[u],r.clone(r.ZERO,Z),l.count>0){for(d=0;d<l.count;d++)r.add(Z,a[p[l.indexOffset+d]],Z);r.equalsEpsilon(r.ZERO,Z,N.EPSILON10)&&r.clone(a[p[l.indexOffset]],Z)}r.equalsEpsilon(r.ZERO,Z,N.EPSILON10)&&(Z.z=1),r.normalize(Z,Z),h[y]=Z.x,h[y+1]=Z.y,h[y+2]=Z.z}return t.attributes.normal=new U({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:h}),t};var xe=new r,Kt=new r,Te=new r;k.computeTangentAndBitangent=function(t){if(!f(t))throw new I("geometry is required.");let e=t.attributes,n=t.indices;if(!f(e.position)||!f(e.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(e.normal)||!f(e.normal.values))throw new I("geometry.attributes.normal.values is required.");if(!f(e.st)||!f(e.st.values))throw new I("geometry.attributes.st.values is required.");if(!f(n))throw new I("geometry.indices is required.");if(n.length<2||n.length%3!==0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(t.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let s=t.attributes.position.values,i=t.attributes.normal.values,c=t.attributes.st.values,o=t.attributes.position.values.length/3,a=n.length,p=new Array(o*3),u;for(u=0;u<p.length;u++)p[u]=0;let d,m,l;for(u=0;u<a;u+=3){let v=n[u],b=n[u+1],S=n[u+2];d=v*3,m=b*3,l=S*3;let x=v*2,w=b*2,A=S*2,E=s[d],P=s[d+1],O=s[d+2],L=c[x],g=c[x+1],T=c[w+1]-g,C=c[A+1]-g,z=1/((c[w]-L)*C-(c[A]-L)*T),q=(C*(s[m]-E)-T*(s[l]-E))*z,R=(C*(s[m+1]-P)-T*(s[l+1]-P))*z,G=(C*(s[m+2]-O)-T*(s[l+2]-O))*z;p[d]+=q,p[d+1]+=R,p[d+2]+=G,p[m]+=q,p[m+1]+=R,p[m+2]+=G,p[l]+=q,p[l+1]+=R,p[l+2]+=G}let h=new Float32Array(o*3),y=new Float32Array(o*3);for(u=0;u<o;u++){d=u*3,m=d+1,l=d+2;let v=r.fromArray(i,d,xe),b=r.fromArray(p,d,Te),S=r.dot(v,b);r.multiplyByScalar(v,S,Kt),r.normalize(r.subtract(b,Kt,b),b),h[d]=b.x,h[m]=b.y,h[l]=b.z,r.normalize(r.cross(v,b,b),b),y[d]=b.x,y[m]=b.y,y[l]=b.z}return t.attributes.tangent=new U({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:h}),t.attributes.bitangent=new U({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:y}),t};var ht=new V,W=new r,Qt=new r,te=new r,yt=new V;k.compressVertices=function(t){if(!f(t))throw new I("geometry is required.");let e=t.attributes.extrudeDirection,n,s;if(f(e)){let P=e.values;s=P.length/3;let O=new Float32Array(s*2),L=0;for(n=0;n<s;++n){if(r.fromArray(P,n*3,W),r.equals(W,r.ZERO)){L+=2;continue}yt=tt.octEncodeInRange(W,65535,yt),O[L++]=yt.x,O[L++]=yt.y}return t.attributes.compressedAttributes=new U({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:O}),delete t.attributes.extrudeDirection,t}let i=t.attributes.normal,c=t.attributes.st,o=f(i),a=f(c);if(!o&&!a)return t;let p=t.attributes.tangent,u=t.attributes.bitangent,d=f(p),m=f(u),l,h,y,v;o&&(l=i.values),a&&(h=c.values),d&&(y=p.values),m&&(v=u.values),s=(o?l.length:h.length)/(o?3:2);let x=s,w=a&&o?2:1;w+=d||m?1:0,x*=w;let A=new Float32Array(x),E=0;for(n=0;n<s;++n){a&&(V.fromArray(h,n*2,ht),A[E++]=tt.compressTextureCoordinates(ht));let P=n*3;o&&f(y)&&f(v)?(r.fromArray(l,P,W),r.fromArray(y,P,Qt),r.fromArray(v,P,te),tt.octPack(W,Qt,te,ht),A[E++]=ht.x,A[E++]=ht.y):(o&&(r.fromArray(l,P,W),A[E++]=tt.octEncodeFloat(W)),d&&(r.fromArray(y,P,W),A[E++]=tt.octEncodeFloat(W)),m&&(r.fromArray(v,P,W),A[E++]=tt.octEncodeFloat(W)))}return t.attributes.compressedAttributes=new U({componentDatatype:F.FLOAT,componentsPerAttribute:w,values:A}),o&&delete t.attributes.normal,a&&delete t.attributes.st,m&&delete t.attributes.bitangent,d&&delete t.attributes.tangent,t};function Ae(t){if(f(t.indices))return t;let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least three.");if(e%3!==0)throw new I("The number of vertices must be a multiple of three.");let n=j.createTypedArray(e,e);for(let s=0;s<e;++s)n[s]=s;return t.indices=n,t}function Ie(t){let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least three.");let n=j.createTypedArray(e,(e-2)*3);n[0]=1,n[1]=0,n[2]=2;let s=3;for(let i=3;i<e;++i)n[s++]=i-1,n[s++]=0,n[s++]=i;return t.indices=n,t.primitiveType=D.TRIANGLES,t}function Se(t){let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least 3.");let n=j.createTypedArray(e,(e-2)*3);n[0]=0,n[1]=1,n[2]=2,e>3&&(n[3]=0,n[4]=2,n[5]=3);let s=6;for(let i=3;i<e-1;i+=2)n[s++]=i,n[s++]=i-1,n[s++]=i+1,i+2<e&&(n[s++]=i,n[s++]=i+1,n[s++]=i+2);return t.indices=n,t.primitiveType=D.TRIANGLES,t}function Pe(t){if(f(t.indices))return t;let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");if(e%2!==0)throw new I("The number of vertices must be a multiple of 2.");let n=j.createTypedArray(e,e);for(let s=0;s<e;++s)n[s]=s;return t.indices=n,t}function ge(t){let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");let n=j.createTypedArray(e,(e-1)*2);n[0]=0,n[1]=1;let s=2;for(let i=2;i<e;++i)n[s++]=i-1,n[s++]=i;return t.indices=n,t.primitiveType=D.LINES,t}function Oe(t){let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");let n=j.createTypedArray(e,e*2);n[0]=0,n[1]=1;let s=2;for(let i=2;i<e;++i)n[s++]=i-1,n[s++]=i;return n[s++]=e-1,n[s]=0,t.indices=n,t.primitiveType=D.LINES,t}function Le(t){switch(t.primitiveType){case D.TRIANGLE_FAN:return Ie(t);case D.TRIANGLE_STRIP:return Se(t);case D.TRIANGLES:return Ae(t);case D.LINE_STRIP:return ge(t);case D.LINE_LOOP:return Oe(t);case D.LINES:return Pe(t)}return t}function Q(t,e){Math.abs(t.y)<N.EPSILON6&&(e?t.y=-N.EPSILON6:t.y=N.EPSILON6)}function Ee(t,e,n){if(t.y!==0&&e.y!==0&&n.y!==0){Q(t,t.y<0),Q(e,e.y<0),Q(n,n.y<0);return}let s=Math.abs(t.y),i=Math.abs(e.y),c=Math.abs(n.y),o;s>i?s>c?o=N.sign(t.y):o=N.sign(n.y):i>c?o=N.sign(e.y):o=N.sign(n.y);let a=o<0;Q(t,a),Q(e,a),Q(n,a)}var ee=new r;function X(t,e,n,s){r.add(t,r.multiplyByScalar(r.subtract(e,t,ee),t.y/(t.y-e.y),ee),n),r.clone(n,s),Q(n,!0),Q(s,!1)}var et=new r,nt=new r,it=new r,st=new r,Vt={positions:new Array(7),indices:new Array(9)};function Ne(t,e,n){if(t.x>=0||e.x>=0||n.x>=0)return;Ee(t,e,n);let s=t.y<0,i=e.y<0,c=n.y<0,o=0;o+=s?1:0,o+=i?1:0,o+=c?1:0;let a=Vt.indices;o===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,s?(X(t,e,et,it),X(t,n,nt,st),a[0]=0,a[3]=1,a[4]=2,a[6]=1):i?(X(e,n,et,it),X(e,t,nt,st),a[0]=1,a[3]=2,a[4]=0,a[6]=2):c&&(X(n,t,et,it),X(n,e,nt,st),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):o===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,s?i?c||(X(n,t,et,it),X(n,e,nt,st),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(X(e,n,et,it),X(e,t,nt,st),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(X(t,e,et,it),X(t,n,nt,st),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let p=Vt.positions;return p[0]=t,p[1]=e,p[2]=n,p.length=3,(o===1||o===2)&&(p[3]=et,p[4]=nt,p[5]=it,p[6]=st,p.length=7),Vt}function ne(t,e){let n=t.attributes;if(n.position.values.length===0)return;for(let i in n)if(n.hasOwnProperty(i)&&f(n[i])&&f(n[i].values)){let c=n[i];c.values=F.createTypedArray(c.componentDatatype,c.values)}let s=B.computeNumberOfVertices(t);return t.indices=j.createTypedArray(s,t.indices),e&&(t.boundingSphere=ot.fromVertices(n.position.values)),t}function ut(t){let e=t.attributes,n={};for(let s in e)if(e.hasOwnProperty(s)&&f(e[s])&&f(e[s].values)){let i=e[s];n[s]=new U({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return new B({attributes:n,indices:[],primitiveType:t.primitiveType})}function Ft(t,e,n){let s=f(t.geometry.boundingSphere);e=ne(e,s),n=ne(n,s),f(n)&&!f(e)?t.geometry=n:!f(n)&&f(e)?t.geometry=e:(t.westHemisphereGeometry=e,t.eastHemisphereGeometry=n,t.geometry=void 0)}function kt(t,e){let n=new t,s=new t,i=new t;return function(c,o,a,p,u,d,m,l){let h=t.fromArray(u,c*e,n),y=t.fromArray(u,o*e,s),v=t.fromArray(u,a*e,i);t.multiplyByScalar(h,p.x,h),t.multiplyByScalar(y,p.y,y),t.multiplyByScalar(v,p.z,v);let b=t.add(h,y,h);t.add(b,v,b),l&&t.normalize(b,b),t.pack(b,d,m*e)}}var ze=kt(pt,4),At=kt(r,3),ae=kt(V,2),De=function(t,e,n,s,i,c,o){let a=i[t]*s.x,p=i[e]*s.y,u=i[n]*s.z;c[o]=a+p+u>N.EPSILON6?1:0},bt=new r,Gt=new r,Ct=new r,qe=new r;function xt(t,e,n,s,i,c,o,a,p,u,d,m,l,h,y,v){if(!f(c)&&!f(o)&&!f(a)&&!f(p)&&!f(u)&&h===0)return;let b=r.fromArray(i,t*3,bt),S=r.fromArray(i,e*3,Gt),x=r.fromArray(i,n*3,Ct),w=Ht(s,b,S,x,qe);if(f(w)){if(f(c)&&At(t,e,n,w,c,m.normal.values,v,!0),f(u)){let A=r.fromArray(u,t*3,bt),E=r.fromArray(u,e*3,Gt),P=r.fromArray(u,n*3,Ct);r.multiplyByScalar(A,w.x,A),r.multiplyByScalar(E,w.y,E),r.multiplyByScalar(P,w.z,P);let O;!r.equals(A,r.ZERO)||!r.equals(E,r.ZERO)||!r.equals(P,r.ZERO)?(O=r.add(A,E,A),r.add(O,P,O),r.normalize(O,O)):(O=bt,O.x=0,O.y=0,O.z=0),r.pack(O,m.extrudeDirection.values,v*3)}if(f(d)&&De(t,e,n,w,d,m.applyOffset.values,v),f(o)&&At(t,e,n,w,o,m.tangent.values,v,!0),f(a)&&At(t,e,n,w,a,m.bitangent.values,v,!0),f(p)&&ae(t,e,n,w,p,m.st.values,v),h>0)for(let A=0;A<h;A++){let E=l[A];Re(t,e,n,w,v,y[E],m[E])}}}function Re(t,e,n,s,i,c,o){let a=c.componentsPerAttribute,p=c.values,u=o.values;switch(a){case 4:ze(t,e,n,s,p,u,i,!1);break;case 3:At(t,e,n,s,p,u,i,!1);break;case 2:ae(t,e,n,s,p,u,i,!1);break;default:u[i]=p[t]*s.x+p[e]*s.y+p[n]*s.z}}function K(t,e,n,s,i,c){let o=t.position.values.length/3;if(i!==-1){let a=s[i],p=n[a];return p===-1?(n[a]=o,t.position.values.push(c.x,c.y,c.z),e.push(o),o):(e.push(p),p)}return t.position.values.push(c.x,c.y,c.z),e.push(o),o}var Ve={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function ie(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=f(n.normal)?n.normal.values:void 0,c=f(n.bitangent)?n.bitangent.values:void 0,o=f(n.tangent)?n.tangent.values:void 0,a=f(n.st)?n.st.values:void 0,p=f(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=f(n.applyOffset)?n.applyOffset.values:void 0,d=e.indices,m=[];for(let O in n)n.hasOwnProperty(O)&&!Ve[O]&&f(n[O])&&m.push(O);let l=m.length,h=ut(e),y=ut(e),v,b,S,x,w,A=[];A.length=s.length/3;let E=[];for(E.length=s.length/3,w=0;w<A.length;++w)A[w]=-1,E[w]=-1;let P=d.length;for(w=0;w<P;w+=3){let O=d[w],L=d[w+1],g=d[w+2],T=r.fromArray(s,O*3),C=r.fromArray(s,L*3),z=r.fromArray(s,g*3),q=Ne(T,C,z);if(f(q)&&q.positions.length>3){let R=q.positions,G=q.indices,M=G.length;for(let J=0;J<M;++J){let Y=G[J],_=R[Y];_.y<0?(v=y.attributes,b=y.indices,S=A):(v=h.attributes,b=h.indices,S=E),x=K(v,b,S,d,Y<3?w+Y:-1,_),xt(O,L,g,_,s,i,o,c,a,p,u,v,m,l,n,x)}}else f(q)&&(T=q.positions[0],C=q.positions[1],z=q.positions[2]),T.y<0?(v=y.attributes,b=y.indices,S=A):(v=h.attributes,b=h.indices,S=E),x=K(v,b,S,d,w,T),xt(O,L,g,T,s,i,o,c,a,p,u,v,m,l,n,x),x=K(v,b,S,d,w+1,C),xt(O,L,g,C,s,i,o,c,a,p,u,v,m,l,n,x),x=K(v,b,S,d,w+2,z),xt(O,L,g,z,s,i,o,c,a,p,u,v,m,l,n,x)}Ft(t,y,h)}var ue=Et.fromPointNormal(r.ZERO,r.UNIT_Y),Ge=new r,Ce=new r;function at(t,e,n,s,i,c,o){if(!f(o))return;let a=r.fromArray(s,t*3,bt);r.equalsEpsilon(a,n,N.EPSILON10)?c.applyOffset.values[i]=o[t]:c.applyOffset.values[i]=o[e]}function se(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=f(n.applyOffset)?n.applyOffset.values:void 0,c=e.indices,o=ut(e),a=ut(e),p,u=c.length,d=[];d.length=s.length/3;let m=[];for(m.length=s.length/3,p=0;p<d.length;++p)d[p]=-1,m[p]=-1;for(p=0;p<u;p+=2){let l=c[p],h=c[p+1],y=r.fromArray(s,l*3,bt),v=r.fromArray(s,h*3,Gt),b;Math.abs(y.y)<N.EPSILON6&&(y.y<0?y.y=-N.EPSILON6:y.y=N.EPSILON6),Math.abs(v.y)<N.EPSILON6&&(v.y<0?v.y=-N.EPSILON6:v.y=N.EPSILON6);let S=o.attributes,x=o.indices,w=m,A=a.attributes,E=a.indices,P=d,O=Lt.lineSegmentPlane(y,v,ue,Ct);if(f(O)){let L=r.multiplyByScalar(r.UNIT_Y,5*N.EPSILON9,Ge);y.y<0&&(r.negate(L,L),S=a.attributes,x=a.indices,w=d,A=o.attributes,E=o.indices,P=m);let g=r.add(O,L,Ce);b=K(S,x,w,c,p,y),at(l,h,y,s,b,S,i),b=K(S,x,w,c,-1,g),at(l,h,g,s,b,S,i),r.negate(L,L),r.add(O,L,g),b=K(A,E,P,c,-1,g),at(l,h,g,s,b,A,i),b=K(A,E,P,c,p+1,v),at(l,h,v,s,b,A,i)}else{let L,g,T;y.y<0?(L=a.attributes,g=a.indices,T=d):(L=o.attributes,g=o.indices,T=m),b=K(L,g,T,c,p,y),at(l,h,y,s,b,L,i),b=K(L,g,T,c,p+1,v),at(l,h,v,s,b,L,i)}}Ft(t,a,o)}var oe=new V,Be=new V,le=new r,fe=new r,Bt=new r,Fe=new r,ke=new r,Me=new r,re=new pt;function ce(t){let e=t.attributes,n=e.position.values,s=e.prevPosition.values,i=e.nextPosition.values,c=n.length;for(let o=0;o<c;o+=3){let a=r.unpack(n,o,le);if(a.x>0)continue;let p=r.unpack(s,o,fe);(a.y<0&&p.y>0||a.y>0&&p.y<0)&&(o-3>0?(s[o]=n[o-3],s[o+1]=n[o-2],s[o+2]=n[o-1]):r.pack(a,s,o));let u=r.unpack(i,o,Bt);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(o+3<c?(i[o]=n[o+3],i[o+1]=n[o+4],i[o+2]=n[o+5]):r.pack(a,i,o))}}var _e=5*N.EPSILON9,Tt=N.EPSILON6;function Ue(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=n.prevPosition.values,c=n.nextPosition.values,o=n.expandAndWidth.values,a=f(n.st)?n.st.values:void 0,p=f(n.color)?n.color.values:void 0,u=ut(e),d=ut(e),m,l,h,y=!1,v=s.length/3;for(m=0;m<v;m+=4){let b=m,S=m+2,x=r.fromArray(s,b*3,le),w=r.fromArray(s,S*3,fe);if(Math.abs(x.y)<Tt)for(x.y=Tt*(w.y<0?-1:1),s[m*3+1]=x.y,s[(m+1)*3+1]=x.y,l=b*3;l<b*3+12;l+=3)i[l]=s[m*3],i[l+1]=s[m*3+1],i[l+2]=s[m*3+2];if(Math.abs(w.y)<Tt)for(w.y=Tt*(x.y<0?-1:1),s[(m+2)*3+1]=w.y,s[(m+3)*3+1]=w.y,l=b*3;l<b*3+12;l+=3)c[l]=s[(m+2)*3],c[l+1]=s[(m+2)*3+1],c[l+2]=s[(m+2)*3+2];let A=u.attributes,E=u.indices,P=d.attributes,O=d.indices,L=Lt.lineSegmentPlane(x,w,ue,Fe);if(f(L)){y=!0;let g=r.multiplyByScalar(r.UNIT_Y,_e,ke);x.y<0&&(r.negate(g,g),A=d.attributes,E=d.indices,P=u.attributes,O=u.indices);let T=r.add(L,g,Me);A.position.values.push(x.x,x.y,x.z,x.x,x.y,x.z),A.position.values.push(T.x,T.y,T.z),A.position.values.push(T.x,T.y,T.z),A.prevPosition.values.push(i[b*3],i[b*3+1],i[b*3+2]),A.prevPosition.values.push(i[b*3+3],i[b*3+4],i[b*3+5]),A.prevPosition.values.push(x.x,x.y,x.z,x.x,x.y,x.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),r.negate(g,g),r.add(L,g,T),P.position.values.push(T.x,T.y,T.z),P.position.values.push(T.x,T.y,T.z),P.position.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.nextPosition.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.nextPosition.values.push(c[S*3],c[S*3+1],c[S*3+2]),P.nextPosition.values.push(c[S*3+3],c[S*3+4],c[S*3+5]);let C=V.fromArray(o,b*2,oe),z=Math.abs(C.y);A.expandAndWidth.values.push(-1,z,1,z),A.expandAndWidth.values.push(-1,-z,1,-z),P.expandAndWidth.values.push(-1,z,1,z),P.expandAndWidth.values.push(-1,-z,1,-z);let q=r.magnitudeSquared(r.subtract(L,x,Bt));if(q/=r.magnitudeSquared(r.subtract(w,x,Bt)),f(p)){let R=pt.fromArray(p,b*4,re),G=pt.fromArray(p,S*4,re),M=N.lerp(R.x,G.x,q),J=N.lerp(R.y,G.y,q),Y=N.lerp(R.z,G.z,q),_=N.lerp(R.w,G.w,q);for(l=b*4;l<b*4+8;++l)A.color.values.push(p[l]);for(A.color.values.push(M,J,Y,_),A.color.values.push(M,J,Y,_),P.color.values.push(M,J,Y,_),P.color.values.push(M,J,Y,_),l=S*4;l<S*4+8;++l)P.color.values.push(p[l])}if(f(a)){let R=V.fromArray(a,b*2,oe),G=V.fromArray(a,(m+3)*2,Be),M=N.lerp(R.x,G.x,q);for(l=b*2;l<b*2+4;++l)A.st.values.push(a[l]);for(A.st.values.push(M,R.y),A.st.values.push(M,G.y),P.st.values.push(M,R.y),P.st.values.push(M,G.y),l=S*2;l<S*2+4;++l)P.st.values.push(a[l])}h=A.position.values.length/3-4,E.push(h,h+2,h+1),E.push(h+1,h+2,h+3),h=P.position.values.length/3-4,O.push(h,h+2,h+1),O.push(h+1,h+2,h+3)}else{let g,T;for(x.y<0?(g=d.attributes,T=d.indices):(g=u.attributes,T=u.indices),g.position.values.push(x.x,x.y,x.z),g.position.values.push(x.x,x.y,x.z),g.position.values.push(w.x,w.y,w.z),g.position.values.push(w.x,w.y,w.z),l=m*3;l<m*3+12;++l)g.prevPosition.values.push(i[l]),g.nextPosition.values.push(c[l]);for(l=m*2;l<m*2+8;++l)g.expandAndWidth.values.push(o[l]),f(a)&&g.st.values.push(a[l]);if(f(p))for(l=m*4;l<m*4+16;++l)g.color.values.push(p[l]);h=g.position.values.length/3-4,T.push(h,h+2,h+1),T.push(h+1,h+2,h+3)}}y&&(ce(d),ce(u)),Ft(t,d,u)}k.splitLongitude=function(t){if(!f(t))throw new I("instance is required.");let e=t.geometry,n=e.boundingSphere;if(f(n)&&(n.center.x-n.radius>0||ot.intersectPlane(n,Et.ORIGIN_ZX_PLANE)!==Ut.INTERSECTING))return t;if(e.geometryType!==dt.NONE)switch(e.geometryType){case dt.POLYLINES:Ue(t);break;case dt.TRIANGLES:ie(t);break;case dt.LINES:se(t);break}else Le(e),e.primitiveType===D.TRIANGLES?ie(t):e.primitiveType===D.LINES&&se(t);return t};var Pn=k;export{Pn as a};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.139.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
|
+
|
|
26
|
+
import{a as b}from"./chunk-JJ24SU25.js";import{a as u}from"./chunk-3DKU5AMY.js";import{a as O}from"./chunk-DXDIQEOK.js";import{b as w,c as h,d as y}from"./chunk-XLJBHQML.js";import{c as l}from"./chunk-QROIA2H7.js";import{a as p}from"./chunk-PAML32O3.js";import{a as i,c as A}from"./chunk-OJH7UFER.js";import{a as d,b as c}from"./chunk-YSN2K4FT.js";import{e as x}from"./chunk-VAPRBQYE.js";var D=new i;function f(r){r=r??A.EMPTY_OBJECT;let o=r.minimum,m=r.maximum;if(c.typeOf.object("min",o),c.typeOf.object("max",m),x(r.offsetAttribute)&&r.offsetAttribute===b.TOP)throw new d("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");let a=r.vertexFormat??u.DEFAULT;this._minimum=i.clone(o),this._maximum=i.clone(m),this._vertexFormat=a,this._offsetAttribute=r.offsetAttribute,this._workerName="createBoxGeometry"}f.fromDimensions=function(r){r=r??A.EMPTY_OBJECT;let o=r.dimensions;c.typeOf.object("dimensions",o),c.typeOf.number.greaterThanOrEquals("dimensions.x",o.x,0),c.typeOf.number.greaterThanOrEquals("dimensions.y",o.y,0),c.typeOf.number.greaterThanOrEquals("dimensions.z",o.z,0);let m=i.multiplyByScalar(o,.5,new i);return new f({minimum:i.negate(m,new i),maximum:m,vertexFormat:r.vertexFormat,offsetAttribute:r.offsetAttribute})};f.fromAxisAlignedBoundingBox=function(r){return c.typeOf.object("boundingBox",r),new f({minimum:r.minimum,maximum:r.maximum})};f.packedLength=2*i.packedLength+u.packedLength+1;f.pack=function(r,o,m){return c.typeOf.object("value",r),c.defined("array",o),m=m??0,i.pack(r._minimum,o,m),i.pack(r._maximum,o,m+i.packedLength),u.pack(r._vertexFormat,o,m+2*i.packedLength),o[m+2*i.packedLength+u.packedLength]=r._offsetAttribute??-1,o};var _=new i,g=new i,k=new u,F={minimum:_,maximum:g,vertexFormat:k,offsetAttribute:void 0};f.unpack=function(r,o,m){c.defined("array",r),o=o??0;let a=i.unpack(r,o,_),s=i.unpack(r,o+i.packedLength,g),n=u.unpack(r,o+2*i.packedLength,k),e=r[o+2*i.packedLength+u.packedLength];return x(m)?(m._minimum=i.clone(a,m._minimum),m._maximum=i.clone(s,m._maximum),m._vertexFormat=u.clone(n,m._vertexFormat),m._offsetAttribute=e===-1?void 0:e,m):(F.offsetAttribute=e===-1?void 0:e,new f(F))};f.createGeometry=function(r){let o=r._minimum,m=r._maximum,a=r._vertexFormat;if(i.equals(o,m))return;let s=new O,n,e;if(a.position&&(a.st||a.normal||a.tangent||a.bitangent)){if(a.position&&(e=new Float64Array(72),e[0]=o.x,e[1]=o.y,e[2]=m.z,e[3]=m.x,e[4]=o.y,e[5]=m.z,e[6]=m.x,e[7]=m.y,e[8]=m.z,e[9]=o.x,e[10]=m.y,e[11]=m.z,e[12]=o.x,e[13]=o.y,e[14]=o.z,e[15]=m.x,e[16]=o.y,e[17]=o.z,e[18]=m.x,e[19]=m.y,e[20]=o.z,e[21]=o.x,e[22]=m.y,e[23]=o.z,e[24]=m.x,e[25]=o.y,e[26]=o.z,e[27]=m.x,e[28]=m.y,e[29]=o.z,e[30]=m.x,e[31]=m.y,e[32]=m.z,e[33]=m.x,e[34]=o.y,e[35]=m.z,e[36]=o.x,e[37]=o.y,e[38]=o.z,e[39]=o.x,e[40]=m.y,e[41]=o.z,e[42]=o.x,e[43]=m.y,e[44]=m.z,e[45]=o.x,e[46]=o.y,e[47]=m.z,e[48]=o.x,e[49]=m.y,e[50]=o.z,e[51]=m.x,e[52]=m.y,e[53]=o.z,e[54]=m.x,e[55]=m.y,e[56]=m.z,e[57]=o.x,e[58]=m.y,e[59]=m.z,e[60]=o.x,e[61]=o.y,e[62]=o.z,e[63]=m.x,e[64]=o.y,e[65]=o.z,e[66]=m.x,e[67]=o.y,e[68]=m.z,e[69]=o.x,e[70]=o.y,e[71]=m.z,s.position=new y({componentDatatype:p.DOUBLE,componentsPerAttribute:3,values:e})),a.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,s.normal=new y({componentDatatype:p.FLOAT,componentsPerAttribute:3,values:t})}if(a.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,s.st=new y({componentDatatype:p.FLOAT,componentsPerAttribute:2,values:t})}if(a.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,s.tangent=new y({componentDatatype:p.FLOAT,componentsPerAttribute:3,values:t})}if(a.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,s.bitangent=new y({componentDatatype:p.FLOAT,componentsPerAttribute:3,values:t})}n=new Uint16Array(36),n[0]=0,n[1]=1,n[2]=2,n[3]=0,n[4]=2,n[5]=3,n[6]=6,n[7]=5,n[8]=4,n[9]=7,n[10]=6,n[11]=4,n[12]=8,n[13]=9,n[14]=10,n[15]=8,n[16]=10,n[17]=11,n[18]=14,n[19]=13,n[20]=12,n[21]=15,n[22]=14,n[23]=12,n[24]=18,n[25]=17,n[26]=16,n[27]=19,n[28]=18,n[29]=16,n[30]=20,n[31]=21,n[32]=22,n[33]=20,n[34]=22,n[35]=23}else e=new Float64Array(24),e[0]=o.x,e[1]=o.y,e[2]=o.z,e[3]=m.x,e[4]=o.y,e[5]=o.z,e[6]=m.x,e[7]=m.y,e[8]=o.z,e[9]=o.x,e[10]=m.y,e[11]=o.z,e[12]=o.x,e[13]=o.y,e[14]=m.z,e[15]=m.x,e[16]=o.y,e[17]=m.z,e[18]=m.x,e[19]=m.y,e[20]=m.z,e[21]=o.x,e[22]=m.y,e[23]=m.z,s.position=new y({componentDatatype:p.DOUBLE,componentsPerAttribute:3,values:e}),n=new Uint16Array(36),n[0]=4,n[1]=5,n[2]=6,n[3]=4,n[4]=6,n[5]=7,n[6]=1,n[7]=0,n[8]=3,n[9]=1,n[10]=3,n[11]=2,n[12]=1,n[13]=6,n[14]=5,n[15]=1,n[16]=2,n[17]=6,n[18]=2,n[19]=3,n[20]=7,n[21]=2,n[22]=7,n[23]=6,n[24]=3,n[25]=0,n[26]=4,n[27]=3,n[28]=4,n[29]=7,n[30]=0,n[31]=1,n[32]=5,n[33]=0,n[34]=5,n[35]=4;let v=i.subtract(m,o,D),L=i.magnitude(v)*.5;if(x(r._offsetAttribute)){let t=e.length,T=r._offsetAttribute===b.NONE?0:1,E=new Uint8Array(t/3).fill(T);s.applyOffset=new y({componentDatatype:p.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}return new h({attributes:s,indices:n,primitiveType:w.TRIANGLES,boundingSphere:new l(i.ZERO,L),offsetAttribute:r._offsetAttribute})};var z;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,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.139.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
|
+
|
|
26
|
+
import{a as st}from"./chunk-IFBNVX3N.js";import{b as xt,c as ht,d as et}from"./chunk-XLJBHQML.js";import{a as tt}from"./chunk-PAML32O3.js";import{a as ft}from"./chunk-3ULTL2FZ.js";import{a as Y,b as g,c as gt}from"./chunk-3MO6V622.js";import{a as h}from"./chunk-OJH7UFER.js";import{a as X}from"./chunk-6J7K26F7.js";import{b as A}from"./chunk-YSN2K4FT.js";import{e as F}from"./chunk-VAPRBQYE.js";var ct={CLOCKWISE:ft.CW,COUNTER_CLOCKWISE:ft.CCW};ct.validate=function(t){return t===ct.CLOCKWISE||t===ct.COUNTER_CLOCKWISE};var at=Object.freeze(ct);function mt(t,n,e=2){let o=n&&n.length,r=o?n[0]*e:t.length,s=wt(t,0,r,e,!0),i=[];if(!s||s.next===s.prev)return i;let c,x,u;if(o&&(s=It(t,n,s,e)),t.length>80*e){c=t[0],x=t[1];let p=c,y=x;for(let b=e;b<r;b+=e){let S=t[b],a=t[b+1];S<c&&(c=S),a<x&&(x=a),S>p&&(p=S),a>y&&(y=a)}u=Math.max(p-c,y-x),u=u!==0?32767/u:0}return rt(s,i,e,c,x,u,0),i}function wt(t,n,e,o,r){let s;if(r===Vt(t,n,e,o)>0)for(let i=n;i<e;i+=o)s=vt(i/o|0,t[i],t[i+1],s);else for(let i=e-o;i>=n;i-=o)s=vt(i/o|0,t[i],t[i+1],s);return s&&K(s,s.next)&&(ot(s),s=s.next),s}function N(t,n){if(!t)return t;n||(n=t);let e=t,o;do if(o=!1,!e.steiner&&(K(e,e.next)||w(e.prev,e,e.next)===0)){if(ot(e),e=n=e.prev,e===e.next)break;o=!0}else e=e.next;while(o||e!==n);return n}function rt(t,n,e,o,r,s,i){if(!t)return;!i&&s&&Nt(t,o,r,s);let c=t;for(;t.prev!==t.next;){let x=t.prev,u=t.next;if(s?Rt(t,o,r,s):Pt(t)){n.push(x.i,t.i,u.i),ot(t),t=u.next,c=u.next;continue}if(t=u,t===c){i?i===1?(t=zt(N(t),n),rt(t,n,e,o,r,s,2)):i===2&&Bt(t,n,e,o,r,s):rt(N(t),n,e,o,r,s,1);break}}}function Pt(t){let n=t.prev,e=t,o=t.next;if(w(n,e,o)>=0)return!1;let r=n.x,s=e.x,i=o.x,c=n.y,x=e.y,u=o.y,p=Math.min(r,s,i),y=Math.min(c,x,u),b=Math.max(r,s,i),S=Math.max(c,x,u),a=o.next;for(;a!==n;){if(a.x>=p&&a.x<=b&&a.y>=y&&a.y<=S&&nt(r,c,s,x,i,u,a.x,a.y)&&w(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function Rt(t,n,e,o){let r=t.prev,s=t,i=t.next;if(w(r,s,i)>=0)return!1;let c=r.x,x=s.x,u=i.x,p=r.y,y=s.y,b=i.y,S=Math.min(c,x,u),a=Math.min(p,y,b),T=Math.max(c,x,u),L=Math.max(p,y,b),z=pt(S,a,n,e,o),D=pt(T,L,n,e,o),l=t.prevZ,f=t.nextZ;for(;l&&l.z>=z&&f&&f.z<=D;){if(l.x>=S&&l.x<=T&&l.y>=a&&l.y<=L&&l!==r&&l!==i&&nt(c,p,x,y,u,b,l.x,l.y)&&w(l.prev,l,l.next)>=0||(l=l.prevZ,f.x>=S&&f.x<=T&&f.y>=a&&f.y<=L&&f!==r&&f!==i&&nt(c,p,x,y,u,b,f.x,f.y)&&w(f.prev,f,f.next)>=0))return!1;f=f.nextZ}for(;l&&l.z>=z;){if(l.x>=S&&l.x<=T&&l.y>=a&&l.y<=L&&l!==r&&l!==i&&nt(c,p,x,y,u,b,l.x,l.y)&&w(l.prev,l,l.next)>=0)return!1;l=l.prevZ}for(;f&&f.z<=D;){if(f.x>=S&&f.x<=T&&f.y>=a&&f.y<=L&&f!==r&&f!==i&&nt(c,p,x,y,u,b,f.x,f.y)&&w(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function zt(t,n){let e=t;do{let o=e.prev,r=e.next.next;!K(o,r)&&bt(o,e,e.next,r)&&it(o,r)&&it(r,o)&&(n.push(o.i,e.i,r.i),ot(e),ot(e.next),e=t=r),e=e.next}while(e!==t);return N(e)}function Bt(t,n,e,o,r,s){let i=t;do{let c=i.next.next;for(;c!==i.prev;){if(i.i!==c.i&&_t(i,c)){let x=Mt(i,c);i=N(i,i.next),x=N(x,x.next),rt(i,n,e,o,r,s,0),rt(x,n,e,o,r,s,0);return}c=c.next}i=i.next}while(i!==t)}function It(t,n,e,o){let r=[];for(let s=0,i=n.length;s<i;s++){let c=n[s]*o,x=s<i-1?n[s+1]*o:t.length,u=wt(t,c,x,o,!1);u===u.next&&(u.steiner=!0),r.push(Ut(u))}r.sort(Wt);for(let s=0;s<r.length;s++)e=$t(r[s],e);return e}function Wt(t,n){let e=t.x-n.x;if(e===0&&(e=t.y-n.y,e===0)){let o=(t.next.y-t.y)/(t.next.x-t.x),r=(n.next.y-n.y)/(n.next.x-n.x);e=o-r}return e}function $t(t,n){let e=Gt(t,n);if(!e)return n;let o=Mt(e,t);return N(o,o.next),N(e,e.next)}function Gt(t,n){let e=n,o=t.x,r=t.y,s=-1/0,i;if(K(t,e))return e;do{if(K(t,e.next))return e.next;if(r<=e.y&&r>=e.next.y&&e.next.y!==e.y){let y=e.x+(r-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(y<=o&&y>s&&(s=y,i=e.x<e.next.x?e:e.next,y===o))return i}e=e.next}while(e!==n);if(!i)return null;let c=i,x=i.x,u=i.y,p=1/0;e=i;do{if(o>=e.x&&e.x>=x&&o!==e.x&&St(r<u?o:s,r,x,u,r<u?s:o,r,e.x,e.y)){let y=Math.abs(r-e.y)/(o-e.x);it(e,t)&&(y<p||y===p&&(e.x>i.x||e.x===i.x&&Ht(i,e)))&&(i=e,p=y)}e=e.next}while(e!==c);return i}function Ht(t,n){return w(t.prev,t,n.prev)<0&&w(n.next,t,t.next)<0}function Nt(t,n,e,o){let r=t;do r.z===0&&(r.z=pt(r.x,r.y,n,e,o)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,kt(r)}function kt(t){let n,e=1;do{let o=t,r;t=null;let s=null;for(n=0;o;){n++;let i=o,c=0;for(let u=0;u<e&&(c++,i=i.nextZ,!!i);u++);let x=e;for(;c>0||x>0&&i;)c!==0&&(x===0||!i||o.z<=i.z)?(r=o,o=o.nextZ,c--):(r=i,i=i.nextZ,x--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;o=i}s.nextZ=null,e*=2}while(n>1);return t}function pt(t,n,e,o,r){return t=(t-e)*r|0,n=(n-o)*r|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,t|n<<1}function Ut(t){let n=t,e=t;do(n.x<e.x||n.x===e.x&&n.y<e.y)&&(e=n),n=n.next;while(n!==t);return e}function St(t,n,e,o,r,s,i,c){return(r-i)*(n-c)>=(t-i)*(s-c)&&(t-i)*(o-c)>=(e-i)*(n-c)&&(e-i)*(s-c)>=(r-i)*(o-c)}function nt(t,n,e,o,r,s,i,c){return!(t===i&&n===c)&&St(t,n,e,o,r,s,i,c)}function _t(t,n){return t.next.i!==n.i&&t.prev.i!==n.i&&!Kt(t,n)&&(it(t,n)&&it(n,t)&&jt(t,n)&&(w(t.prev,t,n.prev)||w(t,n.prev,n))||K(t,n)&&w(t.prev,t,t.next)>0&&w(n.prev,n,n.next)>0)}function w(t,n,e){return(n.y-t.y)*(e.x-n.x)-(n.x-t.x)*(e.y-n.y)}function K(t,n){return t.x===n.x&&t.y===n.y}function bt(t,n,e,o){let r=lt(w(t,n,e)),s=lt(w(t,n,o)),i=lt(w(e,o,t)),c=lt(w(e,o,n));return!!(r!==s&&i!==c||r===0&&ut(t,e,n)||s===0&&ut(t,o,n)||i===0&&ut(e,t,o)||c===0&&ut(e,n,o))}function ut(t,n,e){return n.x<=Math.max(t.x,e.x)&&n.x>=Math.min(t.x,e.x)&&n.y<=Math.max(t.y,e.y)&&n.y>=Math.min(t.y,e.y)}function lt(t){return t>0?1:t<0?-1:0}function Kt(t,n){let e=t;do{if(e.i!==t.i&&e.next.i!==t.i&&e.i!==n.i&&e.next.i!==n.i&&bt(e,e.next,t,n))return!0;e=e.next}while(e!==t);return!1}function it(t,n){return w(t.prev,t,t.next)<0?w(t,n,t.next)>=0&&w(t,t.prev,n)>=0:w(t,n,t.prev)<0||w(t,t.next,n)<0}function jt(t,n){let e=t,o=!1,r=(t.x+n.x)/2,s=(t.y+n.y)/2;do e.y>s!=e.next.y>s&&e.next.y!==e.y&&r<(e.next.x-e.x)*(s-e.y)/(e.next.y-e.y)+e.x&&(o=!o),e=e.next;while(e!==t);return o}function Mt(t,n){let e=yt(t.i,t.x,t.y),o=yt(n.i,n.x,n.y),r=t.next,s=n.prev;return t.next=n,n.prev=t,e.next=r,r.prev=e,o.next=e,e.prev=o,s.next=o,o.prev=s,o}function vt(t,n,e,o){let r=yt(t,n,e);return o?(r.next=o.next,r.prev=o,o.next.prev=r,o.next=r):(r.prev=r,r.next=r),r}function ot(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function yt(t,n,e){return{i:t,x:n,y:e,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Vt(t,n,e,o){let r=0;for(let s=n,i=e-o;s<e;s+=o)r+=(t[i]-t[s])*(t[s+1]+t[i+1]),i=s;return r}var qt=new h,Jt=new h,B={};B.computeArea2D=function(t){A.defined("positions",t),A.typeOf.number.greaterThanOrEquals("positions.length",t.length,3);let n=t.length,e=0;for(let o=n-1,r=0;r<n;o=r++){let s=t[o],i=t[r];e+=s.x*i.y-i.x*s.y}return e*.5};B.computeWindingOrder2D=function(t){return B.computeArea2D(t)>0?at.COUNTER_CLOCKWISE:at.CLOCKWISE};B.triangulate=function(t,n){A.defined("positions",t);let e=g.packArray(t);return mt(e,n,2)};var Tt=new h,Ot=new h,Zt=new h,At=new h,Ct=new h,Et=new h,R=new h,Lt=new g,Ft=new g,Dt=new g,j=new g;B.computeSubdivision=function(t,n,e,o,r){r=r??X.RADIANS_PER_DEGREE;let s=F(o);A.typeOf.object("ellipsoid",t),A.defined("positions",n),A.defined("indices",e),A.typeOf.number.greaterThanOrEquals("indices.length",e.length,3),A.typeOf.number.equals("indices.length % 3","0",e.length%3,0),A.typeOf.number.greaterThan("granularity",r,0);let i=e.slice(0),c,x=n.length,u=new Array(x*3),p=new Array(x*2),y=0,b=0;for(c=0;c<x;c++){let l=n[c];if(u[y++]=l.x,u[y++]=l.y,u[y++]=l.z,s){let f=o[c];p[b++]=f.x,p[b++]=f.y}}let S=[],a={},T=t.maximumRadius,L=X.chordLength(r,T),z=L*L;for(;i.length>0;){let l=i.pop(),f=i.pop(),m=i.pop(),M=h.fromArray(u,m*3,Tt),C=h.fromArray(u,f*3,Ot),V=h.fromArray(u,l*3,Zt),q,J,I;s&&(q=g.fromArray(p,m*2,Lt),J=g.fromArray(p,f*2,Ft),I=g.fromArray(p,l*2,Dt));let k=h.multiplyByScalar(h.normalize(M,At),T,At),U=h.multiplyByScalar(h.normalize(C,Ct),T,Ct),W=h.multiplyByScalar(h.normalize(V,Et),T,Et),$=h.magnitudeSquared(h.subtract(k,U,R)),G=h.magnitudeSquared(h.subtract(U,W,R)),Q=h.magnitudeSquared(h.subtract(W,k,R)),H=Math.max($,G,Q),O,v,d;H>z?$===H?(O=`${Math.min(m,f)} ${Math.max(m,f)}`,c=a[O],F(c)||(v=h.add(M,C,R),h.multiplyByScalar(v,.5,v),u.push(v.x,v.y,v.z),c=u.length/3-1,a[O]=c,s&&(d=g.add(q,J,j),g.multiplyByScalar(d,.5,d),p.push(d.x,d.y))),i.push(m,c,l),i.push(c,f,l)):G===H?(O=`${Math.min(f,l)} ${Math.max(f,l)}`,c=a[O],F(c)||(v=h.add(C,V,R),h.multiplyByScalar(v,.5,v),u.push(v.x,v.y,v.z),c=u.length/3-1,a[O]=c,s&&(d=g.add(J,I,j),g.multiplyByScalar(d,.5,d),p.push(d.x,d.y))),i.push(f,c,m),i.push(c,l,m)):Q===H&&(O=`${Math.min(l,m)} ${Math.max(l,m)}`,c=a[O],F(c)||(v=h.add(V,M,R),h.multiplyByScalar(v,.5,v),u.push(v.x,v.y,v.z),c=u.length/3-1,a[O]=c,s&&(d=g.add(I,q,j),g.multiplyByScalar(d,.5,d),p.push(d.x,d.y))),i.push(l,c,f),i.push(c,m,f)):(S.push(m),S.push(f),S.push(l))}let D={attributes:{position:new et({componentDatatype:tt.DOUBLE,componentsPerAttribute:3,values:u})},indices:S,primitiveType:xt.TRIANGLES};return s&&(D.attributes.st=new et({componentDatatype:tt.FLOAT,componentsPerAttribute:2,values:p})),new ht(D)};var Qt=new Y,Xt=new Y,Yt=new Y,dt=new Y;B.computeRhumbLineSubdivision=function(t,n,e,o,r){r=r??X.RADIANS_PER_DEGREE;let s=F(o);A.typeOf.object("ellipsoid",t),A.defined("positions",n),A.defined("indices",e),A.typeOf.number.greaterThanOrEquals("indices.length",e.length,3),A.typeOf.number.equals("indices.length % 3","0",e.length%3,0),A.typeOf.number.greaterThan("granularity",r,0);let i=e.slice(0),c,x=n.length,u=new Array(x*3),p=new Array(x*2),y=0,b=0;for(c=0;c<x;c++){let m=n[c];if(u[y++]=m.x,u[y++]=m.y,u[y++]=m.z,s){let M=o[c];p[b++]=M.x,p[b++]=M.y}}let S=[],a={},T=t.maximumRadius,L=X.chordLength(r,T),z=new st(void 0,void 0,t),D=new st(void 0,void 0,t),l=new st(void 0,void 0,t);for(;i.length>0;){let m=i.pop(),M=i.pop(),C=i.pop(),V=h.fromArray(u,C*3,Tt),q=h.fromArray(u,M*3,Ot),J=h.fromArray(u,m*3,Zt),I,k,U;s&&(I=g.fromArray(p,C*2,Lt),k=g.fromArray(p,M*2,Ft),U=g.fromArray(p,m*2,Dt));let W=t.cartesianToCartographic(V,Qt),$=t.cartesianToCartographic(q,Xt),G=t.cartesianToCartographic(J,Yt);z.setEndPoints(W,$);let Q=z.surfaceDistance;D.setEndPoints($,G);let H=D.surfaceDistance;l.setEndPoints(G,W);let O=l.surfaceDistance,v=Math.max(Q,H,O),d,P,_,Z,E;v>L?Q===v?(d=`${Math.min(C,M)} ${Math.max(C,M)}`,c=a[d],F(c)||(P=z.interpolateUsingFraction(.5,dt),_=(W.height+$.height)*.5,Z=h.fromRadians(P.longitude,P.latitude,_,t,R),u.push(Z.x,Z.y,Z.z),c=u.length/3-1,a[d]=c,s&&(E=g.add(I,k,j),g.multiplyByScalar(E,.5,E),p.push(E.x,E.y))),i.push(C,c,m),i.push(c,M,m)):H===v?(d=`${Math.min(M,m)} ${Math.max(M,m)}`,c=a[d],F(c)||(P=D.interpolateUsingFraction(.5,dt),_=($.height+G.height)*.5,Z=h.fromRadians(P.longitude,P.latitude,_,t,R),u.push(Z.x,Z.y,Z.z),c=u.length/3-1,a[d]=c,s&&(E=g.add(k,U,j),g.multiplyByScalar(E,.5,E),p.push(E.x,E.y))),i.push(M,c,C),i.push(c,m,C)):O===v&&(d=`${Math.min(m,C)} ${Math.max(m,C)}`,c=a[d],F(c)||(P=l.interpolateUsingFraction(.5,dt),_=(G.height+W.height)*.5,Z=h.fromRadians(P.longitude,P.latitude,_,t,R),u.push(Z.x,Z.y,Z.z),c=u.length/3-1,a[d]=c,s&&(E=g.add(U,I,j),g.multiplyByScalar(E,.5,E),p.push(E.x,E.y))),i.push(m,c,M),i.push(c,C,M)):(S.push(C),S.push(M),S.push(m))}let f={attributes:{position:new et({componentDatatype:tt.DOUBLE,componentsPerAttribute:3,values:u})},indices:S,primitiveType:xt.TRIANGLES};return s&&(f.attributes.st=new et({componentDatatype:tt.FLOAT,componentsPerAttribute:2,values:p})),new ht(f)};B.scaleToGeodeticHeight=function(t,n,e,o){e=e??gt.default;let r=qt,s=Jt;if(n=n??0,o=o??!0,F(t)){let i=t.length;for(let c=0;c<i;c+=3)h.fromArray(t,c,s),o&&(s=e.scaleToGeodeticSurface(s,s)),n!==0&&(r=e.geodeticSurfaceNormal(s,r),h.multiplyByScalar(r,n,r),h.add(s,r,s)),t[c]=s.x,t[c+1]=s.y,t[c+2]=s.z}return t};var de=B;export{at as a,de as b};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.139.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
|
+
|
|
26
|
+
import{a as C}from"./chunk-IR47TAV5.js";import{a as P}from"./chunk-OHMLE6SB.js";import{a as L}from"./chunk-3MO6V622.js";import{a as O}from"./chunk-OJH7UFER.js";import{a as y}from"./chunk-6J7K26F7.js";import{e as S}from"./chunk-VAPRBQYE.js";var T={};function b(a,e){return y.equalsEpsilon(a.latitude,e.latitude,y.EPSILON10)&&y.equalsEpsilon(a.longitude,e.longitude,y.EPSILON10)}var q=new L,v=new L;function w(a,e,i,h){e=P(e,O.equalsEpsilon);let p=e.length;if(p<2)return;let E=S(h),u=S(i),l=new Array(p),g=new Array(p),r=new Array(p),d=e[0];l[0]=d;let f=a.cartesianToCartographic(d,q);u&&(f.height=i[0]),g[0]=f.height,E?r[0]=h[0]:r[0]=0;let o=g[0],m=r[0],t=o===m,n=1;for(let c=1;c<p;++c){let A=e[c],s=a.cartesianToCartographic(A,v);u&&(s.height=i[c]),t=t&&s.height===0,b(f,s)?f.height<s.height&&(g[n-1]=s.height):(l[n]=A,g[n]=s.height,E?r[n]=h[c]:r[n]=0,t=t&&g[n]===r[n],L.clone(s,f),++n)}if(!(t||n<2))return l.length=n,g.length=n,r.length=n,{positions:l,topHeights:g,bottomHeights:r}}var D=new Array(2),F=new Array(2),B={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};T.computePositions=function(a,e,i,h,p,E){let u=w(a,e,i,h);if(!S(u))return;e=u.positions,i=u.topHeights,h=u.bottomHeights;let l=e.length,g=l-2,r,d,f=y.chordLength(p,a.maximumRadius),o=B;if(o.minDistance=f,o.ellipsoid=a,E){let m=0,t;for(t=0;t<l-1;t++)m+=C.numberOfPoints(e[t],e[t+1],f)+1;r=new Float64Array(m*3),d=new Float64Array(m*3);let n=D,c=F;o.positions=n,o.height=c;let A=0;for(t=0;t<l-1;t++){n[0]=e[t],n[1]=e[t+1],c[0]=i[t],c[1]=i[t+1];let s=C.generateArc(o);r.set(s,A),c[0]=h[t],c[1]=h[t+1],d.set(C.generateArc(o),A),A+=s.length}}else o.positions=e,o.height=i,r=new Float64Array(C.generateArc(o)),o.height=h,d=new Float64Array(C.generateArc(o));return{bottomPositions:d,topPositions:r,numCorners:g}};var j=T;export{j as a};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.139.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
|
+
|
|
26
|
+
import{a as C}from"./chunk-6J7K26F7.js";import{b as g}from"./chunk-YSN2K4FT.js";import{e as f}from"./chunk-VAPRBQYE.js";var d=C.EPSILON10;function x(e,r,h,n){if(g.defined("equalsEpsilon",r),!f(e))return;h=h??!1;let c=f(n),l=e.length;if(l<2)return e;let i,s=e[0],o,t,p=0,m=-1;for(i=1;i<l;++i)o=e[i],r(s,o,d)?(f(t)||(t=e.slice(0,i),p=i-1,m=0),c&&n.push(i)):(f(t)&&(t.push(o),p=i,c&&(m=n.length)),s=o);return h&&r(e[0],e[l-1],d)&&(c&&(f(t)?n.splice(m,0,p):n.push(l-1)),f(t)?t.length-=1:t=e.slice(0,-1)),f(t)?t:e}var k=x;export{k as a};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.139.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
|
+
|
|
26
|
+
import{a as E}from"./chunk-6J7K26F7.js";import{a as S,b as y}from"./chunk-YSN2K4FT.js";import{e as z}from"./chunk-VAPRBQYE.js";var m=class o{constructor(n,c,e){this.x=n??0,this.y=c??0,this.z=e??0}static fromSpherical(n,c){y.typeOf.object("spherical",n),z(c)||(c=new o);let e=n.clock,t=n.cone,f=n.magnitude??1,O=f*Math.sin(t);return c.x=O*Math.cos(e),c.y=O*Math.sin(e),c.z=f*Math.cos(t),c}static fromElements(n,c,e,t){return z(t)?(t.x=n,t.y=c,t.z=e,t):new o(n,c,e)}static clone(n,c){if(z(n))return z(c)?(c.x=n.x,c.y=n.y,c.z=n.z,c):new o(n.x,n.y,n.z)}static pack(n,c,e){return y.typeOf.object("value",n),y.defined("array",c),e=e??0,c[e++]=n.x,c[e++]=n.y,c[e]=n.z,c}static unpack(n,c,e){return y.defined("array",n),c=c??0,z(e)||(e=new o),e.x=n[c++],e.y=n[c++],e.z=n[c],e}static packArray(n,c){y.defined("array",n);let e=n.length,t=e*3;if(!z(c))c=new Array(t);else{if(!Array.isArray(c)&&c.length!==t)throw new S("If result is a typed array, it must have exactly array.length * 3 elements");c.length!==t&&(c.length=t)}for(let f=0;f<e;++f)o.pack(n[f],c,f*3);return c}static unpackArray(n,c){if(y.defined("array",n),y.typeOf.number.greaterThanOrEquals("array.length",n.length,3),n.length%3!==0)throw new S("array length must be a multiple of 3.");let e=n.length;z(c)?c.length=e/3:c=new Array(e/3);for(let t=0;t<e;t+=3){let f=t/3;c[f]=o.unpack(n,t,c[f])}return c}static maximumComponent(n){return y.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z)}static minimumComponent(n){return y.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z)}static minimumByComponent(n,c,e){return y.typeOf.object("first",n),y.typeOf.object("second",c),y.typeOf.object("result",e),e.x=Math.min(n.x,c.x),e.y=Math.min(n.y,c.y),e.z=Math.min(n.z,c.z),e}static maximumByComponent(n,c,e){return y.typeOf.object("first",n),y.typeOf.object("second",c),y.typeOf.object("result",e),e.x=Math.max(n.x,c.x),e.y=Math.max(n.y,c.y),e.z=Math.max(n.z,c.z),e}static clamp(n,c,e,t){y.typeOf.object("value",n),y.typeOf.object("min",c),y.typeOf.object("max",e),y.typeOf.object("result",t);let f=E.clamp(n.x,c.x,e.x),O=E.clamp(n.y,c.y,e.y),b=E.clamp(n.z,c.z,e.z);return t.x=f,t.y=O,t.z=b,t}static magnitudeSquared(n){return y.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z}static magnitude(n){return Math.sqrt(o.magnitudeSquared(n))}static distance(n,c){return y.typeOf.object("left",n),y.typeOf.object("right",c),o.subtract(n,c,k),o.magnitude(k)}static distanceSquared(n,c){return y.typeOf.object("left",n),y.typeOf.object("right",c),o.subtract(n,c,k),o.magnitudeSquared(k)}static normalize(n,c){y.typeOf.object("cartesian",n),y.typeOf.object("result",c);let e=o.magnitude(n);if(c.x=n.x/e,c.y=n.y/e,c.z=n.z/e,isNaN(c.x)||isNaN(c.y)||isNaN(c.z))throw new S("normalized result is not a number");return c}static dot(n,c){return y.typeOf.object("left",n),y.typeOf.object("right",c),n.x*c.x+n.y*c.y+n.z*c.z}static multiplyComponents(n,c,e){return y.typeOf.object("left",n),y.typeOf.object("right",c),y.typeOf.object("result",e),e.x=n.x*c.x,e.y=n.y*c.y,e.z=n.z*c.z,e}static divideComponents(n,c,e){return y.typeOf.object("left",n),y.typeOf.object("right",c),y.typeOf.object("result",e),e.x=n.x/c.x,e.y=n.y/c.y,e.z=n.z/c.z,e}static add(n,c,e){return y.typeOf.object("left",n),y.typeOf.object("right",c),y.typeOf.object("result",e),e.x=n.x+c.x,e.y=n.y+c.y,e.z=n.z+c.z,e}static subtract(n,c,e){return y.typeOf.object("left",n),y.typeOf.object("right",c),y.typeOf.object("result",e),e.x=n.x-c.x,e.y=n.y-c.y,e.z=n.z-c.z,e}static multiplyByScalar(n,c,e){return y.typeOf.object("cartesian",n),y.typeOf.number("scalar",c),y.typeOf.object("result",e),e.x=n.x*c,e.y=n.y*c,e.z=n.z*c,e}static divideByScalar(n,c,e){return y.typeOf.object("cartesian",n),y.typeOf.number("scalar",c),y.typeOf.object("result",e),e.x=n.x/c,e.y=n.y/c,e.z=n.z/c,e}static negate(n,c){return y.typeOf.object("cartesian",n),y.typeOf.object("result",c),c.x=-n.x,c.y=-n.y,c.z=-n.z,c}static abs(n,c){return y.typeOf.object("cartesian",n),y.typeOf.object("result",c),c.x=Math.abs(n.x),c.y=Math.abs(n.y),c.z=Math.abs(n.z),c}static lerp(n,c,e,t){return y.typeOf.object("start",n),y.typeOf.object("end",c),y.typeOf.number("t",e),y.typeOf.object("result",t),o.multiplyByScalar(c,e,P),t=o.multiplyByScalar(n,1-e,t),o.add(P,t,t)}static angleBetween(n,c){y.typeOf.object("left",n),y.typeOf.object("right",c),o.normalize(n,U),o.normalize(c,L);let e=o.dot(U,L),t=o.magnitude(o.cross(U,L,U));return Math.atan2(t,e)}static mostOrthogonalAxis(n,c){y.typeOf.object("cartesian",n),y.typeOf.object("result",c);let e=o.normalize(n,H);return o.abs(e,e),e.x<=e.y?e.x<=e.z?c=o.clone(o.UNIT_X,c):c=o.clone(o.UNIT_Z,c):e.y<=e.z?c=o.clone(o.UNIT_Y,c):c=o.clone(o.UNIT_Z,c),c}static projectVector(n,c,e){y.defined("a",n),y.defined("b",c),y.defined("result",e);let t=o.dot(n,c)/o.dot(c,c);return o.multiplyByScalar(c,t,e)}static equals(n,c){return n===c||z(n)&&z(c)&&n.x===c.x&&n.y===c.y&&n.z===c.z}static equalsArray(n,c,e){return n.x===c[e]&&n.y===c[e+1]&&n.z===c[e+2]}static equalsEpsilon(n,c,e,t){return n===c||z(n)&&z(c)&&E.equalsEpsilon(n.x,c.x,e,t)&&E.equalsEpsilon(n.y,c.y,e,t)&&E.equalsEpsilon(n.z,c.z,e,t)}static cross(n,c,e){y.typeOf.object("left",n),y.typeOf.object("right",c),y.typeOf.object("result",e);let t=n.x,f=n.y,O=n.z,b=c.x,j=c.y,h=c.z,w=f*h-O*j,M=O*b-t*h,d=t*j-f*b;return e.x=w,e.y=M,e.z=d,e}static midpoint(n,c,e){return y.typeOf.object("left",n),y.typeOf.object("right",c),y.typeOf.object("result",e),e.x=(n.x+c.x)*.5,e.y=(n.y+c.y)*.5,e.z=(n.z+c.z)*.5,e}static fromDegrees(n,c,e,t,f){return y.typeOf.number("longitude",n),y.typeOf.number("latitude",c),n=E.toRadians(n),c=E.toRadians(c),o.fromRadians(n,c,e,t,f)}static fromRadians(n,c,e,t,f){y.typeOf.number("longitude",n),y.typeOf.number("latitude",c),e=e??0;let O=z(t)?t.radiiSquared:o._ellipsoidRadiiSquared,b=Math.cos(c);A.x=b*Math.cos(n),A.y=b*Math.sin(n),A.z=Math.sin(c),A=o.normalize(A,A),o.multiplyComponents(O,A,T);let j=Math.sqrt(o.dot(A,T));return T=o.divideByScalar(T,j,T),A=o.multiplyByScalar(A,e,A),z(f)||(f=new o),o.add(T,A,f)}static fromDegreesArray(n,c,e){if(y.defined("coordinates",n),n.length<2||n.length%2!==0)throw new S("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;z(e)?e.length=t/2:e=new Array(t/2);for(let f=0;f<t;f+=2){let O=n[f],b=n[f+1],j=f/2;e[j]=o.fromDegrees(O,b,0,c,e[j])}return e}static fromRadiansArray(n,c,e){if(y.defined("coordinates",n),n.length<2||n.length%2!==0)throw new S("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;z(e)?e.length=t/2:e=new Array(t/2);for(let f=0;f<t;f+=2){let O=n[f],b=n[f+1],j=f/2;e[j]=o.fromRadians(O,b,0,c,e[j])}return e}static fromDegreesArrayHeights(n,c,e){if(y.defined("coordinates",n),n.length<3||n.length%3!==0)throw new S("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;z(e)?e.length=t/3:e=new Array(t/3);for(let f=0;f<t;f+=3){let O=n[f],b=n[f+1],j=n[f+2],h=f/3;e[h]=o.fromDegrees(O,b,j,c,e[h])}return e}static fromRadiansArrayHeights(n,c,e){if(y.defined("coordinates",n),n.length<3||n.length%3!==0)throw new S("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;z(e)?e.length=t/3:e=new Array(t/3);for(let f=0;f<t;f+=3){let O=n[f],b=n[f+1],j=n[f+2],h=f/3;e[h]=o.fromRadians(O,b,j,c,e[h])}return e}clone(n){return o.clone(this,n)}equals(n){return o.equals(this,n)}equalsEpsilon(n,c,e){return o.equalsEpsilon(this,n,c,e)}toString(){return`(${this.x}, ${this.y}, ${this.z})`}};m.fromCartesian4=m.clone;m.packedLength=3;m.fromArray=m.unpack;var k=new m,P=new m,U=new m,L=new m,H=new m,A=new m,T=new m;m._ellipsoidRadiiSquared=new m(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);m.ZERO=Object.freeze(new m(0,0,0));m.ONE=Object.freeze(new m(1,1,1));m.UNIT_X=Object.freeze(new m(1,0,0));m.UNIT_Y=Object.freeze(new m(0,1,0));m.UNIT_Z=Object.freeze(new m(0,0,1));var R=m;function p(o,n,c,e,t,f,O,b,j){this[0]=o??0,this[1]=e??0,this[2]=O??0,this[3]=n??0,this[4]=t??0,this[5]=b??0,this[6]=c??0,this[7]=f??0,this[8]=j??0}p.packedLength=9;p.pack=function(o,n,c){return y.typeOf.object("value",o),y.defined("array",n),c=c??0,n[c++]=o[0],n[c++]=o[1],n[c++]=o[2],n[c++]=o[3],n[c++]=o[4],n[c++]=o[5],n[c++]=o[6],n[c++]=o[7],n[c++]=o[8],n};p.unpack=function(o,n,c){return y.defined("array",o),n=n??0,z(c)||(c=new p),c[0]=o[n++],c[1]=o[n++],c[2]=o[n++],c[3]=o[n++],c[4]=o[n++],c[5]=o[n++],c[6]=o[n++],c[7]=o[n++],c[8]=o[n++],c};p.packArray=function(o,n){y.defined("array",o);let c=o.length,e=c*9;if(!z(n))n=new Array(e);else{if(!Array.isArray(n)&&n.length!==e)throw new S("If result is a typed array, it must have exactly array.length * 9 elements");n.length!==e&&(n.length=e)}for(let t=0;t<c;++t)p.pack(o[t],n,t*9);return n};p.unpackArray=function(o,n){if(y.defined("array",o),y.typeOf.number.greaterThanOrEquals("array.length",o.length,9),o.length%9!==0)throw new S("array length must be a multiple of 9.");let c=o.length;z(n)?n.length=c/9:n=new Array(c/9);for(let e=0;e<c;e+=9){let t=e/9;n[t]=p.unpack(o,e,n[t])}return n};p.clone=function(o,n){if(z(o))return z(n)?(n[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3],n[4]=o[4],n[5]=o[5],n[6]=o[6],n[7]=o[7],n[8]=o[8],n):new p(o[0],o[3],o[6],o[1],o[4],o[7],o[2],o[5],o[8])};p.fromArray=p.unpack;p.fromColumnMajorArray=function(o,n){return y.defined("values",o),p.clone(o,n)};p.fromRowMajorArray=function(o,n){return y.defined("values",o),z(n)?(n[0]=o[0],n[1]=o[3],n[2]=o[6],n[3]=o[1],n[4]=o[4],n[5]=o[7],n[6]=o[2],n[7]=o[5],n[8]=o[8],n):new p(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8])};p.fromQuaternion=function(o,n){y.typeOf.object("quaternion",o);let c=o.x*o.x,e=o.x*o.y,t=o.x*o.z,f=o.x*o.w,O=o.y*o.y,b=o.y*o.z,j=o.y*o.w,h=o.z*o.z,w=o.z*o.w,M=o.w*o.w,d=c-O-h+M,i=2*(e-w),N=2*(t+j),q=2*(e+w),C=-c+O-h+M,Z=2*(b-f),W=2*(t-j),X=2*(b+f),a=-c-O+h+M;return z(n)?(n[0]=d,n[1]=q,n[2]=W,n[3]=i,n[4]=C,n[5]=X,n[6]=N,n[7]=Z,n[8]=a,n):new p(d,i,N,q,C,Z,W,X,a)};p.fromHeadingPitchRoll=function(o,n){y.typeOf.object("headingPitchRoll",o);let c=Math.cos(-o.pitch),e=Math.cos(-o.heading),t=Math.cos(o.roll),f=Math.sin(-o.pitch),O=Math.sin(-o.heading),b=Math.sin(o.roll),j=c*e,h=-t*O+b*f*e,w=b*O+t*f*e,M=c*O,d=t*e+b*f*O,i=-b*e+t*f*O,N=-f,q=b*c,C=t*c;return z(n)?(n[0]=j,n[1]=M,n[2]=N,n[3]=h,n[4]=d,n[5]=q,n[6]=w,n[7]=i,n[8]=C,n):new p(j,h,w,M,d,i,N,q,C)};p.fromScale=function(o,n){return y.typeOf.object("scale",o),z(n)?(n[0]=o.x,n[1]=0,n[2]=0,n[3]=0,n[4]=o.y,n[5]=0,n[6]=0,n[7]=0,n[8]=o.z,n):new p(o.x,0,0,0,o.y,0,0,0,o.z)};p.fromUniformScale=function(o,n){return y.typeOf.number("scale",o),z(n)?(n[0]=o,n[1]=0,n[2]=0,n[3]=0,n[4]=o,n[5]=0,n[6]=0,n[7]=0,n[8]=o,n):new p(o,0,0,0,o,0,0,0,o)};p.fromCrossProduct=function(o,n){return y.typeOf.object("vector",o),z(n)?(n[0]=0,n[1]=o.z,n[2]=-o.y,n[3]=-o.z,n[4]=0,n[5]=o.x,n[6]=o.y,n[7]=-o.x,n[8]=0,n):new p(0,-o.z,o.y,o.z,0,-o.x,-o.y,o.x,0)};p.fromRotationX=function(o,n){y.typeOf.number("angle",o);let c=Math.cos(o),e=Math.sin(o);return z(n)?(n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=c,n[5]=e,n[6]=0,n[7]=-e,n[8]=c,n):new p(1,0,0,0,c,-e,0,e,c)};p.fromRotationY=function(o,n){y.typeOf.number("angle",o);let c=Math.cos(o),e=Math.sin(o);return z(n)?(n[0]=c,n[1]=0,n[2]=-e,n[3]=0,n[4]=1,n[5]=0,n[6]=e,n[7]=0,n[8]=c,n):new p(c,0,e,0,1,0,-e,0,c)};p.fromRotationZ=function(o,n){y.typeOf.number("angle",o);let c=Math.cos(o),e=Math.sin(o);return z(n)?(n[0]=c,n[1]=e,n[2]=0,n[3]=-e,n[4]=c,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new p(c,-e,0,e,c,0,0,0,1)};p.toArray=function(o,n){return y.typeOf.object("matrix",o),z(n)?(n[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3],n[4]=o[4],n[5]=o[5],n[6]=o[6],n[7]=o[7],n[8]=o[8],n):[o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8]]};p.getElementIndex=function(o,n){return y.typeOf.number.greaterThanOrEquals("row",n,0),y.typeOf.number.lessThanOrEquals("row",n,2),y.typeOf.number.greaterThanOrEquals("column",o,0),y.typeOf.number.lessThanOrEquals("column",o,2),o*3+n};p.getColumn=function(o,n,c){y.typeOf.object("matrix",o),y.typeOf.number.greaterThanOrEquals("index",n,0),y.typeOf.number.lessThanOrEquals("index",n,2),y.typeOf.object("result",c);let e=n*3,t=o[e],f=o[e+1],O=o[e+2];return c.x=t,c.y=f,c.z=O,c};p.setColumn=function(o,n,c,e){y.typeOf.object("matrix",o),y.typeOf.number.greaterThanOrEquals("index",n,0),y.typeOf.number.lessThanOrEquals("index",n,2),y.typeOf.object("cartesian",c),y.typeOf.object("result",e),e=p.clone(o,e);let t=n*3;return e[t]=c.x,e[t+1]=c.y,e[t+2]=c.z,e};p.getRow=function(o,n,c){y.typeOf.object("matrix",o),y.typeOf.number.greaterThanOrEquals("index",n,0),y.typeOf.number.lessThanOrEquals("index",n,2),y.typeOf.object("result",c);let e=o[n],t=o[n+3],f=o[n+6];return c.x=e,c.y=t,c.z=f,c};p.setRow=function(o,n,c,e){return y.typeOf.object("matrix",o),y.typeOf.number.greaterThanOrEquals("index",n,0),y.typeOf.number.lessThanOrEquals("index",n,2),y.typeOf.object("cartesian",c),y.typeOf.object("result",e),e=p.clone(o,e),e[n]=c.x,e[n+3]=c.y,e[n+6]=c.z,e};var I=new R;p.setScale=function(o,n,c){y.typeOf.object("matrix",o),y.typeOf.object("scale",n),y.typeOf.object("result",c);let e=p.getScale(o,I),t=n.x/e.x,f=n.y/e.y,O=n.z/e.z;return c[0]=o[0]*t,c[1]=o[1]*t,c[2]=o[2]*t,c[3]=o[3]*f,c[4]=o[4]*f,c[5]=o[5]*f,c[6]=o[6]*O,c[7]=o[7]*O,c[8]=o[8]*O,c};var J=new R;p.setUniformScale=function(o,n,c){y.typeOf.object("matrix",o),y.typeOf.number("scale",n),y.typeOf.object("result",c);let e=p.getScale(o,J),t=n/e.x,f=n/e.y,O=n/e.z;return c[0]=o[0]*t,c[1]=o[1]*t,c[2]=o[2]*t,c[3]=o[3]*f,c[4]=o[4]*f,c[5]=o[5]*f,c[6]=o[6]*O,c[7]=o[7]*O,c[8]=o[8]*O,c};var D=new R;p.getScale=function(o,n){return y.typeOf.object("matrix",o),y.typeOf.object("result",n),n.x=R.magnitude(R.fromElements(o[0],o[1],o[2],D)),n.y=R.magnitude(R.fromElements(o[3],o[4],o[5],D)),n.z=R.magnitude(R.fromElements(o[6],o[7],o[8],D)),n};var V=new R;p.getMaximumScale=function(o){return p.getScale(o,V),R.maximumComponent(V)};var K=new R;p.setRotation=function(o,n,c){y.typeOf.object("matrix",o),y.typeOf.object("result",c);let e=p.getScale(o,K);return c[0]=n[0]*e.x,c[1]=n[1]*e.x,c[2]=n[2]*e.x,c[3]=n[3]*e.y,c[4]=n[4]*e.y,c[5]=n[5]*e.y,c[6]=n[6]*e.z,c[7]=n[7]*e.z,c[8]=n[8]*e.z,c};var Q=new R;p.getRotation=function(o,n){y.typeOf.object("matrix",o),y.typeOf.object("result",n);let c=p.getScale(o,Q);return n[0]=o[0]/c.x,n[1]=o[1]/c.x,n[2]=o[2]/c.x,n[3]=o[3]/c.y,n[4]=o[4]/c.y,n[5]=o[5]/c.y,n[6]=o[6]/c.z,n[7]=o[7]/c.z,n[8]=o[8]/c.z,n};p.multiply=function(o,n,c){y.typeOf.object("left",o),y.typeOf.object("right",n),y.typeOf.object("result",c);let e=o[0]*n[0]+o[3]*n[1]+o[6]*n[2],t=o[1]*n[0]+o[4]*n[1]+o[7]*n[2],f=o[2]*n[0]+o[5]*n[1]+o[8]*n[2],O=o[0]*n[3]+o[3]*n[4]+o[6]*n[5],b=o[1]*n[3]+o[4]*n[4]+o[7]*n[5],j=o[2]*n[3]+o[5]*n[4]+o[8]*n[5],h=o[0]*n[6]+o[3]*n[7]+o[6]*n[8],w=o[1]*n[6]+o[4]*n[7]+o[7]*n[8],M=o[2]*n[6]+o[5]*n[7]+o[8]*n[8];return c[0]=e,c[1]=t,c[2]=f,c[3]=O,c[4]=b,c[5]=j,c[6]=h,c[7]=w,c[8]=M,c};p.add=function(o,n,c){return y.typeOf.object("left",o),y.typeOf.object("right",n),y.typeOf.object("result",c),c[0]=o[0]+n[0],c[1]=o[1]+n[1],c[2]=o[2]+n[2],c[3]=o[3]+n[3],c[4]=o[4]+n[4],c[5]=o[5]+n[5],c[6]=o[6]+n[6],c[7]=o[7]+n[7],c[8]=o[8]+n[8],c};p.subtract=function(o,n,c){return y.typeOf.object("left",o),y.typeOf.object("right",n),y.typeOf.object("result",c),c[0]=o[0]-n[0],c[1]=o[1]-n[1],c[2]=o[2]-n[2],c[3]=o[3]-n[3],c[4]=o[4]-n[4],c[5]=o[5]-n[5],c[6]=o[6]-n[6],c[7]=o[7]-n[7],c[8]=o[8]-n[8],c};p.multiplyByVector=function(o,n,c){y.typeOf.object("matrix",o),y.typeOf.object("cartesian",n),y.typeOf.object("result",c);let e=n.x,t=n.y,f=n.z,O=o[0]*e+o[3]*t+o[6]*f,b=o[1]*e+o[4]*t+o[7]*f,j=o[2]*e+o[5]*t+o[8]*f;return c.x=O,c.y=b,c.z=j,c};p.multiplyByScalar=function(o,n,c){return y.typeOf.object("matrix",o),y.typeOf.number("scalar",n),y.typeOf.object("result",c),c[0]=o[0]*n,c[1]=o[1]*n,c[2]=o[2]*n,c[3]=o[3]*n,c[4]=o[4]*n,c[5]=o[5]*n,c[6]=o[6]*n,c[7]=o[7]*n,c[8]=o[8]*n,c};p.multiplyByScale=function(o,n,c){return y.typeOf.object("matrix",o),y.typeOf.object("scale",n),y.typeOf.object("result",c),c[0]=o[0]*n.x,c[1]=o[1]*n.x,c[2]=o[2]*n.x,c[3]=o[3]*n.y,c[4]=o[4]*n.y,c[5]=o[5]*n.y,c[6]=o[6]*n.z,c[7]=o[7]*n.z,c[8]=o[8]*n.z,c};p.multiplyByUniformScale=function(o,n,c){return y.typeOf.object("matrix",o),y.typeOf.number("scale",n),y.typeOf.object("result",c),c[0]=o[0]*n,c[1]=o[1]*n,c[2]=o[2]*n,c[3]=o[3]*n,c[4]=o[4]*n,c[5]=o[5]*n,c[6]=o[6]*n,c[7]=o[7]*n,c[8]=o[8]*n,c};p.negate=function(o,n){return y.typeOf.object("matrix",o),y.typeOf.object("result",n),n[0]=-o[0],n[1]=-o[1],n[2]=-o[2],n[3]=-o[3],n[4]=-o[4],n[5]=-o[5],n[6]=-o[6],n[7]=-o[7],n[8]=-o[8],n};p.transpose=function(o,n){y.typeOf.object("matrix",o),y.typeOf.object("result",n);let c=o[0],e=o[3],t=o[6],f=o[1],O=o[4],b=o[7],j=o[2],h=o[5],w=o[8];return n[0]=c,n[1]=e,n[2]=t,n[3]=f,n[4]=O,n[5]=b,n[6]=j,n[7]=h,n[8]=w,n};function G(o){let n=0;for(let c=0;c<9;++c){let e=o[c];n+=e*e}return Math.sqrt(n)}var Y=[1,0,0],g=[2,2,1];function v(o){let n=0;for(let c=0;c<3;++c){let e=o[p.getElementIndex(g[c],Y[c])];n+=2*e*e}return Math.sqrt(n)}function _(o,n){let c=E.EPSILON15,e=0,t=1;for(let h=0;h<3;++h){let w=Math.abs(o[p.getElementIndex(g[h],Y[h])]);w>e&&(t=h,e=w)}let f=1,O=0,b=Y[t],j=g[t];if(Math.abs(o[p.getElementIndex(j,b)])>c){let h=o[p.getElementIndex(j,j)],w=o[p.getElementIndex(b,b)],M=o[p.getElementIndex(j,b)],d=(h-w)/2/M,i;d<0?i=-1/(-d+Math.sqrt(1+d*d)):i=1/(d+Math.sqrt(1+d*d)),f=1/Math.sqrt(1+i*i),O=i*f}return n=p.clone(p.IDENTITY,n),n[p.getElementIndex(b,b)]=n[p.getElementIndex(j,j)]=f,n[p.getElementIndex(j,b)]=O,n[p.getElementIndex(b,j)]=-O,n}var B=new p,F=new p;p.computeEigenDecomposition=function(o,n){y.typeOf.object("matrix",o);let c=E.EPSILON20,e=10,t=0,f=0;z(n)||(n={});let O=n.unitary=p.clone(p.IDENTITY,n.unitary),b=n.diagonal=p.clone(o,n.diagonal),j=c*G(b);for(;f<e&&v(b)>j;)_(b,B),p.transpose(B,F),p.multiply(b,B,b),p.multiply(F,b,b),p.multiply(O,B,O),++t>2&&(++f,t=0);return n};p.abs=function(o,n){return y.typeOf.object("matrix",o),y.typeOf.object("result",n),n[0]=Math.abs(o[0]),n[1]=Math.abs(o[1]),n[2]=Math.abs(o[2]),n[3]=Math.abs(o[3]),n[4]=Math.abs(o[4]),n[5]=Math.abs(o[5]),n[6]=Math.abs(o[6]),n[7]=Math.abs(o[7]),n[8]=Math.abs(o[8]),n};p.determinant=function(o){y.typeOf.object("matrix",o);let n=o[0],c=o[3],e=o[6],t=o[1],f=o[4],O=o[7],b=o[2],j=o[5],h=o[8];return n*(f*h-j*O)+t*(j*e-c*h)+b*(c*O-f*e)};p.inverse=function(o,n){y.typeOf.object("matrix",o),y.typeOf.object("result",n);let c=o[0],e=o[1],t=o[2],f=o[3],O=o[4],b=o[5],j=o[6],h=o[7],w=o[8],M=p.determinant(o);if(Math.abs(M)<=E.EPSILON15)throw new S("matrix is not invertible");n[0]=O*w-h*b,n[1]=h*t-e*w,n[2]=e*b-O*t,n[3]=j*b-f*w,n[4]=c*w-j*t,n[5]=f*t-c*b,n[6]=f*h-j*O,n[7]=j*e-c*h,n[8]=c*O-f*e;let d=1/M;return p.multiplyByScalar(n,d,n)};var x=new p;p.inverseTranspose=function(o,n){return y.typeOf.object("matrix",o),y.typeOf.object("result",n),p.inverse(p.transpose(o,x),n)};p.equals=function(o,n){return o===n||z(o)&&z(n)&&o[0]===n[0]&&o[1]===n[1]&&o[2]===n[2]&&o[3]===n[3]&&o[4]===n[4]&&o[5]===n[5]&&o[6]===n[6]&&o[7]===n[7]&&o[8]===n[8]};p.equalsEpsilon=function(o,n,c){return c=c??0,o===n||z(o)&&z(n)&&Math.abs(o[0]-n[0])<=c&&Math.abs(o[1]-n[1])<=c&&Math.abs(o[2]-n[2])<=c&&Math.abs(o[3]-n[3])<=c&&Math.abs(o[4]-n[4])<=c&&Math.abs(o[5]-n[5])<=c&&Math.abs(o[6]-n[6])<=c&&Math.abs(o[7]-n[7])<=c&&Math.abs(o[8]-n[8])<=c};p.IDENTITY=Object.freeze(new p(1,0,0,0,1,0,0,0,1));p.ZERO=Object.freeze(new p(0,0,0,0,0,0,0,0,0));p.COLUMN0ROW0=0;p.COLUMN0ROW1=1;p.COLUMN0ROW2=2;p.COLUMN1ROW0=3;p.COLUMN1ROW1=4;p.COLUMN1ROW2=5;p.COLUMN2ROW0=6;p.COLUMN2ROW1=7;p.COLUMN2ROW2=8;Object.defineProperties(p.prototype,{length:{get:function(){return p.packedLength}}});p.prototype.clone=function(o){return p.clone(this,o)};p.prototype.equals=function(o){return p.equals(this,o)};p.equalsArray=function(o,n,c){return o[0]===n[c]&&o[1]===n[c+1]&&o[2]===n[c+2]&&o[3]===n[c+3]&&o[4]===n[c+4]&&o[5]===n[c+5]&&o[6]===n[c+6]&&o[7]===n[c+7]&&o[8]===n[c+8]};p.prototype.equalsEpsilon=function(o,n){return p.equalsEpsilon(this,o,n)};p.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})
|
|
27
|
+
(${this[1]}, ${this[4]}, ${this[7]})
|
|
28
|
+
(${this[2]}, ${this[5]}, ${this[8]})`};var pn=p;var $={};$.EMPTY_OBJECT=Object.freeze({});$.EMPTY_ARRAY=Object.freeze([]);var On=$;export{R as a,pn as b,On as c};
|