@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,511 @@
|
|
|
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
|
+
GeometryOffsetAttribute_default
|
|
28
|
+
} from "./chunk-MN34FIF5.js";
|
|
29
|
+
import {
|
|
30
|
+
VertexFormat_default
|
|
31
|
+
} from "./chunk-ZQRZBHYI.js";
|
|
32
|
+
import {
|
|
33
|
+
IndexDatatype_default
|
|
34
|
+
} from "./chunk-LX6XV4DK.js";
|
|
35
|
+
import {
|
|
36
|
+
GeometryAttributes_default
|
|
37
|
+
} from "./chunk-PIXK6KHB.js";
|
|
38
|
+
import {
|
|
39
|
+
GeometryAttribute_default,
|
|
40
|
+
Geometry_default,
|
|
41
|
+
PrimitiveType_default
|
|
42
|
+
} from "./chunk-R3HUGXBH.js";
|
|
43
|
+
import {
|
|
44
|
+
BoundingSphere_default
|
|
45
|
+
} from "./chunk-HOT2SNXP.js";
|
|
46
|
+
import {
|
|
47
|
+
ComponentDatatype_default
|
|
48
|
+
} from "./chunk-ARPTYYKS.js";
|
|
49
|
+
import {
|
|
50
|
+
Cartesian2_default,
|
|
51
|
+
Cartesian3_default,
|
|
52
|
+
Ellipsoid_default
|
|
53
|
+
} from "./chunk-LGJUI2CE.js";
|
|
54
|
+
import {
|
|
55
|
+
Math_default
|
|
56
|
+
} from "./chunk-BP467WX3.js";
|
|
57
|
+
import {
|
|
58
|
+
defaultValue_default
|
|
59
|
+
} from "./chunk-CWJQGBWT.js";
|
|
60
|
+
import {
|
|
61
|
+
DeveloperError_default
|
|
62
|
+
} from "./chunk-5HLGKKG3.js";
|
|
63
|
+
import {
|
|
64
|
+
defined_default
|
|
65
|
+
} from "./chunk-YBKFS53K.js";
|
|
66
|
+
|
|
67
|
+
// packages/engine/Source/Core/EllipsoidGeometry.js
|
|
68
|
+
var scratchPosition = new Cartesian3_default();
|
|
69
|
+
var scratchNormal = new Cartesian3_default();
|
|
70
|
+
var scratchTangent = new Cartesian3_default();
|
|
71
|
+
var scratchBitangent = new Cartesian3_default();
|
|
72
|
+
var scratchNormalST = new Cartesian3_default();
|
|
73
|
+
var defaultRadii = new Cartesian3_default(1, 1, 1);
|
|
74
|
+
var cos = Math.cos;
|
|
75
|
+
var sin = Math.sin;
|
|
76
|
+
function EllipsoidGeometry(options) {
|
|
77
|
+
options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
|
|
78
|
+
const radii = defaultValue_default(options.radii, defaultRadii);
|
|
79
|
+
const innerRadii = defaultValue_default(options.innerRadii, radii);
|
|
80
|
+
const minimumClock = defaultValue_default(options.minimumClock, 0);
|
|
81
|
+
const maximumClock = defaultValue_default(options.maximumClock, Math_default.TWO_PI);
|
|
82
|
+
const minimumCone = defaultValue_default(options.minimumCone, 0);
|
|
83
|
+
const maximumCone = defaultValue_default(options.maximumCone, Math_default.PI);
|
|
84
|
+
const stackPartitions = Math.round(defaultValue_default(options.stackPartitions, 64));
|
|
85
|
+
const slicePartitions = Math.round(defaultValue_default(options.slicePartitions, 64));
|
|
86
|
+
const vertexFormat = defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT);
|
|
87
|
+
if (slicePartitions < 3) {
|
|
88
|
+
throw new DeveloperError_default(
|
|
89
|
+
"options.slicePartitions cannot be less than three."
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
if (stackPartitions < 3) {
|
|
93
|
+
throw new DeveloperError_default(
|
|
94
|
+
"options.stackPartitions cannot be less than three."
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
this._radii = Cartesian3_default.clone(radii);
|
|
98
|
+
this._innerRadii = Cartesian3_default.clone(innerRadii);
|
|
99
|
+
this._minimumClock = minimumClock;
|
|
100
|
+
this._maximumClock = maximumClock;
|
|
101
|
+
this._minimumCone = minimumCone;
|
|
102
|
+
this._maximumCone = maximumCone;
|
|
103
|
+
this._stackPartitions = stackPartitions;
|
|
104
|
+
this._slicePartitions = slicePartitions;
|
|
105
|
+
this._vertexFormat = VertexFormat_default.clone(vertexFormat);
|
|
106
|
+
this._offsetAttribute = options.offsetAttribute;
|
|
107
|
+
this._workerName = "createEllipsoidGeometry";
|
|
108
|
+
}
|
|
109
|
+
EllipsoidGeometry.packedLength = 2 * Cartesian3_default.packedLength + VertexFormat_default.packedLength + 7;
|
|
110
|
+
EllipsoidGeometry.pack = function(value, array, startingIndex) {
|
|
111
|
+
if (!defined_default(value)) {
|
|
112
|
+
throw new DeveloperError_default("value is required");
|
|
113
|
+
}
|
|
114
|
+
if (!defined_default(array)) {
|
|
115
|
+
throw new DeveloperError_default("array is required");
|
|
116
|
+
}
|
|
117
|
+
startingIndex = defaultValue_default(startingIndex, 0);
|
|
118
|
+
Cartesian3_default.pack(value._radii, array, startingIndex);
|
|
119
|
+
startingIndex += Cartesian3_default.packedLength;
|
|
120
|
+
Cartesian3_default.pack(value._innerRadii, array, startingIndex);
|
|
121
|
+
startingIndex += Cartesian3_default.packedLength;
|
|
122
|
+
VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
|
|
123
|
+
startingIndex += VertexFormat_default.packedLength;
|
|
124
|
+
array[startingIndex++] = value._minimumClock;
|
|
125
|
+
array[startingIndex++] = value._maximumClock;
|
|
126
|
+
array[startingIndex++] = value._minimumCone;
|
|
127
|
+
array[startingIndex++] = value._maximumCone;
|
|
128
|
+
array[startingIndex++] = value._stackPartitions;
|
|
129
|
+
array[startingIndex++] = value._slicePartitions;
|
|
130
|
+
array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
|
|
131
|
+
return array;
|
|
132
|
+
};
|
|
133
|
+
var scratchRadii = new Cartesian3_default();
|
|
134
|
+
var scratchInnerRadii = new Cartesian3_default();
|
|
135
|
+
var scratchVertexFormat = new VertexFormat_default();
|
|
136
|
+
var scratchOptions = {
|
|
137
|
+
radii: scratchRadii,
|
|
138
|
+
innerRadii: scratchInnerRadii,
|
|
139
|
+
vertexFormat: scratchVertexFormat,
|
|
140
|
+
minimumClock: void 0,
|
|
141
|
+
maximumClock: void 0,
|
|
142
|
+
minimumCone: void 0,
|
|
143
|
+
maximumCone: void 0,
|
|
144
|
+
stackPartitions: void 0,
|
|
145
|
+
slicePartitions: void 0,
|
|
146
|
+
offsetAttribute: void 0
|
|
147
|
+
};
|
|
148
|
+
EllipsoidGeometry.unpack = function(array, startingIndex, result) {
|
|
149
|
+
if (!defined_default(array)) {
|
|
150
|
+
throw new DeveloperError_default("array is required");
|
|
151
|
+
}
|
|
152
|
+
startingIndex = defaultValue_default(startingIndex, 0);
|
|
153
|
+
const radii = Cartesian3_default.unpack(array, startingIndex, scratchRadii);
|
|
154
|
+
startingIndex += Cartesian3_default.packedLength;
|
|
155
|
+
const innerRadii = Cartesian3_default.unpack(array, startingIndex, scratchInnerRadii);
|
|
156
|
+
startingIndex += Cartesian3_default.packedLength;
|
|
157
|
+
const vertexFormat = VertexFormat_default.unpack(
|
|
158
|
+
array,
|
|
159
|
+
startingIndex,
|
|
160
|
+
scratchVertexFormat
|
|
161
|
+
);
|
|
162
|
+
startingIndex += VertexFormat_default.packedLength;
|
|
163
|
+
const minimumClock = array[startingIndex++];
|
|
164
|
+
const maximumClock = array[startingIndex++];
|
|
165
|
+
const minimumCone = array[startingIndex++];
|
|
166
|
+
const maximumCone = array[startingIndex++];
|
|
167
|
+
const stackPartitions = array[startingIndex++];
|
|
168
|
+
const slicePartitions = array[startingIndex++];
|
|
169
|
+
const offsetAttribute = array[startingIndex];
|
|
170
|
+
if (!defined_default(result)) {
|
|
171
|
+
scratchOptions.minimumClock = minimumClock;
|
|
172
|
+
scratchOptions.maximumClock = maximumClock;
|
|
173
|
+
scratchOptions.minimumCone = minimumCone;
|
|
174
|
+
scratchOptions.maximumCone = maximumCone;
|
|
175
|
+
scratchOptions.stackPartitions = stackPartitions;
|
|
176
|
+
scratchOptions.slicePartitions = slicePartitions;
|
|
177
|
+
scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
|
178
|
+
return new EllipsoidGeometry(scratchOptions);
|
|
179
|
+
}
|
|
180
|
+
result._radii = Cartesian3_default.clone(radii, result._radii);
|
|
181
|
+
result._innerRadii = Cartesian3_default.clone(innerRadii, result._innerRadii);
|
|
182
|
+
result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
|
|
183
|
+
result._minimumClock = minimumClock;
|
|
184
|
+
result._maximumClock = maximumClock;
|
|
185
|
+
result._minimumCone = minimumCone;
|
|
186
|
+
result._maximumCone = maximumCone;
|
|
187
|
+
result._stackPartitions = stackPartitions;
|
|
188
|
+
result._slicePartitions = slicePartitions;
|
|
189
|
+
result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
|
190
|
+
return result;
|
|
191
|
+
};
|
|
192
|
+
EllipsoidGeometry.createGeometry = function(ellipsoidGeometry) {
|
|
193
|
+
const radii = ellipsoidGeometry._radii;
|
|
194
|
+
if (radii.x <= 0 || radii.y <= 0 || radii.z <= 0) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const innerRadii = ellipsoidGeometry._innerRadii;
|
|
198
|
+
if (innerRadii.x <= 0 || innerRadii.y <= 0 || innerRadii.z <= 0) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const minimumClock = ellipsoidGeometry._minimumClock;
|
|
202
|
+
const maximumClock = ellipsoidGeometry._maximumClock;
|
|
203
|
+
const minimumCone = ellipsoidGeometry._minimumCone;
|
|
204
|
+
const maximumCone = ellipsoidGeometry._maximumCone;
|
|
205
|
+
const vertexFormat = ellipsoidGeometry._vertexFormat;
|
|
206
|
+
let slicePartitions = ellipsoidGeometry._slicePartitions + 1;
|
|
207
|
+
let stackPartitions = ellipsoidGeometry._stackPartitions + 1;
|
|
208
|
+
slicePartitions = Math.round(
|
|
209
|
+
slicePartitions * Math.abs(maximumClock - minimumClock) / Math_default.TWO_PI
|
|
210
|
+
);
|
|
211
|
+
stackPartitions = Math.round(
|
|
212
|
+
stackPartitions * Math.abs(maximumCone - minimumCone) / Math_default.PI
|
|
213
|
+
);
|
|
214
|
+
if (slicePartitions < 2) {
|
|
215
|
+
slicePartitions = 2;
|
|
216
|
+
}
|
|
217
|
+
if (stackPartitions < 2) {
|
|
218
|
+
stackPartitions = 2;
|
|
219
|
+
}
|
|
220
|
+
let i;
|
|
221
|
+
let j;
|
|
222
|
+
let index = 0;
|
|
223
|
+
const phis = [minimumCone];
|
|
224
|
+
const thetas = [minimumClock];
|
|
225
|
+
for (i = 0; i < stackPartitions; i++) {
|
|
226
|
+
phis.push(
|
|
227
|
+
minimumCone + i * (maximumCone - minimumCone) / (stackPartitions - 1)
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
phis.push(maximumCone);
|
|
231
|
+
for (j = 0; j < slicePartitions; j++) {
|
|
232
|
+
thetas.push(
|
|
233
|
+
minimumClock + j * (maximumClock - minimumClock) / (slicePartitions - 1)
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
thetas.push(maximumClock);
|
|
237
|
+
const numPhis = phis.length;
|
|
238
|
+
const numThetas = thetas.length;
|
|
239
|
+
let extraIndices = 0;
|
|
240
|
+
let vertexMultiplier = 1;
|
|
241
|
+
const hasInnerSurface = innerRadii.x !== radii.x || innerRadii.y !== radii.y || innerRadii.z !== radii.z;
|
|
242
|
+
let isTopOpen = false;
|
|
243
|
+
let isBotOpen = false;
|
|
244
|
+
let isClockOpen = false;
|
|
245
|
+
if (hasInnerSurface) {
|
|
246
|
+
vertexMultiplier = 2;
|
|
247
|
+
if (minimumCone > 0) {
|
|
248
|
+
isTopOpen = true;
|
|
249
|
+
extraIndices += slicePartitions - 1;
|
|
250
|
+
}
|
|
251
|
+
if (maximumCone < Math.PI) {
|
|
252
|
+
isBotOpen = true;
|
|
253
|
+
extraIndices += slicePartitions - 1;
|
|
254
|
+
}
|
|
255
|
+
if ((maximumClock - minimumClock) % Math_default.TWO_PI) {
|
|
256
|
+
isClockOpen = true;
|
|
257
|
+
extraIndices += (stackPartitions - 1) * 2 + 1;
|
|
258
|
+
} else {
|
|
259
|
+
extraIndices += 1;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
const vertexCount = numThetas * numPhis * vertexMultiplier;
|
|
263
|
+
const positions = new Float64Array(vertexCount * 3);
|
|
264
|
+
const isInner = new Array(vertexCount).fill(false);
|
|
265
|
+
const negateNormal = new Array(vertexCount).fill(false);
|
|
266
|
+
const indexCount = slicePartitions * stackPartitions * vertexMultiplier;
|
|
267
|
+
const numIndices = 6 * (indexCount + extraIndices + 1 - (slicePartitions + stackPartitions) * vertexMultiplier);
|
|
268
|
+
const indices = IndexDatatype_default.createTypedArray(indexCount, numIndices);
|
|
269
|
+
const normals = vertexFormat.normal ? new Float32Array(vertexCount * 3) : void 0;
|
|
270
|
+
const tangents = vertexFormat.tangent ? new Float32Array(vertexCount * 3) : void 0;
|
|
271
|
+
const bitangents = vertexFormat.bitangent ? new Float32Array(vertexCount * 3) : void 0;
|
|
272
|
+
const st = vertexFormat.st ? new Float32Array(vertexCount * 2) : void 0;
|
|
273
|
+
const sinPhi = new Array(numPhis);
|
|
274
|
+
const cosPhi = new Array(numPhis);
|
|
275
|
+
for (i = 0; i < numPhis; i++) {
|
|
276
|
+
sinPhi[i] = sin(phis[i]);
|
|
277
|
+
cosPhi[i] = cos(phis[i]);
|
|
278
|
+
}
|
|
279
|
+
const sinTheta = new Array(numThetas);
|
|
280
|
+
const cosTheta = new Array(numThetas);
|
|
281
|
+
for (j = 0; j < numThetas; j++) {
|
|
282
|
+
cosTheta[j] = cos(thetas[j]);
|
|
283
|
+
sinTheta[j] = sin(thetas[j]);
|
|
284
|
+
}
|
|
285
|
+
for (i = 0; i < numPhis; i++) {
|
|
286
|
+
for (j = 0; j < numThetas; j++) {
|
|
287
|
+
positions[index++] = radii.x * sinPhi[i] * cosTheta[j];
|
|
288
|
+
positions[index++] = radii.y * sinPhi[i] * sinTheta[j];
|
|
289
|
+
positions[index++] = radii.z * cosPhi[i];
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
let vertexIndex = vertexCount / 2;
|
|
293
|
+
if (hasInnerSurface) {
|
|
294
|
+
for (i = 0; i < numPhis; i++) {
|
|
295
|
+
for (j = 0; j < numThetas; j++) {
|
|
296
|
+
positions[index++] = innerRadii.x * sinPhi[i] * cosTheta[j];
|
|
297
|
+
positions[index++] = innerRadii.y * sinPhi[i] * sinTheta[j];
|
|
298
|
+
positions[index++] = innerRadii.z * cosPhi[i];
|
|
299
|
+
isInner[vertexIndex] = true;
|
|
300
|
+
if (i > 0 && i !== numPhis - 1 && j !== 0 && j !== numThetas - 1) {
|
|
301
|
+
negateNormal[vertexIndex] = true;
|
|
302
|
+
}
|
|
303
|
+
vertexIndex++;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
index = 0;
|
|
308
|
+
let topOffset;
|
|
309
|
+
let bottomOffset;
|
|
310
|
+
for (i = 1; i < numPhis - 2; i++) {
|
|
311
|
+
topOffset = i * numThetas;
|
|
312
|
+
bottomOffset = (i + 1) * numThetas;
|
|
313
|
+
for (j = 1; j < numThetas - 2; j++) {
|
|
314
|
+
indices[index++] = bottomOffset + j;
|
|
315
|
+
indices[index++] = bottomOffset + j + 1;
|
|
316
|
+
indices[index++] = topOffset + j + 1;
|
|
317
|
+
indices[index++] = bottomOffset + j;
|
|
318
|
+
indices[index++] = topOffset + j + 1;
|
|
319
|
+
indices[index++] = topOffset + j;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
if (hasInnerSurface) {
|
|
323
|
+
const offset = numPhis * numThetas;
|
|
324
|
+
for (i = 1; i < numPhis - 2; i++) {
|
|
325
|
+
topOffset = offset + i * numThetas;
|
|
326
|
+
bottomOffset = offset + (i + 1) * numThetas;
|
|
327
|
+
for (j = 1; j < numThetas - 2; j++) {
|
|
328
|
+
indices[index++] = bottomOffset + j;
|
|
329
|
+
indices[index++] = topOffset + j;
|
|
330
|
+
indices[index++] = topOffset + j + 1;
|
|
331
|
+
indices[index++] = bottomOffset + j;
|
|
332
|
+
indices[index++] = topOffset + j + 1;
|
|
333
|
+
indices[index++] = bottomOffset + j + 1;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
let outerOffset;
|
|
338
|
+
let innerOffset;
|
|
339
|
+
if (hasInnerSurface) {
|
|
340
|
+
if (isTopOpen) {
|
|
341
|
+
innerOffset = numPhis * numThetas;
|
|
342
|
+
for (i = 1; i < numThetas - 2; i++) {
|
|
343
|
+
indices[index++] = i;
|
|
344
|
+
indices[index++] = i + 1;
|
|
345
|
+
indices[index++] = innerOffset + i + 1;
|
|
346
|
+
indices[index++] = i;
|
|
347
|
+
indices[index++] = innerOffset + i + 1;
|
|
348
|
+
indices[index++] = innerOffset + i;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
if (isBotOpen) {
|
|
352
|
+
outerOffset = numPhis * numThetas - numThetas;
|
|
353
|
+
innerOffset = numPhis * numThetas * vertexMultiplier - numThetas;
|
|
354
|
+
for (i = 1; i < numThetas - 2; i++) {
|
|
355
|
+
indices[index++] = outerOffset + i + 1;
|
|
356
|
+
indices[index++] = outerOffset + i;
|
|
357
|
+
indices[index++] = innerOffset + i;
|
|
358
|
+
indices[index++] = outerOffset + i + 1;
|
|
359
|
+
indices[index++] = innerOffset + i;
|
|
360
|
+
indices[index++] = innerOffset + i + 1;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
if (isClockOpen) {
|
|
365
|
+
for (i = 1; i < numPhis - 2; i++) {
|
|
366
|
+
innerOffset = numThetas * numPhis + numThetas * i;
|
|
367
|
+
outerOffset = numThetas * i;
|
|
368
|
+
indices[index++] = innerOffset;
|
|
369
|
+
indices[index++] = outerOffset + numThetas;
|
|
370
|
+
indices[index++] = outerOffset;
|
|
371
|
+
indices[index++] = innerOffset;
|
|
372
|
+
indices[index++] = innerOffset + numThetas;
|
|
373
|
+
indices[index++] = outerOffset + numThetas;
|
|
374
|
+
}
|
|
375
|
+
for (i = 1; i < numPhis - 2; i++) {
|
|
376
|
+
innerOffset = numThetas * numPhis + numThetas * (i + 1) - 1;
|
|
377
|
+
outerOffset = numThetas * (i + 1) - 1;
|
|
378
|
+
indices[index++] = outerOffset + numThetas;
|
|
379
|
+
indices[index++] = innerOffset;
|
|
380
|
+
indices[index++] = outerOffset;
|
|
381
|
+
indices[index++] = outerOffset + numThetas;
|
|
382
|
+
indices[index++] = innerOffset + numThetas;
|
|
383
|
+
indices[index++] = innerOffset;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
const attributes = new GeometryAttributes_default();
|
|
387
|
+
if (vertexFormat.position) {
|
|
388
|
+
attributes.position = new GeometryAttribute_default({
|
|
389
|
+
componentDatatype: ComponentDatatype_default.DOUBLE,
|
|
390
|
+
componentsPerAttribute: 3,
|
|
391
|
+
values: positions
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
let stIndex = 0;
|
|
395
|
+
let normalIndex = 0;
|
|
396
|
+
let tangentIndex = 0;
|
|
397
|
+
let bitangentIndex = 0;
|
|
398
|
+
const vertexCountHalf = vertexCount / 2;
|
|
399
|
+
let ellipsoid;
|
|
400
|
+
const ellipsoidOuter = Ellipsoid_default.fromCartesian3(radii);
|
|
401
|
+
const ellipsoidInner = Ellipsoid_default.fromCartesian3(innerRadii);
|
|
402
|
+
if (vertexFormat.st || vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent) {
|
|
403
|
+
for (i = 0; i < vertexCount; i++) {
|
|
404
|
+
ellipsoid = isInner[i] ? ellipsoidInner : ellipsoidOuter;
|
|
405
|
+
const position = Cartesian3_default.fromArray(positions, i * 3, scratchPosition);
|
|
406
|
+
const normal = ellipsoid.geodeticSurfaceNormal(position, scratchNormal);
|
|
407
|
+
if (negateNormal[i]) {
|
|
408
|
+
Cartesian3_default.negate(normal, normal);
|
|
409
|
+
}
|
|
410
|
+
if (vertexFormat.st) {
|
|
411
|
+
const normalST = Cartesian2_default.negate(normal, scratchNormalST);
|
|
412
|
+
st[stIndex++] = Math.atan2(normalST.y, normalST.x) / Math_default.TWO_PI + 0.5;
|
|
413
|
+
st[stIndex++] = Math.asin(normal.z) / Math.PI + 0.5;
|
|
414
|
+
}
|
|
415
|
+
if (vertexFormat.normal) {
|
|
416
|
+
normals[normalIndex++] = normal.x;
|
|
417
|
+
normals[normalIndex++] = normal.y;
|
|
418
|
+
normals[normalIndex++] = normal.z;
|
|
419
|
+
}
|
|
420
|
+
if (vertexFormat.tangent || vertexFormat.bitangent) {
|
|
421
|
+
const tangent = scratchTangent;
|
|
422
|
+
let tangetOffset = 0;
|
|
423
|
+
let unit;
|
|
424
|
+
if (isInner[i]) {
|
|
425
|
+
tangetOffset = vertexCountHalf;
|
|
426
|
+
}
|
|
427
|
+
if (!isTopOpen && i >= tangetOffset && i < tangetOffset + numThetas * 2) {
|
|
428
|
+
unit = Cartesian3_default.UNIT_X;
|
|
429
|
+
} else {
|
|
430
|
+
unit = Cartesian3_default.UNIT_Z;
|
|
431
|
+
}
|
|
432
|
+
Cartesian3_default.cross(unit, normal, tangent);
|
|
433
|
+
Cartesian3_default.normalize(tangent, tangent);
|
|
434
|
+
if (vertexFormat.tangent) {
|
|
435
|
+
tangents[tangentIndex++] = tangent.x;
|
|
436
|
+
tangents[tangentIndex++] = tangent.y;
|
|
437
|
+
tangents[tangentIndex++] = tangent.z;
|
|
438
|
+
}
|
|
439
|
+
if (vertexFormat.bitangent) {
|
|
440
|
+
const bitangent = Cartesian3_default.cross(normal, tangent, scratchBitangent);
|
|
441
|
+
Cartesian3_default.normalize(bitangent, bitangent);
|
|
442
|
+
bitangents[bitangentIndex++] = bitangent.x;
|
|
443
|
+
bitangents[bitangentIndex++] = bitangent.y;
|
|
444
|
+
bitangents[bitangentIndex++] = bitangent.z;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
if (vertexFormat.st) {
|
|
449
|
+
attributes.st = new GeometryAttribute_default({
|
|
450
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
451
|
+
componentsPerAttribute: 2,
|
|
452
|
+
values: st
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
if (vertexFormat.normal) {
|
|
456
|
+
attributes.normal = new GeometryAttribute_default({
|
|
457
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
458
|
+
componentsPerAttribute: 3,
|
|
459
|
+
values: normals
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
if (vertexFormat.tangent) {
|
|
463
|
+
attributes.tangent = new GeometryAttribute_default({
|
|
464
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
465
|
+
componentsPerAttribute: 3,
|
|
466
|
+
values: tangents
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
if (vertexFormat.bitangent) {
|
|
470
|
+
attributes.bitangent = new GeometryAttribute_default({
|
|
471
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
472
|
+
componentsPerAttribute: 3,
|
|
473
|
+
values: bitangents
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
if (defined_default(ellipsoidGeometry._offsetAttribute)) {
|
|
478
|
+
const length = positions.length;
|
|
479
|
+
const offsetValue = ellipsoidGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
|
480
|
+
const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
|
|
481
|
+
attributes.applyOffset = new GeometryAttribute_default({
|
|
482
|
+
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
|
483
|
+
componentsPerAttribute: 1,
|
|
484
|
+
values: applyOffset
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
return new Geometry_default({
|
|
488
|
+
attributes,
|
|
489
|
+
indices,
|
|
490
|
+
primitiveType: PrimitiveType_default.TRIANGLES,
|
|
491
|
+
boundingSphere: BoundingSphere_default.fromEllipsoid(ellipsoidOuter),
|
|
492
|
+
offsetAttribute: ellipsoidGeometry._offsetAttribute
|
|
493
|
+
});
|
|
494
|
+
};
|
|
495
|
+
var unitEllipsoidGeometry;
|
|
496
|
+
EllipsoidGeometry.getUnitEllipsoid = function() {
|
|
497
|
+
if (!defined_default(unitEllipsoidGeometry)) {
|
|
498
|
+
unitEllipsoidGeometry = EllipsoidGeometry.createGeometry(
|
|
499
|
+
new EllipsoidGeometry({
|
|
500
|
+
radii: new Cartesian3_default(1, 1, 1),
|
|
501
|
+
vertexFormat: VertexFormat_default.POSITION_ONLY
|
|
502
|
+
})
|
|
503
|
+
);
|
|
504
|
+
}
|
|
505
|
+
return unitEllipsoidGeometry;
|
|
506
|
+
};
|
|
507
|
+
var EllipsoidGeometry_default = EllipsoidGeometry;
|
|
508
|
+
|
|
509
|
+
export {
|
|
510
|
+
EllipsoidGeometry_default
|
|
511
|
+
};
|