@pggis/pg-sdk 3.2.9
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/README.md +152 -0
- package/dist/index.cjs +43 -0
- package/dist/pggis.min.css +1 -0
- package/dist/pggis.min.js +42 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_27.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1 -0
- package/dist/resources/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1 -0
- package/dist/resources/Assets/Images/bing_maps_credit.png +0 -0
- package/dist/resources/Assets/Images/cesium_credit.png +0 -0
- package/dist/resources/Assets/Images/google_earth_credit.png +0 -0
- package/dist/resources/Assets/Images/ion-credit.png +0 -0
- package/dist/resources/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
- package/dist/resources/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
- package/dist/resources/Assets/Textures/NaturalEarthII/tilemapresource.xml +14 -0
- package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
- package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
- package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
- package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
- package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
- package/dist/resources/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
- package/dist/resources/Assets/Textures/maki/airfield.png +0 -0
- package/dist/resources/Assets/Textures/maki/airport.png +0 -0
- package/dist/resources/Assets/Textures/maki/alcohol-shop.png +0 -0
- package/dist/resources/Assets/Textures/maki/america-football.png +0 -0
- package/dist/resources/Assets/Textures/maki/art-gallery.png +0 -0
- package/dist/resources/Assets/Textures/maki/bakery.png +0 -0
- package/dist/resources/Assets/Textures/maki/bank.png +0 -0
- package/dist/resources/Assets/Textures/maki/bar.png +0 -0
- package/dist/resources/Assets/Textures/maki/baseball.png +0 -0
- package/dist/resources/Assets/Textures/maki/basketball.png +0 -0
- package/dist/resources/Assets/Textures/maki/beer.png +0 -0
- package/dist/resources/Assets/Textures/maki/bicycle.png +0 -0
- package/dist/resources/Assets/Textures/maki/building.png +0 -0
- package/dist/resources/Assets/Textures/maki/bus.png +0 -0
- package/dist/resources/Assets/Textures/maki/cafe.png +0 -0
- package/dist/resources/Assets/Textures/maki/camera.png +0 -0
- package/dist/resources/Assets/Textures/maki/campsite.png +0 -0
- package/dist/resources/Assets/Textures/maki/car.png +0 -0
- package/dist/resources/Assets/Textures/maki/cemetery.png +0 -0
- package/dist/resources/Assets/Textures/maki/cesium.png +0 -0
- package/dist/resources/Assets/Textures/maki/chemist.png +0 -0
- package/dist/resources/Assets/Textures/maki/cinema.png +0 -0
- package/dist/resources/Assets/Textures/maki/circle-stroked.png +0 -0
- package/dist/resources/Assets/Textures/maki/circle.png +0 -0
- package/dist/resources/Assets/Textures/maki/city.png +0 -0
- package/dist/resources/Assets/Textures/maki/clothing-store.png +0 -0
- package/dist/resources/Assets/Textures/maki/college.png +0 -0
- package/dist/resources/Assets/Textures/maki/commercial.png +0 -0
- package/dist/resources/Assets/Textures/maki/cricket.png +0 -0
- package/dist/resources/Assets/Textures/maki/cross.png +0 -0
- package/dist/resources/Assets/Textures/maki/dam.png +0 -0
- package/dist/resources/Assets/Textures/maki/danger.png +0 -0
- package/dist/resources/Assets/Textures/maki/disability.png +0 -0
- package/dist/resources/Assets/Textures/maki/dog-park.png +0 -0
- package/dist/resources/Assets/Textures/maki/embassy.png +0 -0
- package/dist/resources/Assets/Textures/maki/emergency-telephone.png +0 -0
- package/dist/resources/Assets/Textures/maki/entrance.png +0 -0
- package/dist/resources/Assets/Textures/maki/farm.png +0 -0
- package/dist/resources/Assets/Textures/maki/fast-food.png +0 -0
- package/dist/resources/Assets/Textures/maki/ferry.png +0 -0
- package/dist/resources/Assets/Textures/maki/fire-station.png +0 -0
- package/dist/resources/Assets/Textures/maki/fuel.png +0 -0
- package/dist/resources/Assets/Textures/maki/garden.png +0 -0
- package/dist/resources/Assets/Textures/maki/gift.png +0 -0
- package/dist/resources/Assets/Textures/maki/golf.png +0 -0
- package/dist/resources/Assets/Textures/maki/grocery.png +0 -0
- package/dist/resources/Assets/Textures/maki/hairdresser.png +0 -0
- package/dist/resources/Assets/Textures/maki/harbor.png +0 -0
- package/dist/resources/Assets/Textures/maki/heart.png +0 -0
- package/dist/resources/Assets/Textures/maki/heliport.png +0 -0
- package/dist/resources/Assets/Textures/maki/hospital.png +0 -0
- package/dist/resources/Assets/Textures/maki/ice-cream.png +0 -0
- package/dist/resources/Assets/Textures/maki/industrial.png +0 -0
- package/dist/resources/Assets/Textures/maki/land-use.png +0 -0
- package/dist/resources/Assets/Textures/maki/laundry.png +0 -0
- package/dist/resources/Assets/Textures/maki/library.png +0 -0
- package/dist/resources/Assets/Textures/maki/lighthouse.png +0 -0
- package/dist/resources/Assets/Textures/maki/lodging.png +0 -0
- package/dist/resources/Assets/Textures/maki/logging.png +0 -0
- package/dist/resources/Assets/Textures/maki/london-underground.png +0 -0
- package/dist/resources/Assets/Textures/maki/marker-stroked.png +0 -0
- package/dist/resources/Assets/Textures/maki/marker.png +0 -0
- package/dist/resources/Assets/Textures/maki/minefield.png +0 -0
- package/dist/resources/Assets/Textures/maki/mobilephone.png +0 -0
- package/dist/resources/Assets/Textures/maki/monument.png +0 -0
- package/dist/resources/Assets/Textures/maki/museum.png +0 -0
- package/dist/resources/Assets/Textures/maki/music.png +0 -0
- package/dist/resources/Assets/Textures/maki/oil-well.png +0 -0
- package/dist/resources/Assets/Textures/maki/park.png +0 -0
- package/dist/resources/Assets/Textures/maki/park2.png +0 -0
- package/dist/resources/Assets/Textures/maki/parking-garage.png +0 -0
- package/dist/resources/Assets/Textures/maki/parking.png +0 -0
- package/dist/resources/Assets/Textures/maki/pharmacy.png +0 -0
- package/dist/resources/Assets/Textures/maki/pitch.png +0 -0
- package/dist/resources/Assets/Textures/maki/place-of-worship.png +0 -0
- package/dist/resources/Assets/Textures/maki/playground.png +0 -0
- package/dist/resources/Assets/Textures/maki/police.png +0 -0
- package/dist/resources/Assets/Textures/maki/polling-place.png +0 -0
- package/dist/resources/Assets/Textures/maki/post.png +0 -0
- package/dist/resources/Assets/Textures/maki/prison.png +0 -0
- package/dist/resources/Assets/Textures/maki/rail-above.png +0 -0
- package/dist/resources/Assets/Textures/maki/rail-light.png +0 -0
- package/dist/resources/Assets/Textures/maki/rail-metro.png +0 -0
- package/dist/resources/Assets/Textures/maki/rail-underground.png +0 -0
- package/dist/resources/Assets/Textures/maki/rail.png +0 -0
- package/dist/resources/Assets/Textures/maki/religious-christian.png +0 -0
- package/dist/resources/Assets/Textures/maki/religious-jewish.png +0 -0
- package/dist/resources/Assets/Textures/maki/religious-muslim.png +0 -0
- package/dist/resources/Assets/Textures/maki/restaurant.png +0 -0
- package/dist/resources/Assets/Textures/maki/roadblock.png +0 -0
- package/dist/resources/Assets/Textures/maki/rocket.png +0 -0
- package/dist/resources/Assets/Textures/maki/school.png +0 -0
- package/dist/resources/Assets/Textures/maki/scooter.png +0 -0
- package/dist/resources/Assets/Textures/maki/shop.png +0 -0
- package/dist/resources/Assets/Textures/maki/skiing.png +0 -0
- package/dist/resources/Assets/Textures/maki/slaughterhouse.png +0 -0
- package/dist/resources/Assets/Textures/maki/soccer.png +0 -0
- package/dist/resources/Assets/Textures/maki/square-stroked.png +0 -0
- package/dist/resources/Assets/Textures/maki/square.png +0 -0
- package/dist/resources/Assets/Textures/maki/star-stroked.png +0 -0
- package/dist/resources/Assets/Textures/maki/star.png +0 -0
- package/dist/resources/Assets/Textures/maki/suitcase.png +0 -0
- package/dist/resources/Assets/Textures/maki/swimming.png +0 -0
- package/dist/resources/Assets/Textures/maki/telephone.png +0 -0
- package/dist/resources/Assets/Textures/maki/tennis.png +0 -0
- package/dist/resources/Assets/Textures/maki/theatre.png +0 -0
- package/dist/resources/Assets/Textures/maki/toilets.png +0 -0
- package/dist/resources/Assets/Textures/maki/town-hall.png +0 -0
- package/dist/resources/Assets/Textures/maki/town.png +0 -0
- package/dist/resources/Assets/Textures/maki/triangle-stroked.png +0 -0
- package/dist/resources/Assets/Textures/maki/triangle.png +0 -0
- package/dist/resources/Assets/Textures/maki/village.png +0 -0
- package/dist/resources/Assets/Textures/maki/warehouse.png +0 -0
- package/dist/resources/Assets/Textures/maki/waste-basket.png +0 -0
- package/dist/resources/Assets/Textures/maki/water.png +0 -0
- package/dist/resources/Assets/Textures/maki/wetland.png +0 -0
- package/dist/resources/Assets/Textures/maki/zoo.png +0 -0
- package/dist/resources/Assets/Textures/moonSmall.jpg +0 -0
- package/dist/resources/Assets/Textures/pin.svg +1 -0
- package/dist/resources/Assets/Textures/waterNormals.jpg +0 -0
- package/dist/resources/Assets/Textures/waterNormalsSmall.jpg +0 -0
- package/dist/resources/Assets/approximateTerrainHeights.json +1 -0
- package/dist/resources/ThirdParty/Workers/basis_transcoder.js +21 -0
- package/dist/resources/ThirdParty/Workers/package.json +1 -0
- package/dist/resources/ThirdParty/Workers/pako_deflate.min.js +2 -0
- package/dist/resources/ThirdParty/Workers/pako_inflate.min.js +2 -0
- package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -0
- package/dist/resources/ThirdParty/basis_transcoder.wasm +0 -0
- package/dist/resources/ThirdParty/draco_decoder.wasm +0 -0
- package/dist/resources/ThirdParty/google-earth-dbroot-parser.js +8337 -0
- package/dist/resources/Workers/chunk-3PW6ZBN4.js +2977 -0
- package/dist/resources/Workers/chunk-434ZTTFX.js +73 -0
- package/dist/resources/Workers/chunk-4KP73B43.js +73 -0
- package/dist/resources/Workers/chunk-52VSIKEA.js +2716 -0
- package/dist/resources/Workers/chunk-5GDBZTHX.js +1075 -0
- package/dist/resources/Workers/chunk-5HLGKKG3.js +163 -0
- package/dist/resources/Workers/chunk-5IRLXUTA.js +1258 -0
- package/dist/resources/Workers/chunk-5SK36PU4.js +430 -0
- package/dist/resources/Workers/chunk-ARPTYYKS.js +258 -0
- package/dist/resources/Workers/chunk-ATB2I7OS.js +55 -0
- package/dist/resources/Workers/chunk-AXFRNOVC.js +368 -0
- package/dist/resources/Workers/chunk-BP467WX3.js +501 -0
- package/dist/resources/Workers/chunk-BUZDZBUH.js +1007 -0
- package/dist/resources/Workers/chunk-CDGHUKQ4.js +1477 -0
- package/dist/resources/Workers/chunk-CSIZ3BGT.js +398 -0
- package/dist/resources/Workers/chunk-CWJQGBWT.js +39 -0
- package/dist/resources/Workers/chunk-DMCSY5BU.js +100 -0
- package/dist/resources/Workers/chunk-DR5XZ6K5.js +390 -0
- package/dist/resources/Workers/chunk-FWGNCYP6.js +476 -0
- package/dist/resources/Workers/chunk-GF5TNNKP.js +353 -0
- package/dist/resources/Workers/chunk-GVL5I7TC.js +1052 -0
- package/dist/resources/Workers/chunk-H5DUXHCV.js +421 -0
- package/dist/resources/Workers/chunk-HFKSAB5K.js +511 -0
- package/dist/resources/Workers/chunk-HOT2SNXP.js +8639 -0
- package/dist/resources/Workers/chunk-HPH5HSFE.js +1860 -0
- package/dist/resources/Workers/chunk-HPP4JLNH.js +218 -0
- package/dist/resources/Workers/chunk-HUPNRBWW.js +196 -0
- package/dist/resources/Workers/chunk-JGG36SQV.js +102 -0
- package/dist/resources/Workers/chunk-LGJUI2CE.js +2361 -0
- package/dist/resources/Workers/chunk-LGL4P5KL.js +171 -0
- package/dist/resources/Workers/chunk-LX6XV4DK.js +138 -0
- package/dist/resources/Workers/chunk-MN34FIF5.js +37 -0
- package/dist/resources/Workers/chunk-MW3CJYLX.js +101 -0
- package/dist/resources/Workers/chunk-NE4JNU6H.js +767 -0
- package/dist/resources/Workers/chunk-O43GWBSF.js +55 -0
- package/dist/resources/Workers/chunk-PIXK6KHB.js +44 -0
- package/dist/resources/Workers/chunk-PZ2WJWUG.js +634 -0
- package/dist/resources/Workers/chunk-QRBRVGZC.js +305 -0
- package/dist/resources/Workers/chunk-QTZQZY2C.js +669 -0
- package/dist/resources/Workers/chunk-R3HUGXBH.js +302 -0
- package/dist/resources/Workers/chunk-R4OZKBXH.js +456 -0
- package/dist/resources/Workers/chunk-RH4N2ONY.js +236 -0
- package/dist/resources/Workers/chunk-RIDPF7PO.js +58 -0
- package/dist/resources/Workers/chunk-SNN7WOC2.js +781 -0
- package/dist/resources/Workers/chunk-SQVTYRZY.js +122 -0
- package/dist/resources/Workers/chunk-SV7DDPAC.js +629 -0
- package/dist/resources/Workers/chunk-TIXXVKUY.js +834 -0
- package/dist/resources/Workers/chunk-TMPVBFJQ.js +289 -0
- package/dist/resources/Workers/chunk-XUTVA4K5.js +684 -0
- package/dist/resources/Workers/chunk-Y4OJ4B23.js +59 -0
- package/dist/resources/Workers/chunk-YBKFS53K.js +77 -0
- package/dist/resources/Workers/chunk-Z2SIPUKB.js +117 -0
- package/dist/resources/Workers/chunk-Z4JUBRHP.js +157 -0
- package/dist/resources/Workers/chunk-ZQRZBHYI.js +138 -0
- package/dist/resources/Workers/combineGeometry.js +67 -0
- package/dist/resources/Workers/createBoxGeometry.js +57 -0
- package/dist/resources/Workers/createBoxOutlineGeometry.js +234 -0
- package/dist/resources/Workers/createCircleGeometry.js +196 -0
- package/dist/resources/Workers/createCircleOutlineGeometry.js +146 -0
- package/dist/resources/Workers/createCoplanarPolygonGeometry.js +505 -0
- package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +224 -0
- package/dist/resources/Workers/createCorridorGeometry.js +1263 -0
- package/dist/resources/Workers/createCorridorOutlineGeometry.js +568 -0
- package/dist/resources/Workers/createCylinderGeometry.js +59 -0
- package/dist/resources/Workers/createCylinderOutlineGeometry.js +230 -0
- package/dist/resources/Workers/createEllipseGeometry.js +70 -0
- package/dist/resources/Workers/createEllipseOutlineGeometry.js +63 -0
- package/dist/resources/Workers/createEllipsoidGeometry.js +58 -0
- package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +60 -0
- package/dist/resources/Workers/createFrustumGeometry.js +57 -0
- package/dist/resources/Workers/createFrustumOutlineGeometry.js +234 -0
- package/dist/resources/Workers/createGeometry.js +150 -0
- package/dist/resources/Workers/createGroundPolylineGeometry.js +1607 -0
- package/dist/resources/Workers/createPlaneGeometry.js +223 -0
- package/dist/resources/Workers/createPlaneOutlineGeometry.js +123 -0
- package/dist/resources/Workers/createPolygonGeometry.js +1545 -0
- package/dist/resources/Workers/createPolygonOutlineGeometry.js +542 -0
- package/dist/resources/Workers/createPolylineGeometry.js +495 -0
- package/dist/resources/Workers/createPolylineVolumeGeometry.js +380 -0
- package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +277 -0
- package/dist/resources/Workers/createRectangleGeometry.js +1273 -0
- package/dist/resources/Workers/createRectangleOutlineGeometry.js +478 -0
- package/dist/resources/Workers/createSimplePolylineGeometry.js +399 -0
- package/dist/resources/Workers/createSphereGeometry.js +117 -0
- package/dist/resources/Workers/createSphereOutlineGeometry.js +117 -0
- package/dist/resources/Workers/createTaskProcessorWorker.js +32 -0
- package/dist/resources/Workers/createVectorTileClampedPolylines.js +492 -0
- package/dist/resources/Workers/createVectorTileGeometries.js +386 -0
- package/dist/resources/Workers/createVectorTilePoints.js +112 -0
- package/dist/resources/Workers/createVectorTilePolygons.js +384 -0
- package/dist/resources/Workers/createVectorTilePolylines.js +262 -0
- package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +568 -0
- package/dist/resources/Workers/createVerticesFromHeightmap.js +2277 -0
- package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +745 -0
- package/dist/resources/Workers/createWallGeometry.js +489 -0
- package/dist/resources/Workers/createWallOutlineGeometry.js +337 -0
- package/dist/resources/Workers/decodeDraco.js +369 -0
- package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2650 -0
- package/dist/resources/Workers/decodeI3S.js +835 -0
- package/dist/resources/Workers/transcodeKTX2.js +3425 -0
- package/dist/resources/Workers/transferTypedArrayTest.js +41 -0
- package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +818 -0
- package/package.json +81 -0
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.113
|
|
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 {
|
|
27
|
+
defaultValue_default
|
|
28
|
+
} from "./chunk-CWJQGBWT.js";
|
|
29
|
+
import {
|
|
30
|
+
Check_default,
|
|
31
|
+
DeveloperError_default
|
|
32
|
+
} from "./chunk-5HLGKKG3.js";
|
|
33
|
+
import {
|
|
34
|
+
__commonJS,
|
|
35
|
+
__toESM,
|
|
36
|
+
defined_default
|
|
37
|
+
} from "./chunk-YBKFS53K.js";
|
|
38
|
+
|
|
39
|
+
// node_modules/mersenne-twister/src/mersenne-twister.js
|
|
40
|
+
var require_mersenne_twister = __commonJS({
|
|
41
|
+
"node_modules/mersenne-twister/src/mersenne-twister.js"(exports, module) {
|
|
42
|
+
var MersenneTwister2 = function(seed) {
|
|
43
|
+
if (seed == void 0) {
|
|
44
|
+
seed = (/* @__PURE__ */ new Date()).getTime();
|
|
45
|
+
}
|
|
46
|
+
this.N = 624;
|
|
47
|
+
this.M = 397;
|
|
48
|
+
this.MATRIX_A = 2567483615;
|
|
49
|
+
this.UPPER_MASK = 2147483648;
|
|
50
|
+
this.LOWER_MASK = 2147483647;
|
|
51
|
+
this.mt = new Array(this.N);
|
|
52
|
+
this.mti = this.N + 1;
|
|
53
|
+
if (seed.constructor == Array) {
|
|
54
|
+
this.init_by_array(seed, seed.length);
|
|
55
|
+
} else {
|
|
56
|
+
this.init_seed(seed);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
MersenneTwister2.prototype.init_seed = function(s) {
|
|
60
|
+
this.mt[0] = s >>> 0;
|
|
61
|
+
for (this.mti = 1; this.mti < this.N; this.mti++) {
|
|
62
|
+
var s = this.mt[this.mti - 1] ^ this.mt[this.mti - 1] >>> 30;
|
|
63
|
+
this.mt[this.mti] = (((s & 4294901760) >>> 16) * 1812433253 << 16) + (s & 65535) * 1812433253 + this.mti;
|
|
64
|
+
this.mt[this.mti] >>>= 0;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
MersenneTwister2.prototype.init_by_array = function(init_key, key_length) {
|
|
68
|
+
var i, j, k;
|
|
69
|
+
this.init_seed(19650218);
|
|
70
|
+
i = 1;
|
|
71
|
+
j = 0;
|
|
72
|
+
k = this.N > key_length ? this.N : key_length;
|
|
73
|
+
for (; k; k--) {
|
|
74
|
+
var s = this.mt[i - 1] ^ this.mt[i - 1] >>> 30;
|
|
75
|
+
this.mt[i] = (this.mt[i] ^ (((s & 4294901760) >>> 16) * 1664525 << 16) + (s & 65535) * 1664525) + init_key[j] + j;
|
|
76
|
+
this.mt[i] >>>= 0;
|
|
77
|
+
i++;
|
|
78
|
+
j++;
|
|
79
|
+
if (i >= this.N) {
|
|
80
|
+
this.mt[0] = this.mt[this.N - 1];
|
|
81
|
+
i = 1;
|
|
82
|
+
}
|
|
83
|
+
if (j >= key_length)
|
|
84
|
+
j = 0;
|
|
85
|
+
}
|
|
86
|
+
for (k = this.N - 1; k; k--) {
|
|
87
|
+
var s = this.mt[i - 1] ^ this.mt[i - 1] >>> 30;
|
|
88
|
+
this.mt[i] = (this.mt[i] ^ (((s & 4294901760) >>> 16) * 1566083941 << 16) + (s & 65535) * 1566083941) - i;
|
|
89
|
+
this.mt[i] >>>= 0;
|
|
90
|
+
i++;
|
|
91
|
+
if (i >= this.N) {
|
|
92
|
+
this.mt[0] = this.mt[this.N - 1];
|
|
93
|
+
i = 1;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
this.mt[0] = 2147483648;
|
|
97
|
+
};
|
|
98
|
+
MersenneTwister2.prototype.random_int = function() {
|
|
99
|
+
var y;
|
|
100
|
+
var mag01 = new Array(0, this.MATRIX_A);
|
|
101
|
+
if (this.mti >= this.N) {
|
|
102
|
+
var kk;
|
|
103
|
+
if (this.mti == this.N + 1)
|
|
104
|
+
this.init_seed(5489);
|
|
105
|
+
for (kk = 0; kk < this.N - this.M; kk++) {
|
|
106
|
+
y = this.mt[kk] & this.UPPER_MASK | this.mt[kk + 1] & this.LOWER_MASK;
|
|
107
|
+
this.mt[kk] = this.mt[kk + this.M] ^ y >>> 1 ^ mag01[y & 1];
|
|
108
|
+
}
|
|
109
|
+
for (; kk < this.N - 1; kk++) {
|
|
110
|
+
y = this.mt[kk] & this.UPPER_MASK | this.mt[kk + 1] & this.LOWER_MASK;
|
|
111
|
+
this.mt[kk] = this.mt[kk + (this.M - this.N)] ^ y >>> 1 ^ mag01[y & 1];
|
|
112
|
+
}
|
|
113
|
+
y = this.mt[this.N - 1] & this.UPPER_MASK | this.mt[0] & this.LOWER_MASK;
|
|
114
|
+
this.mt[this.N - 1] = this.mt[this.M - 1] ^ y >>> 1 ^ mag01[y & 1];
|
|
115
|
+
this.mti = 0;
|
|
116
|
+
}
|
|
117
|
+
y = this.mt[this.mti++];
|
|
118
|
+
y ^= y >>> 11;
|
|
119
|
+
y ^= y << 7 & 2636928640;
|
|
120
|
+
y ^= y << 15 & 4022730752;
|
|
121
|
+
y ^= y >>> 18;
|
|
122
|
+
return y >>> 0;
|
|
123
|
+
};
|
|
124
|
+
MersenneTwister2.prototype.random_int31 = function() {
|
|
125
|
+
return this.random_int() >>> 1;
|
|
126
|
+
};
|
|
127
|
+
MersenneTwister2.prototype.random_incl = function() {
|
|
128
|
+
return this.random_int() * (1 / 4294967295);
|
|
129
|
+
};
|
|
130
|
+
MersenneTwister2.prototype.random = function() {
|
|
131
|
+
return this.random_int() * (1 / 4294967296);
|
|
132
|
+
};
|
|
133
|
+
MersenneTwister2.prototype.random_excl = function() {
|
|
134
|
+
return (this.random_int() + 0.5) * (1 / 4294967296);
|
|
135
|
+
};
|
|
136
|
+
MersenneTwister2.prototype.random_long = function() {
|
|
137
|
+
var a = this.random_int() >>> 5, b = this.random_int() >>> 6;
|
|
138
|
+
return (a * 67108864 + b) * (1 / 9007199254740992);
|
|
139
|
+
};
|
|
140
|
+
module.exports = MersenneTwister2;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// packages/engine/Source/Core/Math.js
|
|
145
|
+
var import_mersenne_twister = __toESM(require_mersenne_twister(), 1);
|
|
146
|
+
var CesiumMath = {};
|
|
147
|
+
CesiumMath.EPSILON1 = 0.1;
|
|
148
|
+
CesiumMath.EPSILON2 = 0.01;
|
|
149
|
+
CesiumMath.EPSILON3 = 1e-3;
|
|
150
|
+
CesiumMath.EPSILON4 = 1e-4;
|
|
151
|
+
CesiumMath.EPSILON5 = 1e-5;
|
|
152
|
+
CesiumMath.EPSILON6 = 1e-6;
|
|
153
|
+
CesiumMath.EPSILON7 = 1e-7;
|
|
154
|
+
CesiumMath.EPSILON8 = 1e-8;
|
|
155
|
+
CesiumMath.EPSILON9 = 1e-9;
|
|
156
|
+
CesiumMath.EPSILON10 = 1e-10;
|
|
157
|
+
CesiumMath.EPSILON11 = 1e-11;
|
|
158
|
+
CesiumMath.EPSILON12 = 1e-12;
|
|
159
|
+
CesiumMath.EPSILON13 = 1e-13;
|
|
160
|
+
CesiumMath.EPSILON14 = 1e-14;
|
|
161
|
+
CesiumMath.EPSILON15 = 1e-15;
|
|
162
|
+
CesiumMath.EPSILON16 = 1e-16;
|
|
163
|
+
CesiumMath.EPSILON17 = 1e-17;
|
|
164
|
+
CesiumMath.EPSILON18 = 1e-18;
|
|
165
|
+
CesiumMath.EPSILON19 = 1e-19;
|
|
166
|
+
CesiumMath.EPSILON20 = 1e-20;
|
|
167
|
+
CesiumMath.EPSILON21 = 1e-21;
|
|
168
|
+
CesiumMath.GRAVITATIONALPARAMETER = 3986004418e5;
|
|
169
|
+
CesiumMath.SOLAR_RADIUS = 6955e5;
|
|
170
|
+
CesiumMath.LUNAR_RADIUS = 1737400;
|
|
171
|
+
CesiumMath.SIXTY_FOUR_KILOBYTES = 64 * 1024;
|
|
172
|
+
CesiumMath.FOUR_GIGABYTES = 4 * 1024 * 1024 * 1024;
|
|
173
|
+
CesiumMath.sign = defaultValue_default(Math.sign, function sign(value) {
|
|
174
|
+
value = +value;
|
|
175
|
+
if (value === 0 || value !== value) {
|
|
176
|
+
return value;
|
|
177
|
+
}
|
|
178
|
+
return value > 0 ? 1 : -1;
|
|
179
|
+
});
|
|
180
|
+
CesiumMath.signNotZero = function(value) {
|
|
181
|
+
return value < 0 ? -1 : 1;
|
|
182
|
+
};
|
|
183
|
+
CesiumMath.toSNorm = function(value, rangeMaximum) {
|
|
184
|
+
rangeMaximum = defaultValue_default(rangeMaximum, 255);
|
|
185
|
+
return Math.round(
|
|
186
|
+
(CesiumMath.clamp(value, -1, 1) * 0.5 + 0.5) * rangeMaximum
|
|
187
|
+
);
|
|
188
|
+
};
|
|
189
|
+
CesiumMath.fromSNorm = function(value, rangeMaximum) {
|
|
190
|
+
rangeMaximum = defaultValue_default(rangeMaximum, 255);
|
|
191
|
+
return CesiumMath.clamp(value, 0, rangeMaximum) / rangeMaximum * 2 - 1;
|
|
192
|
+
};
|
|
193
|
+
CesiumMath.normalize = function(value, rangeMinimum, rangeMaximum) {
|
|
194
|
+
rangeMaximum = Math.max(rangeMaximum - rangeMinimum, 0);
|
|
195
|
+
return rangeMaximum === 0 ? 0 : CesiumMath.clamp((value - rangeMinimum) / rangeMaximum, 0, 1);
|
|
196
|
+
};
|
|
197
|
+
CesiumMath.sinh = defaultValue_default(Math.sinh, function sinh(value) {
|
|
198
|
+
return (Math.exp(value) - Math.exp(-value)) / 2;
|
|
199
|
+
});
|
|
200
|
+
CesiumMath.cosh = defaultValue_default(Math.cosh, function cosh(value) {
|
|
201
|
+
return (Math.exp(value) + Math.exp(-value)) / 2;
|
|
202
|
+
});
|
|
203
|
+
CesiumMath.lerp = function(p, q, time) {
|
|
204
|
+
return (1 - time) * p + time * q;
|
|
205
|
+
};
|
|
206
|
+
CesiumMath.PI = Math.PI;
|
|
207
|
+
CesiumMath.ONE_OVER_PI = 1 / Math.PI;
|
|
208
|
+
CesiumMath.PI_OVER_TWO = Math.PI / 2;
|
|
209
|
+
CesiumMath.PI_OVER_THREE = Math.PI / 3;
|
|
210
|
+
CesiumMath.PI_OVER_FOUR = Math.PI / 4;
|
|
211
|
+
CesiumMath.PI_OVER_SIX = Math.PI / 6;
|
|
212
|
+
CesiumMath.THREE_PI_OVER_TWO = 3 * Math.PI / 2;
|
|
213
|
+
CesiumMath.TWO_PI = 2 * Math.PI;
|
|
214
|
+
CesiumMath.ONE_OVER_TWO_PI = 1 / (2 * Math.PI);
|
|
215
|
+
CesiumMath.RADIANS_PER_DEGREE = Math.PI / 180;
|
|
216
|
+
CesiumMath.DEGREES_PER_RADIAN = 180 / Math.PI;
|
|
217
|
+
CesiumMath.RADIANS_PER_ARCSECOND = CesiumMath.RADIANS_PER_DEGREE / 3600;
|
|
218
|
+
CesiumMath.toRadians = function(degrees) {
|
|
219
|
+
if (!defined_default(degrees)) {
|
|
220
|
+
throw new DeveloperError_default("degrees is required.");
|
|
221
|
+
}
|
|
222
|
+
return degrees * CesiumMath.RADIANS_PER_DEGREE;
|
|
223
|
+
};
|
|
224
|
+
CesiumMath.toDegrees = function(radians) {
|
|
225
|
+
if (!defined_default(radians)) {
|
|
226
|
+
throw new DeveloperError_default("radians is required.");
|
|
227
|
+
}
|
|
228
|
+
return radians * CesiumMath.DEGREES_PER_RADIAN;
|
|
229
|
+
};
|
|
230
|
+
CesiumMath.convertLongitudeRange = function(angle) {
|
|
231
|
+
if (!defined_default(angle)) {
|
|
232
|
+
throw new DeveloperError_default("angle is required.");
|
|
233
|
+
}
|
|
234
|
+
const twoPi = CesiumMath.TWO_PI;
|
|
235
|
+
const simplified = angle - Math.floor(angle / twoPi) * twoPi;
|
|
236
|
+
if (simplified < -Math.PI) {
|
|
237
|
+
return simplified + twoPi;
|
|
238
|
+
}
|
|
239
|
+
if (simplified >= Math.PI) {
|
|
240
|
+
return simplified - twoPi;
|
|
241
|
+
}
|
|
242
|
+
return simplified;
|
|
243
|
+
};
|
|
244
|
+
CesiumMath.clampToLatitudeRange = function(angle) {
|
|
245
|
+
if (!defined_default(angle)) {
|
|
246
|
+
throw new DeveloperError_default("angle is required.");
|
|
247
|
+
}
|
|
248
|
+
return CesiumMath.clamp(
|
|
249
|
+
angle,
|
|
250
|
+
-1 * CesiumMath.PI_OVER_TWO,
|
|
251
|
+
CesiumMath.PI_OVER_TWO
|
|
252
|
+
);
|
|
253
|
+
};
|
|
254
|
+
CesiumMath.negativePiToPi = function(angle) {
|
|
255
|
+
if (!defined_default(angle)) {
|
|
256
|
+
throw new DeveloperError_default("angle is required.");
|
|
257
|
+
}
|
|
258
|
+
if (angle >= -CesiumMath.PI && angle <= CesiumMath.PI) {
|
|
259
|
+
return angle;
|
|
260
|
+
}
|
|
261
|
+
return CesiumMath.zeroToTwoPi(angle + CesiumMath.PI) - CesiumMath.PI;
|
|
262
|
+
};
|
|
263
|
+
CesiumMath.zeroToTwoPi = function(angle) {
|
|
264
|
+
if (!defined_default(angle)) {
|
|
265
|
+
throw new DeveloperError_default("angle is required.");
|
|
266
|
+
}
|
|
267
|
+
if (angle >= 0 && angle <= CesiumMath.TWO_PI) {
|
|
268
|
+
return angle;
|
|
269
|
+
}
|
|
270
|
+
const mod = CesiumMath.mod(angle, CesiumMath.TWO_PI);
|
|
271
|
+
if (Math.abs(mod) < CesiumMath.EPSILON14 && Math.abs(angle) > CesiumMath.EPSILON14) {
|
|
272
|
+
return CesiumMath.TWO_PI;
|
|
273
|
+
}
|
|
274
|
+
return mod;
|
|
275
|
+
};
|
|
276
|
+
CesiumMath.mod = function(m, n) {
|
|
277
|
+
if (!defined_default(m)) {
|
|
278
|
+
throw new DeveloperError_default("m is required.");
|
|
279
|
+
}
|
|
280
|
+
if (!defined_default(n)) {
|
|
281
|
+
throw new DeveloperError_default("n is required.");
|
|
282
|
+
}
|
|
283
|
+
if (n === 0) {
|
|
284
|
+
throw new DeveloperError_default("divisor cannot be 0.");
|
|
285
|
+
}
|
|
286
|
+
if (CesiumMath.sign(m) === CesiumMath.sign(n) && Math.abs(m) < Math.abs(n)) {
|
|
287
|
+
return m;
|
|
288
|
+
}
|
|
289
|
+
return (m % n + n) % n;
|
|
290
|
+
};
|
|
291
|
+
CesiumMath.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
|
|
292
|
+
if (!defined_default(left)) {
|
|
293
|
+
throw new DeveloperError_default("left is required.");
|
|
294
|
+
}
|
|
295
|
+
if (!defined_default(right)) {
|
|
296
|
+
throw new DeveloperError_default("right is required.");
|
|
297
|
+
}
|
|
298
|
+
relativeEpsilon = defaultValue_default(relativeEpsilon, 0);
|
|
299
|
+
absoluteEpsilon = defaultValue_default(absoluteEpsilon, relativeEpsilon);
|
|
300
|
+
const absDiff = Math.abs(left - right);
|
|
301
|
+
return absDiff <= absoluteEpsilon || absDiff <= relativeEpsilon * Math.max(Math.abs(left), Math.abs(right));
|
|
302
|
+
};
|
|
303
|
+
CesiumMath.lessThan = function(left, right, absoluteEpsilon) {
|
|
304
|
+
if (!defined_default(left)) {
|
|
305
|
+
throw new DeveloperError_default("first is required.");
|
|
306
|
+
}
|
|
307
|
+
if (!defined_default(right)) {
|
|
308
|
+
throw new DeveloperError_default("second is required.");
|
|
309
|
+
}
|
|
310
|
+
if (!defined_default(absoluteEpsilon)) {
|
|
311
|
+
throw new DeveloperError_default("absoluteEpsilon is required.");
|
|
312
|
+
}
|
|
313
|
+
return left - right < -absoluteEpsilon;
|
|
314
|
+
};
|
|
315
|
+
CesiumMath.lessThanOrEquals = function(left, right, absoluteEpsilon) {
|
|
316
|
+
if (!defined_default(left)) {
|
|
317
|
+
throw new DeveloperError_default("first is required.");
|
|
318
|
+
}
|
|
319
|
+
if (!defined_default(right)) {
|
|
320
|
+
throw new DeveloperError_default("second is required.");
|
|
321
|
+
}
|
|
322
|
+
if (!defined_default(absoluteEpsilon)) {
|
|
323
|
+
throw new DeveloperError_default("absoluteEpsilon is required.");
|
|
324
|
+
}
|
|
325
|
+
return left - right < absoluteEpsilon;
|
|
326
|
+
};
|
|
327
|
+
CesiumMath.greaterThan = function(left, right, absoluteEpsilon) {
|
|
328
|
+
if (!defined_default(left)) {
|
|
329
|
+
throw new DeveloperError_default("first is required.");
|
|
330
|
+
}
|
|
331
|
+
if (!defined_default(right)) {
|
|
332
|
+
throw new DeveloperError_default("second is required.");
|
|
333
|
+
}
|
|
334
|
+
if (!defined_default(absoluteEpsilon)) {
|
|
335
|
+
throw new DeveloperError_default("absoluteEpsilon is required.");
|
|
336
|
+
}
|
|
337
|
+
return left - right > absoluteEpsilon;
|
|
338
|
+
};
|
|
339
|
+
CesiumMath.greaterThanOrEquals = function(left, right, absoluteEpsilon) {
|
|
340
|
+
if (!defined_default(left)) {
|
|
341
|
+
throw new DeveloperError_default("first is required.");
|
|
342
|
+
}
|
|
343
|
+
if (!defined_default(right)) {
|
|
344
|
+
throw new DeveloperError_default("second is required.");
|
|
345
|
+
}
|
|
346
|
+
if (!defined_default(absoluteEpsilon)) {
|
|
347
|
+
throw new DeveloperError_default("absoluteEpsilon is required.");
|
|
348
|
+
}
|
|
349
|
+
return left - right > -absoluteEpsilon;
|
|
350
|
+
};
|
|
351
|
+
var factorials = [1];
|
|
352
|
+
CesiumMath.factorial = function(n) {
|
|
353
|
+
if (typeof n !== "number" || n < 0) {
|
|
354
|
+
throw new DeveloperError_default(
|
|
355
|
+
"A number greater than or equal to 0 is required."
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
const length = factorials.length;
|
|
359
|
+
if (n >= length) {
|
|
360
|
+
let sum = factorials[length - 1];
|
|
361
|
+
for (let i = length; i <= n; i++) {
|
|
362
|
+
const next = sum * i;
|
|
363
|
+
factorials.push(next);
|
|
364
|
+
sum = next;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
return factorials[n];
|
|
368
|
+
};
|
|
369
|
+
CesiumMath.incrementWrap = function(n, maximumValue, minimumValue) {
|
|
370
|
+
minimumValue = defaultValue_default(minimumValue, 0);
|
|
371
|
+
if (!defined_default(n)) {
|
|
372
|
+
throw new DeveloperError_default("n is required.");
|
|
373
|
+
}
|
|
374
|
+
if (maximumValue <= minimumValue) {
|
|
375
|
+
throw new DeveloperError_default("maximumValue must be greater than minimumValue.");
|
|
376
|
+
}
|
|
377
|
+
++n;
|
|
378
|
+
if (n > maximumValue) {
|
|
379
|
+
n = minimumValue;
|
|
380
|
+
}
|
|
381
|
+
return n;
|
|
382
|
+
};
|
|
383
|
+
CesiumMath.isPowerOfTwo = function(n) {
|
|
384
|
+
if (typeof n !== "number" || n < 0 || n > 4294967295) {
|
|
385
|
+
throw new DeveloperError_default("A number between 0 and (2^32)-1 is required.");
|
|
386
|
+
}
|
|
387
|
+
return n !== 0 && (n & n - 1) === 0;
|
|
388
|
+
};
|
|
389
|
+
CesiumMath.nextPowerOfTwo = function(n) {
|
|
390
|
+
if (typeof n !== "number" || n < 0 || n > 2147483648) {
|
|
391
|
+
throw new DeveloperError_default("A number between 0 and 2^31 is required.");
|
|
392
|
+
}
|
|
393
|
+
--n;
|
|
394
|
+
n |= n >> 1;
|
|
395
|
+
n |= n >> 2;
|
|
396
|
+
n |= n >> 4;
|
|
397
|
+
n |= n >> 8;
|
|
398
|
+
n |= n >> 16;
|
|
399
|
+
++n;
|
|
400
|
+
return n;
|
|
401
|
+
};
|
|
402
|
+
CesiumMath.previousPowerOfTwo = function(n) {
|
|
403
|
+
if (typeof n !== "number" || n < 0 || n > 4294967295) {
|
|
404
|
+
throw new DeveloperError_default("A number between 0 and (2^32)-1 is required.");
|
|
405
|
+
}
|
|
406
|
+
n |= n >> 1;
|
|
407
|
+
n |= n >> 2;
|
|
408
|
+
n |= n >> 4;
|
|
409
|
+
n |= n >> 8;
|
|
410
|
+
n |= n >> 16;
|
|
411
|
+
n |= n >> 32;
|
|
412
|
+
n = (n >>> 0) - (n >>> 1);
|
|
413
|
+
return n;
|
|
414
|
+
};
|
|
415
|
+
CesiumMath.clamp = function(value, min, max) {
|
|
416
|
+
Check_default.typeOf.number("value", value);
|
|
417
|
+
Check_default.typeOf.number("min", min);
|
|
418
|
+
Check_default.typeOf.number("max", max);
|
|
419
|
+
return value < min ? min : value > max ? max : value;
|
|
420
|
+
};
|
|
421
|
+
var randomNumberGenerator = new import_mersenne_twister.default();
|
|
422
|
+
CesiumMath.setRandomNumberSeed = function(seed) {
|
|
423
|
+
if (!defined_default(seed)) {
|
|
424
|
+
throw new DeveloperError_default("seed is required.");
|
|
425
|
+
}
|
|
426
|
+
randomNumberGenerator = new import_mersenne_twister.default(seed);
|
|
427
|
+
};
|
|
428
|
+
CesiumMath.nextRandomNumber = function() {
|
|
429
|
+
return randomNumberGenerator.random();
|
|
430
|
+
};
|
|
431
|
+
CesiumMath.randomBetween = function(min, max) {
|
|
432
|
+
return CesiumMath.nextRandomNumber() * (max - min) + min;
|
|
433
|
+
};
|
|
434
|
+
CesiumMath.acosClamped = function(value) {
|
|
435
|
+
if (!defined_default(value)) {
|
|
436
|
+
throw new DeveloperError_default("value is required.");
|
|
437
|
+
}
|
|
438
|
+
return Math.acos(CesiumMath.clamp(value, -1, 1));
|
|
439
|
+
};
|
|
440
|
+
CesiumMath.asinClamped = function(value) {
|
|
441
|
+
if (!defined_default(value)) {
|
|
442
|
+
throw new DeveloperError_default("value is required.");
|
|
443
|
+
}
|
|
444
|
+
return Math.asin(CesiumMath.clamp(value, -1, 1));
|
|
445
|
+
};
|
|
446
|
+
CesiumMath.chordLength = function(angle, radius) {
|
|
447
|
+
if (!defined_default(angle)) {
|
|
448
|
+
throw new DeveloperError_default("angle is required.");
|
|
449
|
+
}
|
|
450
|
+
if (!defined_default(radius)) {
|
|
451
|
+
throw new DeveloperError_default("radius is required.");
|
|
452
|
+
}
|
|
453
|
+
return 2 * radius * Math.sin(angle * 0.5);
|
|
454
|
+
};
|
|
455
|
+
CesiumMath.logBase = function(number, base) {
|
|
456
|
+
if (!defined_default(number)) {
|
|
457
|
+
throw new DeveloperError_default("number is required.");
|
|
458
|
+
}
|
|
459
|
+
if (!defined_default(base)) {
|
|
460
|
+
throw new DeveloperError_default("base is required.");
|
|
461
|
+
}
|
|
462
|
+
return Math.log(number) / Math.log(base);
|
|
463
|
+
};
|
|
464
|
+
CesiumMath.cbrt = defaultValue_default(Math.cbrt, function cbrt(number) {
|
|
465
|
+
const result = Math.pow(Math.abs(number), 1 / 3);
|
|
466
|
+
return number < 0 ? -result : result;
|
|
467
|
+
});
|
|
468
|
+
CesiumMath.log2 = defaultValue_default(Math.log2, function log2(number) {
|
|
469
|
+
return Math.log(number) * Math.LOG2E;
|
|
470
|
+
});
|
|
471
|
+
CesiumMath.fog = function(distanceToCamera, density) {
|
|
472
|
+
const scalar = distanceToCamera * density;
|
|
473
|
+
return 1 - Math.exp(-(scalar * scalar));
|
|
474
|
+
};
|
|
475
|
+
CesiumMath.fastApproximateAtan = function(x) {
|
|
476
|
+
Check_default.typeOf.number("x", x);
|
|
477
|
+
return x * (-0.1784 * Math.abs(x) - 0.0663 * x * x + 1.0301);
|
|
478
|
+
};
|
|
479
|
+
CesiumMath.fastApproximateAtan2 = function(x, y) {
|
|
480
|
+
Check_default.typeOf.number("x", x);
|
|
481
|
+
Check_default.typeOf.number("y", y);
|
|
482
|
+
let opposite;
|
|
483
|
+
let t = Math.abs(x);
|
|
484
|
+
opposite = Math.abs(y);
|
|
485
|
+
const adjacent = Math.max(t, opposite);
|
|
486
|
+
opposite = Math.min(t, opposite);
|
|
487
|
+
const oppositeOverAdjacent = opposite / adjacent;
|
|
488
|
+
if (isNaN(oppositeOverAdjacent)) {
|
|
489
|
+
throw new DeveloperError_default("either x or y must be nonzero");
|
|
490
|
+
}
|
|
491
|
+
t = CesiumMath.fastApproximateAtan(oppositeOverAdjacent);
|
|
492
|
+
t = Math.abs(y) > Math.abs(x) ? CesiumMath.PI_OVER_TWO - t : t;
|
|
493
|
+
t = x < 0 ? CesiumMath.PI - t : t;
|
|
494
|
+
t = y < 0 ? -t : t;
|
|
495
|
+
return t;
|
|
496
|
+
};
|
|
497
|
+
var Math_default = CesiumMath;
|
|
498
|
+
|
|
499
|
+
export {
|
|
500
|
+
Math_default
|
|
501
|
+
};
|