create-swdg-frontend 0.1.0
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 +39 -0
- package/bin/index.js +248 -0
- package/package.json +29 -0
- package/template/.husky/commit-msg +42 -0
- package/template/.husky/pre-commit +2 -0
- package/template/.husky/prepare-commit-msg +1 -0
- package/template/.lintstagedrc +5 -0
- package/template/.prettierignore +26 -0
- package/template/.prettierrc.cjs +10 -0
- package/template/.stylelintignore +1 -0
- package/template/.stylelintrc.json +6 -0
- package/template/README.md +36 -0
- package/template/commitlint.config.cjs +64 -0
- package/template/eslint.config.js +96 -0
- package/template/index.html +17 -0
- package/template/interface/user.ts +5 -0
- package/template/package.json +84 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_27.json +438 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1012 -0
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1012 -0
- package/template/public/Cesium1.119/Assets/Images/bing_maps_credit.png +0 -0
- package/template/public/Cesium1.119/Assets/Images/cesium_credit.png +0 -0
- package/template/public/Cesium1.119/Assets/Images/google_earth_credit.png +0 -0
- package/template/public/Cesium1.119/Assets/Images/ion-credit.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/tilemapresource.xml +14 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/airfield.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/airport.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/alcohol-shop.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/america-football.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/art-gallery.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bakery.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bank.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bar.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/baseball.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/basketball.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/beer.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bicycle.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/building.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bus.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cafe.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/camera.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/campsite.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/car.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cemetery.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cesium.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/chemist.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cinema.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/circle-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/circle.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/city.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/clothing-store.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/college.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/commercial.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cricket.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cross.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/dam.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/danger.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/disability.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/dog-park.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/embassy.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/emergency-telephone.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/entrance.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/farm.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/fast-food.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/ferry.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/fire-station.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/fuel.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/garden.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/gift.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/golf.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/grocery.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/hairdresser.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/harbor.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/heart.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/heliport.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/hospital.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/ice-cream.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/industrial.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/land-use.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/laundry.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/library.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/lighthouse.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/lodging.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/logging.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/london-underground.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/marker-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/marker.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/minefield.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/mobilephone.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/monument.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/museum.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/music.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/oil-well.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/park.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/park2.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/parking-garage.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/parking.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/pharmacy.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/pitch.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/place-of-worship.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/playground.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/police.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/polling-place.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/post.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/prison.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail-above.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail-light.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail-metro.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail-underground.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/religious-christian.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/religious-jewish.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/religious-muslim.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/restaurant.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/roadblock.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rocket.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/school.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/scooter.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/shop.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/skiing.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/slaughterhouse.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/soccer.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/square-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/square.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/star-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/star.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/suitcase.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/swimming.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/telephone.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/tennis.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/theatre.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/toilets.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/town-hall.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/town.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/triangle-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/triangle.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/village.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/warehouse.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/waste-basket.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/water.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/wetland.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/zoo.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/moonSmall.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/pin.svg +1 -0
- package/template/public/Cesium1.119/Assets/Textures/waterNormals.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/waterNormalsSmall.jpg +0 -0
- package/template/public/Cesium1.119/Assets/approximateTerrainHeights.json +10924 -0
- package/template/public/Cesium1.119/Cesium.js +185772 -0
- package/template/public/Cesium1.119/ThirdParty/Workers/package.json +3 -0
- package/template/public/Cesium1.119/ThirdParty/Workers/pako_deflate.min.js +1681 -0
- package/template/public/Cesium1.119/ThirdParty/Workers/pako_inflate.min.js +1489 -0
- package/template/public/Cesium1.119/ThirdParty/Workers/z-worker-pako.js +1070 -0
- package/template/public/Cesium1.119/ThirdParty/basis_transcoder.wasm +0 -0
- package/template/public/Cesium1.119/ThirdParty/draco_decoder.wasm +0 -0
- package/template/public/Cesium1.119/ThirdParty/google-earth-dbroot-parser.js +11424 -0
- package/template/public/Cesium1.119/Widgets/Animation/Animation.css +127 -0
- package/template/public/Cesium1.119/Widgets/Animation/lighter.css +78 -0
- package/template/public/Cesium1.119/Widgets/BaseLayerPicker/BaseLayerPicker.css +112 -0
- package/template/public/Cesium1.119/Widgets/BaseLayerPicker/lighter.css +28 -0
- package/template/public/Cesium1.119/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +104 -0
- package/template/public/Cesium1.119/Widgets/CesiumInspector/CesiumInspector.css +115 -0
- package/template/public/Cesium1.119/Widgets/CesiumWidget/CesiumWidget.css +119 -0
- package/template/public/Cesium1.119/Widgets/CesiumWidget/lighter.css +14 -0
- package/template/public/Cesium1.119/Widgets/FullscreenButton/FullscreenButton.css +8 -0
- package/template/public/Cesium1.119/Widgets/Geocoder/Geocoder.css +72 -0
- package/template/public/Cesium1.119/Widgets/Geocoder/lighter.css +17 -0
- package/template/public/Cesium1.119/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +27 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/Mouse.svg +84 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseLeft.svg +76 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseMiddle.svg +76 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseRight.svg +76 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/Touch.svg +120 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchDrag.svg +129 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchRotate.svg +76 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchTilt.svg +135 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchZoom.svg +74 -0
- package/template/public/Cesium1.119/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/TimelineIcons.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/info-loading.gif +0 -0
- package/template/public/Cesium1.119/Widgets/InfoBox/InfoBox.css +94 -0
- package/template/public/Cesium1.119/Widgets/InfoBox/InfoBoxDescription.css +178 -0
- package/template/public/Cesium1.119/Widgets/NavigationHelpButton/NavigationHelpButton.css +95 -0
- package/template/public/Cesium1.119/Widgets/NavigationHelpButton/lighter.css +38 -0
- package/template/public/Cesium1.119/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +15 -0
- package/template/public/Cesium1.119/Widgets/ProjectionPicker/ProjectionPicker.css +46 -0
- package/template/public/Cesium1.119/Widgets/SceneModePicker/SceneModePicker.css +72 -0
- package/template/public/Cesium1.119/Widgets/SelectionIndicator/SelectionIndicator.css +22 -0
- package/template/public/Cesium1.119/Widgets/Timeline/Timeline.css +103 -0
- package/template/public/Cesium1.119/Widgets/Timeline/lighter.css +18 -0
- package/template/public/Cesium1.119/Widgets/VRButton/VRButton.css +8 -0
- package/template/public/Cesium1.119/Widgets/Viewer/Viewer.css +107 -0
- package/template/public/Cesium1.119/Widgets/VoxelInspector/VoxelInspector.css +18 -0
- package/template/public/Cesium1.119/Widgets/lighter.css +246 -0
- package/template/public/Cesium1.119/Widgets/lighterShared.css +46 -0
- package/template/public/Cesium1.119/Widgets/shared.css +103 -0
- package/template/public/Cesium1.119/Widgets/widgets.css +1376 -0
- package/template/public/Cesium1.119/Workers/chunk-3C7WC463.js +611 -0
- package/template/public/Cesium1.119/Workers/chunk-3JW36LZF.js +166 -0
- package/template/public/Cesium1.119/Workers/chunk-4BTGX3WJ.js +264 -0
- package/template/public/Cesium1.119/Workers/chunk-4WRMLZA7.js +128 -0
- package/template/public/Cesium1.119/Workers/chunk-7Z5IIKOJ.js +8046 -0
- package/template/public/Cesium1.119/Workers/chunk-ABGXSJNX.js +341 -0
- package/template/public/Cesium1.119/Workers/chunk-AMQUWUD4.js +269 -0
- package/template/public/Cesium1.119/Workers/chunk-ATPDRNKI.js +28 -0
- package/template/public/Cesium1.119/Workers/chunk-BMHPVZ4H.js +199 -0
- package/template/public/Cesium1.119/Workers/chunk-CBEO3SHS.js +1102 -0
- package/template/public/Cesium1.119/Workers/chunk-CV7DLCWG.js +485 -0
- package/template/public/Cesium1.119/Workers/chunk-DQO6B4EQ.js +76 -0
- package/template/public/Cesium1.119/Workers/chunk-ED3TLP6D.js +91 -0
- package/template/public/Cesium1.119/Workers/chunk-EFZKO5RU.js +42 -0
- package/template/public/Cesium1.119/Workers/chunk-F5IHREXR.js +2678 -0
- package/template/public/Cesium1.119/Workers/chunk-FKRG4HDY.js +516 -0
- package/template/public/Cesium1.119/Workers/chunk-FYOYUPXG.js +399 -0
- package/template/public/Cesium1.119/Workers/chunk-GFN7NNSJ.js +65 -0
- package/template/public/Cesium1.119/Workers/chunk-HEEMUCG6.js +92 -0
- package/template/public/Cesium1.119/Workers/chunk-HSWA4OEL.js +672 -0
- package/template/public/Cesium1.119/Workers/chunk-IAC5XVZV.js +287 -0
- package/template/public/Cesium1.119/Workers/chunk-II4VNKYR.js +50 -0
- package/template/public/Cesium1.119/Workers/chunk-ILGBPNP6.js +28 -0
- package/template/public/Cesium1.119/Workers/chunk-IRH46BDL.js +124 -0
- package/template/public/Cesium1.119/Workers/chunk-IUA6FAOZ.js +31 -0
- package/template/public/Cesium1.119/Workers/chunk-K4ASOM65.js +331 -0
- package/template/public/Cesium1.119/Workers/chunk-KCIZBVXL.js +258 -0
- package/template/public/Cesium1.119/Workers/chunk-KF5NF354.js +162 -0
- package/template/public/Cesium1.119/Workers/chunk-KRKI6AAO.js +773 -0
- package/template/public/Cesium1.119/Workers/chunk-KZNJOCYU.js +162 -0
- package/template/public/Cesium1.119/Workers/chunk-O5IJ3OGP.js +857 -0
- package/template/public/Cesium1.119/Workers/chunk-OO23RBLX.js +183 -0
- package/template/public/Cesium1.119/Workers/chunk-P37AI2DW.js +85 -0
- package/template/public/Cesium1.119/Workers/chunk-PDMQLSBL.js +108 -0
- package/template/public/Cesium1.119/Workers/chunk-PEYJTJPE.js +73 -0
- package/template/public/Cesium1.119/Workers/chunk-POASMU2N.js +2372 -0
- package/template/public/Cesium1.119/Workers/chunk-PXCJYT2S.js +73 -0
- package/template/public/Cesium1.119/Workers/chunk-Q6L7X3LP.js +538 -0
- package/template/public/Cesium1.119/Workers/chunk-QB3MDM4J.js +1670 -0
- package/template/public/Cesium1.119/Workers/chunk-R6KGAEF6.js +392 -0
- package/template/public/Cesium1.119/Workers/chunk-RXTBM4OI.js +57 -0
- package/template/public/Cesium1.119/Workers/chunk-SB224QGV.js +72 -0
- package/template/public/Cesium1.119/Workers/chunk-T6BE4RZK.js +37 -0
- package/template/public/Cesium1.119/Workers/chunk-TAMCUKAR.js +814 -0
- package/template/public/Cesium1.119/Workers/chunk-TMSETF7M.js +579 -0
- package/template/public/Cesium1.119/Workers/chunk-TOGHF3VN.js +376 -0
- package/template/public/Cesium1.119/Workers/chunk-UH2WFNTA.js +111 -0
- package/template/public/Cesium1.119/Workers/chunk-V7JEDBOE.js +573 -0
- package/template/public/Cesium1.119/Workers/chunk-VBIROZR5.js +633 -0
- package/template/public/Cesium1.119/Workers/chunk-W23CU777.js +271 -0
- package/template/public/Cesium1.119/Workers/chunk-X5IHHI6X.js +173 -0
- package/template/public/Cesium1.119/Workers/chunk-XHX2UPDO.js +217 -0
- package/template/public/Cesium1.119/Workers/combineGeometry.js +53 -0
- package/template/public/Cesium1.119/Workers/createBoxGeometry.js +45 -0
- package/template/public/Cesium1.119/Workers/createBoxOutlineGeometry.js +189 -0
- package/template/public/Cesium1.119/Workers/createCircleGeometry.js +148 -0
- package/template/public/Cesium1.119/Workers/createCircleOutlineGeometry.js +105 -0
- package/template/public/Cesium1.119/Workers/createCoplanarPolygonGeometry.js +293 -0
- package/template/public/Cesium1.119/Workers/createCoplanarPolygonOutlineGeometry.js +143 -0
- package/template/public/Cesium1.119/Workers/createCorridorGeometry.js +830 -0
- package/template/public/Cesium1.119/Workers/createCorridorOutlineGeometry.js +417 -0
- package/template/public/Cesium1.119/Workers/createCylinderGeometry.js +47 -0
- package/template/public/Cesium1.119/Workers/createCylinderOutlineGeometry.js +170 -0
- package/template/public/Cesium1.119/Workers/createEllipseGeometry.js +58 -0
- package/template/public/Cesium1.119/Workers/createEllipseOutlineGeometry.js +51 -0
- package/template/public/Cesium1.119/Workers/createEllipsoidGeometry.js +46 -0
- package/template/public/Cesium1.119/Workers/createEllipsoidOutlineGeometry.js +45 -0
- package/template/public/Cesium1.119/Workers/createFrustumGeometry.js +45 -0
- package/template/public/Cesium1.119/Workers/createFrustumOutlineGeometry.js +164 -0
- package/template/public/Cesium1.119/Workers/createGeometry.js +159 -0
- package/template/public/Cesium1.119/Workers/createGroundPolylineGeometry.js +911 -0
- package/template/public/Cesium1.119/Workers/createPlaneGeometry.js +185 -0
- package/template/public/Cesium1.119/Workers/createPlaneOutlineGeometry.js +93 -0
- package/template/public/Cesium1.119/Workers/createPolygonGeometry.js +884 -0
- package/template/public/Cesium1.119/Workers/createPolygonOutlineGeometry.js +359 -0
- package/template/public/Cesium1.119/Workers/createPolylineGeometry.js +349 -0
- package/template/public/Cesium1.119/Workers/createPolylineVolumeGeometry.js +262 -0
- package/template/public/Cesium1.119/Workers/createPolylineVolumeOutlineGeometry.js +177 -0
- package/template/public/Cesium1.119/Workers/createRectangleGeometry.js +787 -0
- package/template/public/Cesium1.119/Workers/createRectangleOutlineGeometry.js +299 -0
- package/template/public/Cesium1.119/Workers/createSimplePolylineGeometry.js +294 -0
- package/template/public/Cesium1.119/Workers/createSphereGeometry.js +84 -0
- package/template/public/Cesium1.119/Workers/createSphereOutlineGeometry.js +83 -0
- package/template/public/Cesium1.119/Workers/createTaskProcessorWorker.js +28 -0
- package/template/public/Cesium1.119/Workers/createVectorTileClampedPolylines.js +289 -0
- package/template/public/Cesium1.119/Workers/createVectorTileGeometries.js +258 -0
- package/template/public/Cesium1.119/Workers/createVectorTilePoints.js +79 -0
- package/template/public/Cesium1.119/Workers/createVectorTilePolygons.js +275 -0
- package/template/public/Cesium1.119/Workers/createVectorTilePolylines.js +176 -0
- package/template/public/Cesium1.119/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +375 -0
- package/template/public/Cesium1.119/Workers/createVerticesFromHeightmap.js +1772 -0
- package/template/public/Cesium1.119/Workers/createVerticesFromQuantizedTerrainMesh.js +425 -0
- package/template/public/Cesium1.119/Workers/createWallGeometry.js +320 -0
- package/template/public/Cesium1.119/Workers/createWallOutlineGeometry.js +229 -0
- package/template/public/Cesium1.119/Workers/decodeDraco.js +227 -0
- package/template/public/Cesium1.119/Workers/decodeGoogleEarthEnterprisePacket.js +1836 -0
- package/template/public/Cesium1.119/Workers/decodeI3S.js +924 -0
- package/template/public/Cesium1.119/Workers/transcodeKTX2.js +3180 -0
- package/template/public/Cesium1.119/Workers/transferTypedArrayTest.js +34 -0
- package/template/public/Cesium1.119/Workers/upsampleQuantizedTerrainMesh.js +534 -0
- package/template/public/Cesium1.119/index.cjs +185632 -0
- package/template/public/Cesium1.119/index.js +182874 -0
- package/template/public/vite.svg +1 -0
- package/template/scripts/gen-api.cjs +178 -0
- package/template/src/App.vue +6 -0
- package/template/src/api/README.md +3 -0
- package/template/src/assets/favicon.svg +49 -0
- package/template/src/components/Body/index.vue +16 -0
- package/template/src/components/Header/index.vue +8 -0
- package/template/src/directive/focus.ts +9 -0
- package/template/src/layout/BasicLayout.vue +28 -0
- package/template/src/main.ts +33 -0
- package/template/src/router/index.ts +24 -0
- package/template/src/stores/README.md +3 -0
- package/template/src/stores/useCounter.ts +12 -0
- package/template/src/styles/alerts.less +85 -0
- package/template/src/styles/global.css +326 -0
- package/template/src/utils/alert.ts +58 -0
- package/template/src/utils/components.ts +21 -0
- package/template/src/utils/composables/useAlert.ts +14 -0
- package/template/src/views/Test/index.vue +23 -0
- package/template/src/views/index.vue +9 -0
- package/template/src/vite-env.d.ts +1 -0
- package/template/swdg/bin/index.js +23 -0
- package/template/swdg/package.json +27 -0
- package/template/tests/README.md +6 -0
- package/template/tests/e2e/README.md +3 -0
- package/template/tests/setup.ts +1 -0
- package/template/tests/unit/example.test.ts +7 -0
- package/template/tests/utils/helpers.ts +1 -0
- package/template/tsconfig.json +51 -0
- package/template/tsconfig.node.json +11 -0
- package/template/types/README.md +3 -0
- package/template/types/global.d.ts +9 -0
- package/template/vite.config.ts +75 -0
- package/template/vitest.config.ts +9 -0
|
@@ -0,0 +1,1670 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.119
|
|
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 et } from "./chunk-ABGXSJNX.js";
|
|
27
|
+
import { a as jt } from "./chunk-DQO6B4EQ.js";
|
|
28
|
+
import { b as Lt } from "./chunk-TAMCUKAR.js";
|
|
29
|
+
import { a as Et } from "./chunk-PDMQLSBL.js";
|
|
30
|
+
import { a as j } from "./chunk-P37AI2DW.js";
|
|
31
|
+
import { a as mt, b as D, c as B, d as U } from "./chunk-X5IHHI6X.js";
|
|
32
|
+
import { a as _t, b as Ut, d as rt } from "./chunk-TMSETF7M.js";
|
|
33
|
+
import { a as dt, b as H } from "./chunk-7Z5IIKOJ.js";
|
|
34
|
+
import { a as k } from "./chunk-KZNJOCYU.js";
|
|
35
|
+
import { a as r, b as Mt, c as R, e as Ot } from "./chunk-POASMU2N.js";
|
|
36
|
+
import { a as N } from "./chunk-R6KGAEF6.js";
|
|
37
|
+
import { a as K } from "./chunk-IUA6FAOZ.js";
|
|
38
|
+
import { a as I, b as pt } from "./chunk-UH2WFNTA.js";
|
|
39
|
+
import { e as f } from "./chunk-PEYJTJPE.js";
|
|
40
|
+
var Yt = new r(),
|
|
41
|
+
Zt = new r(),
|
|
42
|
+
Xt = new r();
|
|
43
|
+
function pe(t, e, n, s, i) {
|
|
44
|
+
(pt.defined("point", t),
|
|
45
|
+
pt.defined("p0", e),
|
|
46
|
+
pt.defined("p1", n),
|
|
47
|
+
pt.defined("p2", s),
|
|
48
|
+
f(i) || (i = new r()));
|
|
49
|
+
let c, o, a, p, u, d, m, l;
|
|
50
|
+
if (f(e.z)) {
|
|
51
|
+
if (r.equalsEpsilon(t, e, N.EPSILON14)) return r.clone(r.UNIT_X, i);
|
|
52
|
+
if (r.equalsEpsilon(t, n, N.EPSILON14)) return r.clone(r.UNIT_Y, i);
|
|
53
|
+
if (r.equalsEpsilon(t, s, N.EPSILON14)) return r.clone(r.UNIT_Z, i);
|
|
54
|
+
((c = r.subtract(n, e, Yt)),
|
|
55
|
+
(o = r.subtract(s, e, Zt)),
|
|
56
|
+
(a = r.subtract(t, e, Xt)),
|
|
57
|
+
(p = r.dot(c, c)),
|
|
58
|
+
(u = r.dot(c, o)),
|
|
59
|
+
(d = r.dot(c, a)),
|
|
60
|
+
(m = r.dot(o, o)),
|
|
61
|
+
(l = r.dot(o, a)));
|
|
62
|
+
} else {
|
|
63
|
+
if (R.equalsEpsilon(t, e, N.EPSILON14)) return r.clone(r.UNIT_X, i);
|
|
64
|
+
if (R.equalsEpsilon(t, n, N.EPSILON14)) return r.clone(r.UNIT_Y, i);
|
|
65
|
+
if (R.equalsEpsilon(t, s, N.EPSILON14)) return r.clone(r.UNIT_Z, i);
|
|
66
|
+
((c = R.subtract(n, e, Yt)),
|
|
67
|
+
(o = R.subtract(s, e, Zt)),
|
|
68
|
+
(a = R.subtract(t, e, Xt)),
|
|
69
|
+
(p = R.dot(c, c)),
|
|
70
|
+
(u = R.dot(c, o)),
|
|
71
|
+
(d = R.dot(c, a)),
|
|
72
|
+
(m = R.dot(o, o)),
|
|
73
|
+
(l = R.dot(o, a)));
|
|
74
|
+
}
|
|
75
|
+
((i.y = m * d - u * l), (i.z = p * l - u * d));
|
|
76
|
+
let h = p * m - u * u;
|
|
77
|
+
if (h !== 0) return ((i.y /= h), (i.z /= h), (i.x = 1 - i.y - i.z), i);
|
|
78
|
+
}
|
|
79
|
+
var Ht = pe;
|
|
80
|
+
var Nt = {};
|
|
81
|
+
Nt.calculateACMR = function (t) {
|
|
82
|
+
t = K(t, K.EMPTY_OBJECT);
|
|
83
|
+
let e = t.indices,
|
|
84
|
+
n = t.maximumIndex,
|
|
85
|
+
s = K(t.cacheSize, 24);
|
|
86
|
+
if (!f(e)) throw new I("indices is required.");
|
|
87
|
+
let i = e.length;
|
|
88
|
+
if (i < 3 || i % 3 !== 0)
|
|
89
|
+
throw new I("indices length must be a multiple of three.");
|
|
90
|
+
if (n <= 0) throw new I("maximumIndex must be greater than zero.");
|
|
91
|
+
if (s < 3) throw new I("cacheSize must be greater than two.");
|
|
92
|
+
if (!f(n)) {
|
|
93
|
+
n = 0;
|
|
94
|
+
let a = 0,
|
|
95
|
+
p = e[a];
|
|
96
|
+
for (; a < i; ) (p > n && (n = p), ++a, (p = e[a]));
|
|
97
|
+
}
|
|
98
|
+
let c = [];
|
|
99
|
+
for (let a = 0; a < n + 1; a++) c[a] = 0;
|
|
100
|
+
let o = s + 1;
|
|
101
|
+
for (let a = 0; a < i; ++a) o - c[e[a]] > s && ((c[e[a]] = o), ++o);
|
|
102
|
+
return (o - s + 1) / (i / 3);
|
|
103
|
+
};
|
|
104
|
+
Nt.tipsify = function (t) {
|
|
105
|
+
t = K(t, K.EMPTY_OBJECT);
|
|
106
|
+
let e = t.indices,
|
|
107
|
+
n = t.maximumIndex,
|
|
108
|
+
s = K(t.cacheSize, 24),
|
|
109
|
+
i;
|
|
110
|
+
function c(C, z, q, V) {
|
|
111
|
+
for (; z.length >= 1; ) {
|
|
112
|
+
let G = z[z.length - 1];
|
|
113
|
+
if ((z.splice(z.length - 1, 1), C[G].numLiveTriangles > 0)) return G;
|
|
114
|
+
}
|
|
115
|
+
for (; i < V; ) {
|
|
116
|
+
if (C[i].numLiveTriangles > 0) return (++i, i - 1);
|
|
117
|
+
++i;
|
|
118
|
+
}
|
|
119
|
+
return -1;
|
|
120
|
+
}
|
|
121
|
+
function o(C, z, q, V, G, M, J) {
|
|
122
|
+
let Y = -1,
|
|
123
|
+
_,
|
|
124
|
+
Pt = -1,
|
|
125
|
+
gt = 0;
|
|
126
|
+
for (; gt < q.length; ) {
|
|
127
|
+
let ft = q[gt];
|
|
128
|
+
(V[ft].numLiveTriangles &&
|
|
129
|
+
((_ = 0),
|
|
130
|
+
G - V[ft].timeStamp + 2 * V[ft].numLiveTriangles <= z &&
|
|
131
|
+
(_ = G - V[ft].timeStamp),
|
|
132
|
+
(_ > Pt || Pt === -1) && ((Pt = _), (Y = ft))),
|
|
133
|
+
++gt);
|
|
134
|
+
}
|
|
135
|
+
return Y === -1 ? c(V, M, C, J) : Y;
|
|
136
|
+
}
|
|
137
|
+
if (!f(e)) throw new I("indices is required.");
|
|
138
|
+
let a = e.length;
|
|
139
|
+
if (a < 3 || a % 3 !== 0)
|
|
140
|
+
throw new I("indices length must be a multiple of three.");
|
|
141
|
+
if (n <= 0) throw new I("maximumIndex must be greater than zero.");
|
|
142
|
+
if (s < 3) throw new I("cacheSize must be greater than two.");
|
|
143
|
+
let p = 0,
|
|
144
|
+
u = 0,
|
|
145
|
+
d = e[u],
|
|
146
|
+
m = a;
|
|
147
|
+
if (f(n)) p = n + 1;
|
|
148
|
+
else {
|
|
149
|
+
for (; u < m; ) (d > p && (p = d), ++u, (d = e[u]));
|
|
150
|
+
if (p === -1) return 0;
|
|
151
|
+
++p;
|
|
152
|
+
}
|
|
153
|
+
let l = [],
|
|
154
|
+
h;
|
|
155
|
+
for (h = 0; h < p; h++)
|
|
156
|
+
l[h] = { numLiveTriangles: 0, timeStamp: 0, vertexTriangles: [] };
|
|
157
|
+
u = 0;
|
|
158
|
+
let y = 0;
|
|
159
|
+
for (; u < m; )
|
|
160
|
+
(l[e[u]].vertexTriangles.push(y),
|
|
161
|
+
++l[e[u]].numLiveTriangles,
|
|
162
|
+
l[e[u + 1]].vertexTriangles.push(y),
|
|
163
|
+
++l[e[u + 1]].numLiveTriangles,
|
|
164
|
+
l[e[u + 2]].vertexTriangles.push(y),
|
|
165
|
+
++l[e[u + 2]].numLiveTriangles,
|
|
166
|
+
++y,
|
|
167
|
+
(u += 3));
|
|
168
|
+
let v = 0,
|
|
169
|
+
b = s + 1;
|
|
170
|
+
i = 1;
|
|
171
|
+
let S = [],
|
|
172
|
+
x = [],
|
|
173
|
+
w,
|
|
174
|
+
A,
|
|
175
|
+
E = 0,
|
|
176
|
+
P = [],
|
|
177
|
+
O = a / 3,
|
|
178
|
+
L = [];
|
|
179
|
+
for (h = 0; h < O; h++) L[h] = !1;
|
|
180
|
+
let g, T;
|
|
181
|
+
for (; v !== -1; ) {
|
|
182
|
+
((S = []), (A = l[v]), (T = A.vertexTriangles.length));
|
|
183
|
+
for (let C = 0; C < T; ++C)
|
|
184
|
+
if (((y = A.vertexTriangles[C]), !L[y])) {
|
|
185
|
+
((L[y] = !0), (u = y + y + y));
|
|
186
|
+
for (let z = 0; z < 3; ++z)
|
|
187
|
+
((g = e[u]),
|
|
188
|
+
S.push(g),
|
|
189
|
+
x.push(g),
|
|
190
|
+
(P[E] = g),
|
|
191
|
+
++E,
|
|
192
|
+
(w = l[g]),
|
|
193
|
+
--w.numLiveTriangles,
|
|
194
|
+
b - w.timeStamp > s && ((w.timeStamp = b), ++b),
|
|
195
|
+
++u);
|
|
196
|
+
}
|
|
197
|
+
v = o(e, s, S, l, b, x, p);
|
|
198
|
+
}
|
|
199
|
+
return P;
|
|
200
|
+
};
|
|
201
|
+
var Wt = Nt;
|
|
202
|
+
var F = {};
|
|
203
|
+
function St(t, e, n, s, i) {
|
|
204
|
+
((t[e++] = n),
|
|
205
|
+
(t[e++] = s),
|
|
206
|
+
(t[e++] = s),
|
|
207
|
+
(t[e++] = i),
|
|
208
|
+
(t[e++] = i),
|
|
209
|
+
(t[e] = n));
|
|
210
|
+
}
|
|
211
|
+
function de(t) {
|
|
212
|
+
let e = t.length,
|
|
213
|
+
n = (e / 3) * 6,
|
|
214
|
+
s = j.createTypedArray(e, n),
|
|
215
|
+
i = 0;
|
|
216
|
+
for (let c = 0; c < e; c += 3, i += 6) St(s, i, t[c], t[c + 1], t[c + 2]);
|
|
217
|
+
return s;
|
|
218
|
+
}
|
|
219
|
+
function me(t) {
|
|
220
|
+
let e = t.length;
|
|
221
|
+
if (e >= 3) {
|
|
222
|
+
let n = (e - 2) * 6,
|
|
223
|
+
s = j.createTypedArray(e, n);
|
|
224
|
+
St(s, 0, t[0], t[1], t[2]);
|
|
225
|
+
let i = 6;
|
|
226
|
+
for (let c = 3; c < e; ++c, i += 6) St(s, i, t[c - 1], t[c], t[c - 2]);
|
|
227
|
+
return s;
|
|
228
|
+
}
|
|
229
|
+
return new Uint16Array();
|
|
230
|
+
}
|
|
231
|
+
function he(t) {
|
|
232
|
+
if (t.length > 0) {
|
|
233
|
+
let e = t.length - 1,
|
|
234
|
+
n = (e - 1) * 6,
|
|
235
|
+
s = j.createTypedArray(e, n),
|
|
236
|
+
i = t[0],
|
|
237
|
+
c = 0;
|
|
238
|
+
for (let o = 1; o < e; ++o, c += 6) St(s, c, i, t[o], t[o + 1]);
|
|
239
|
+
return s;
|
|
240
|
+
}
|
|
241
|
+
return new Uint16Array();
|
|
242
|
+
}
|
|
243
|
+
F.toWireframe = function (t) {
|
|
244
|
+
if (!f(t)) throw new I("geometry is required.");
|
|
245
|
+
let e = t.indices;
|
|
246
|
+
if (f(e)) {
|
|
247
|
+
switch (t.primitiveType) {
|
|
248
|
+
case D.TRIANGLES:
|
|
249
|
+
t.indices = de(e);
|
|
250
|
+
break;
|
|
251
|
+
case D.TRIANGLE_STRIP:
|
|
252
|
+
t.indices = me(e);
|
|
253
|
+
break;
|
|
254
|
+
case D.TRIANGLE_FAN:
|
|
255
|
+
t.indices = he(e);
|
|
256
|
+
break;
|
|
257
|
+
default:
|
|
258
|
+
throw new I(
|
|
259
|
+
"geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.",
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
t.primitiveType = D.LINES;
|
|
263
|
+
}
|
|
264
|
+
return t;
|
|
265
|
+
};
|
|
266
|
+
F.createLineSegmentsForVectors = function (t, e, n) {
|
|
267
|
+
if (((e = K(e, "normal")), !f(t))) throw new I("geometry is required.");
|
|
268
|
+
if (!f(t.attributes.position))
|
|
269
|
+
throw new I("geometry.attributes.position is required.");
|
|
270
|
+
if (!f(t.attributes[e]))
|
|
271
|
+
throw new I(
|
|
272
|
+
`geometry.attributes must have an attribute with the same name as the attributeName parameter, ${e}.`,
|
|
273
|
+
);
|
|
274
|
+
n = K(n, 1e4);
|
|
275
|
+
let s = t.attributes.position.values,
|
|
276
|
+
i = t.attributes[e].values,
|
|
277
|
+
c = s.length,
|
|
278
|
+
o = new Float64Array(2 * c),
|
|
279
|
+
a = 0;
|
|
280
|
+
for (let d = 0; d < c; d += 3)
|
|
281
|
+
((o[a++] = s[d]),
|
|
282
|
+
(o[a++] = s[d + 1]),
|
|
283
|
+
(o[a++] = s[d + 2]),
|
|
284
|
+
(o[a++] = s[d] + i[d] * n),
|
|
285
|
+
(o[a++] = s[d + 1] + i[d + 1] * n),
|
|
286
|
+
(o[a++] = s[d + 2] + i[d + 2] * n));
|
|
287
|
+
let p,
|
|
288
|
+
u = t.boundingSphere;
|
|
289
|
+
return (
|
|
290
|
+
f(u) && (p = new rt(u.center, u.radius + n)),
|
|
291
|
+
new B({
|
|
292
|
+
attributes: {
|
|
293
|
+
position: new U({
|
|
294
|
+
componentDatatype: k.DOUBLE,
|
|
295
|
+
componentsPerAttribute: 3,
|
|
296
|
+
values: o,
|
|
297
|
+
}),
|
|
298
|
+
},
|
|
299
|
+
primitiveType: D.LINES,
|
|
300
|
+
boundingSphere: p,
|
|
301
|
+
})
|
|
302
|
+
);
|
|
303
|
+
};
|
|
304
|
+
F.createAttributeLocations = function (t) {
|
|
305
|
+
if (!f(t)) throw new I("geometry is required.");
|
|
306
|
+
let e = [
|
|
307
|
+
"position",
|
|
308
|
+
"positionHigh",
|
|
309
|
+
"positionLow",
|
|
310
|
+
"position3DHigh",
|
|
311
|
+
"position3DLow",
|
|
312
|
+
"position2DHigh",
|
|
313
|
+
"position2DLow",
|
|
314
|
+
"pickColor",
|
|
315
|
+
"normal",
|
|
316
|
+
"st",
|
|
317
|
+
"tangent",
|
|
318
|
+
"bitangent",
|
|
319
|
+
"extrudeDirection",
|
|
320
|
+
"compressedAttributes",
|
|
321
|
+
],
|
|
322
|
+
n = t.attributes,
|
|
323
|
+
s = {},
|
|
324
|
+
i = 0,
|
|
325
|
+
c,
|
|
326
|
+
o = e.length;
|
|
327
|
+
for (c = 0; c < o; ++c) {
|
|
328
|
+
let a = e[c];
|
|
329
|
+
f(n[a]) && (s[a] = i++);
|
|
330
|
+
}
|
|
331
|
+
for (let a in n) n.hasOwnProperty(a) && !f(s[a]) && (s[a] = i++);
|
|
332
|
+
return s;
|
|
333
|
+
};
|
|
334
|
+
F.reorderForPreVertexCache = function (t) {
|
|
335
|
+
if (!f(t)) throw new I("geometry is required.");
|
|
336
|
+
let e = B.computeNumberOfVertices(t),
|
|
337
|
+
n = t.indices;
|
|
338
|
+
if (f(n)) {
|
|
339
|
+
let s = new Int32Array(e);
|
|
340
|
+
for (let l = 0; l < e; l++) s[l] = -1;
|
|
341
|
+
let i = n,
|
|
342
|
+
c = i.length,
|
|
343
|
+
o = j.createTypedArray(e, c),
|
|
344
|
+
a = 0,
|
|
345
|
+
p = 0,
|
|
346
|
+
u = 0,
|
|
347
|
+
d;
|
|
348
|
+
for (; a < c; )
|
|
349
|
+
((d = s[i[a]]),
|
|
350
|
+
d !== -1 ? (o[p] = d) : ((d = i[a]), (s[d] = u), (o[p] = u), ++u),
|
|
351
|
+
++a,
|
|
352
|
+
++p);
|
|
353
|
+
t.indices = o;
|
|
354
|
+
let m = t.attributes;
|
|
355
|
+
for (let l in m)
|
|
356
|
+
if (m.hasOwnProperty(l) && f(m[l]) && f(m[l].values)) {
|
|
357
|
+
let h = m[l],
|
|
358
|
+
y = h.values,
|
|
359
|
+
v = 0,
|
|
360
|
+
b = h.componentsPerAttribute,
|
|
361
|
+
S = k.createTypedArray(h.componentDatatype, u * b);
|
|
362
|
+
for (; v < e; ) {
|
|
363
|
+
let x = s[v];
|
|
364
|
+
if (x !== -1) for (let w = 0; w < b; w++) S[b * x + w] = y[b * v + w];
|
|
365
|
+
++v;
|
|
366
|
+
}
|
|
367
|
+
h.values = S;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return t;
|
|
371
|
+
};
|
|
372
|
+
F.reorderForPostVertexCache = function (t, e) {
|
|
373
|
+
if (!f(t)) throw new I("geometry is required.");
|
|
374
|
+
let n = t.indices;
|
|
375
|
+
if (t.primitiveType === D.TRIANGLES && f(n)) {
|
|
376
|
+
let s = n.length,
|
|
377
|
+
i = 0;
|
|
378
|
+
for (let c = 0; c < s; c++) n[c] > i && (i = n[c]);
|
|
379
|
+
t.indices = Wt.tipsify({ indices: n, maximumIndex: i, cacheSize: e });
|
|
380
|
+
}
|
|
381
|
+
return t;
|
|
382
|
+
};
|
|
383
|
+
function $t(t) {
|
|
384
|
+
let e = {};
|
|
385
|
+
for (let n in t)
|
|
386
|
+
if (t.hasOwnProperty(n) && f(t[n]) && f(t[n].values)) {
|
|
387
|
+
let s = t[n];
|
|
388
|
+
e[n] = new U({
|
|
389
|
+
componentDatatype: s.componentDatatype,
|
|
390
|
+
componentsPerAttribute: s.componentsPerAttribute,
|
|
391
|
+
normalize: s.normalize,
|
|
392
|
+
values: [],
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
return e;
|
|
396
|
+
}
|
|
397
|
+
function be(t, e, n) {
|
|
398
|
+
for (let s in e)
|
|
399
|
+
if (e.hasOwnProperty(s) && f(e[s]) && f(e[s].values)) {
|
|
400
|
+
let i = e[s];
|
|
401
|
+
for (let c = 0; c < i.componentsPerAttribute; ++c)
|
|
402
|
+
t[s].values.push(i.values[n * i.componentsPerAttribute + c]);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
F.fitToUnsignedShortIndices = function (t) {
|
|
406
|
+
if (!f(t)) throw new I("geometry is required.");
|
|
407
|
+
if (
|
|
408
|
+
f(t.indices) &&
|
|
409
|
+
t.primitiveType !== D.TRIANGLES &&
|
|
410
|
+
t.primitiveType !== D.LINES &&
|
|
411
|
+
t.primitiveType !== D.POINTS
|
|
412
|
+
)
|
|
413
|
+
throw new I(
|
|
414
|
+
"geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.",
|
|
415
|
+
);
|
|
416
|
+
let e = [],
|
|
417
|
+
n = B.computeNumberOfVertices(t);
|
|
418
|
+
if (f(t.indices) && n >= N.SIXTY_FOUR_KILOBYTES) {
|
|
419
|
+
let s = [],
|
|
420
|
+
i = [],
|
|
421
|
+
c = 0,
|
|
422
|
+
o = $t(t.attributes),
|
|
423
|
+
a = t.indices,
|
|
424
|
+
p = a.length,
|
|
425
|
+
u;
|
|
426
|
+
t.primitiveType === D.TRIANGLES
|
|
427
|
+
? (u = 3)
|
|
428
|
+
: t.primitiveType === D.LINES
|
|
429
|
+
? (u = 2)
|
|
430
|
+
: t.primitiveType === D.POINTS && (u = 1);
|
|
431
|
+
for (let d = 0; d < p; d += u) {
|
|
432
|
+
for (let m = 0; m < u; ++m) {
|
|
433
|
+
let l = a[d + m],
|
|
434
|
+
h = s[l];
|
|
435
|
+
(f(h) || ((h = c++), (s[l] = h), be(o, t.attributes, l)), i.push(h));
|
|
436
|
+
}
|
|
437
|
+
c + u >= N.SIXTY_FOUR_KILOBYTES &&
|
|
438
|
+
(e.push(
|
|
439
|
+
new B({
|
|
440
|
+
attributes: o,
|
|
441
|
+
indices: i,
|
|
442
|
+
primitiveType: t.primitiveType,
|
|
443
|
+
boundingSphere: t.boundingSphere,
|
|
444
|
+
boundingSphereCV: t.boundingSphereCV,
|
|
445
|
+
}),
|
|
446
|
+
),
|
|
447
|
+
(s = []),
|
|
448
|
+
(i = []),
|
|
449
|
+
(c = 0),
|
|
450
|
+
(o = $t(t.attributes)));
|
|
451
|
+
}
|
|
452
|
+
i.length !== 0 &&
|
|
453
|
+
e.push(
|
|
454
|
+
new B({
|
|
455
|
+
attributes: o,
|
|
456
|
+
indices: i,
|
|
457
|
+
primitiveType: t.primitiveType,
|
|
458
|
+
boundingSphere: t.boundingSphere,
|
|
459
|
+
boundingSphereCV: t.boundingSphereCV,
|
|
460
|
+
}),
|
|
461
|
+
);
|
|
462
|
+
} else e.push(t);
|
|
463
|
+
return e;
|
|
464
|
+
};
|
|
465
|
+
var Jt = new r(),
|
|
466
|
+
we = new Mt();
|
|
467
|
+
F.projectTo2D = function (t, e, n, s, i) {
|
|
468
|
+
if (!f(t)) throw new I("geometry is required.");
|
|
469
|
+
if (!f(e)) throw new I("attributeName is required.");
|
|
470
|
+
if (!f(n)) throw new I("attributeName3D is required.");
|
|
471
|
+
if (!f(s)) throw new I("attributeName2D is required.");
|
|
472
|
+
if (!f(t.attributes[e]))
|
|
473
|
+
throw new I(
|
|
474
|
+
`geometry must have attribute matching the attributeName argument: ${e}.`,
|
|
475
|
+
);
|
|
476
|
+
if (t.attributes[e].componentDatatype !== k.DOUBLE)
|
|
477
|
+
throw new I(
|
|
478
|
+
"The attribute componentDatatype must be ComponentDatatype.DOUBLE.",
|
|
479
|
+
);
|
|
480
|
+
let c = t.attributes[e];
|
|
481
|
+
i = f(i) ? i : new _t();
|
|
482
|
+
let o = i.ellipsoid,
|
|
483
|
+
a = c.values,
|
|
484
|
+
p = new Float64Array(a.length),
|
|
485
|
+
u = 0;
|
|
486
|
+
for (let d = 0; d < a.length; d += 3) {
|
|
487
|
+
let m = r.fromArray(a, d, Jt),
|
|
488
|
+
l = o.cartesianToCartographic(m, we);
|
|
489
|
+
if (!f(l))
|
|
490
|
+
throw new I(`Could not project point (${m.x}, ${m.y}, ${m.z}) to 2D.`);
|
|
491
|
+
let h = i.project(l, Jt);
|
|
492
|
+
((p[u++] = h.x), (p[u++] = h.y), (p[u++] = h.z));
|
|
493
|
+
}
|
|
494
|
+
return (
|
|
495
|
+
(t.attributes[n] = c),
|
|
496
|
+
(t.attributes[s] = new U({
|
|
497
|
+
componentDatatype: k.DOUBLE,
|
|
498
|
+
componentsPerAttribute: 3,
|
|
499
|
+
values: p,
|
|
500
|
+
})),
|
|
501
|
+
delete t.attributes[e],
|
|
502
|
+
t
|
|
503
|
+
);
|
|
504
|
+
};
|
|
505
|
+
var zt = { high: 0, low: 0 };
|
|
506
|
+
F.encodeAttribute = function (t, e, n, s) {
|
|
507
|
+
if (!f(t)) throw new I("geometry is required.");
|
|
508
|
+
if (!f(e)) throw new I("attributeName is required.");
|
|
509
|
+
if (!f(n)) throw new I("attributeHighName is required.");
|
|
510
|
+
if (!f(s)) throw new I("attributeLowName is required.");
|
|
511
|
+
if (!f(t.attributes[e]))
|
|
512
|
+
throw new I(
|
|
513
|
+
`geometry must have attribute matching the attributeName argument: ${e}.`,
|
|
514
|
+
);
|
|
515
|
+
if (t.attributes[e].componentDatatype !== k.DOUBLE)
|
|
516
|
+
throw new I(
|
|
517
|
+
"The attribute componentDatatype must be ComponentDatatype.DOUBLE.",
|
|
518
|
+
);
|
|
519
|
+
let i = t.attributes[e],
|
|
520
|
+
c = i.values,
|
|
521
|
+
o = c.length,
|
|
522
|
+
a = new Float32Array(o),
|
|
523
|
+
p = new Float32Array(o);
|
|
524
|
+
for (let d = 0; d < o; ++d)
|
|
525
|
+
(jt.encode(c[d], zt), (a[d] = zt.high), (p[d] = zt.low));
|
|
526
|
+
let u = i.componentsPerAttribute;
|
|
527
|
+
return (
|
|
528
|
+
(t.attributes[n] = new U({
|
|
529
|
+
componentDatatype: k.FLOAT,
|
|
530
|
+
componentsPerAttribute: u,
|
|
531
|
+
values: a,
|
|
532
|
+
})),
|
|
533
|
+
(t.attributes[s] = new U({
|
|
534
|
+
componentDatatype: k.FLOAT,
|
|
535
|
+
componentsPerAttribute: u,
|
|
536
|
+
values: p,
|
|
537
|
+
})),
|
|
538
|
+
delete t.attributes[e],
|
|
539
|
+
t
|
|
540
|
+
);
|
|
541
|
+
};
|
|
542
|
+
var $ = new r();
|
|
543
|
+
function Dt(t, e) {
|
|
544
|
+
if (f(e)) {
|
|
545
|
+
let n = e.values,
|
|
546
|
+
s = n.length;
|
|
547
|
+
for (let i = 0; i < s; i += 3)
|
|
548
|
+
(r.unpack(n, i, $), H.multiplyByPoint(t, $, $), r.pack($, n, i));
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
function qt(t, e) {
|
|
552
|
+
if (f(e)) {
|
|
553
|
+
let n = e.values,
|
|
554
|
+
s = n.length;
|
|
555
|
+
for (let i = 0; i < s; i += 3)
|
|
556
|
+
(r.unpack(n, i, $),
|
|
557
|
+
Ot.multiplyByVector(t, $, $),
|
|
558
|
+
($ = r.normalize($, $)),
|
|
559
|
+
r.pack($, n, i));
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
var vt = new H(),
|
|
563
|
+
yt = new Ot();
|
|
564
|
+
F.transformToWorldCoordinates = function (t) {
|
|
565
|
+
if (!f(t)) throw new I("instance is required.");
|
|
566
|
+
let e = t.modelMatrix;
|
|
567
|
+
if (H.equals(e, H.IDENTITY)) return t;
|
|
568
|
+
let n = t.geometry.attributes;
|
|
569
|
+
(Dt(e, n.position),
|
|
570
|
+
Dt(e, n.prevPosition),
|
|
571
|
+
Dt(e, n.nextPosition),
|
|
572
|
+
(f(n.normal) || f(n.tangent) || f(n.bitangent)) &&
|
|
573
|
+
(H.inverse(e, vt),
|
|
574
|
+
H.transpose(vt, vt),
|
|
575
|
+
H.getMatrix3(vt, yt),
|
|
576
|
+
qt(yt, n.normal),
|
|
577
|
+
qt(yt, n.tangent),
|
|
578
|
+
qt(yt, n.bitangent)));
|
|
579
|
+
let s = t.geometry.boundingSphere;
|
|
580
|
+
return (
|
|
581
|
+
f(s) && (t.geometry.boundingSphere = rt.transform(s, e, s)),
|
|
582
|
+
(t.modelMatrix = H.clone(H.IDENTITY)),
|
|
583
|
+
t
|
|
584
|
+
);
|
|
585
|
+
};
|
|
586
|
+
function ve(t, e) {
|
|
587
|
+
let n = t.length,
|
|
588
|
+
s = {},
|
|
589
|
+
i = t[0][e].attributes,
|
|
590
|
+
c;
|
|
591
|
+
for (c in i)
|
|
592
|
+
if (i.hasOwnProperty(c) && f(i[c]) && f(i[c].values)) {
|
|
593
|
+
let o = i[c],
|
|
594
|
+
a = o.values.length,
|
|
595
|
+
p = !0;
|
|
596
|
+
for (let u = 1; u < n; ++u) {
|
|
597
|
+
let d = t[u][e].attributes[c];
|
|
598
|
+
if (
|
|
599
|
+
!f(d) ||
|
|
600
|
+
o.componentDatatype !== d.componentDatatype ||
|
|
601
|
+
o.componentsPerAttribute !== d.componentsPerAttribute ||
|
|
602
|
+
o.normalize !== d.normalize
|
|
603
|
+
) {
|
|
604
|
+
p = !1;
|
|
605
|
+
break;
|
|
606
|
+
}
|
|
607
|
+
a += d.values.length;
|
|
608
|
+
}
|
|
609
|
+
p &&
|
|
610
|
+
(s[c] = new U({
|
|
611
|
+
componentDatatype: o.componentDatatype,
|
|
612
|
+
componentsPerAttribute: o.componentsPerAttribute,
|
|
613
|
+
normalize: o.normalize,
|
|
614
|
+
values: k.createTypedArray(o.componentDatatype, a),
|
|
615
|
+
}));
|
|
616
|
+
}
|
|
617
|
+
return s;
|
|
618
|
+
}
|
|
619
|
+
var ye = new r();
|
|
620
|
+
function Vt(t, e) {
|
|
621
|
+
let n = t.length,
|
|
622
|
+
s,
|
|
623
|
+
i,
|
|
624
|
+
c,
|
|
625
|
+
o,
|
|
626
|
+
a = t[0].modelMatrix,
|
|
627
|
+
p = f(t[0][e].indices),
|
|
628
|
+
u = t[0][e].primitiveType;
|
|
629
|
+
for (i = 1; i < n; ++i) {
|
|
630
|
+
if (!H.equals(t[i].modelMatrix, a))
|
|
631
|
+
throw new I("All instances must have the same modelMatrix.");
|
|
632
|
+
if (f(t[i][e].indices) !== p)
|
|
633
|
+
throw new I(
|
|
634
|
+
"All instance geometries must have an indices or not have one.",
|
|
635
|
+
);
|
|
636
|
+
if (t[i][e].primitiveType !== u)
|
|
637
|
+
throw new I("All instance geometries must have the same primitiveType.");
|
|
638
|
+
}
|
|
639
|
+
let d = ve(t, e),
|
|
640
|
+
m,
|
|
641
|
+
l,
|
|
642
|
+
h;
|
|
643
|
+
for (s in d)
|
|
644
|
+
if (d.hasOwnProperty(s))
|
|
645
|
+
for (m = d[s].values, o = 0, i = 0; i < n; ++i)
|
|
646
|
+
for (l = t[i][e].attributes[s].values, h = l.length, c = 0; c < h; ++c)
|
|
647
|
+
m[o++] = l[c];
|
|
648
|
+
let y;
|
|
649
|
+
if (p) {
|
|
650
|
+
let x = 0;
|
|
651
|
+
for (i = 0; i < n; ++i) x += t[i][e].indices.length;
|
|
652
|
+
let w = B.computeNumberOfVertices(
|
|
653
|
+
new B({ attributes: d, primitiveType: D.POINTS }),
|
|
654
|
+
),
|
|
655
|
+
A = j.createTypedArray(w, x),
|
|
656
|
+
E = 0,
|
|
657
|
+
P = 0;
|
|
658
|
+
for (i = 0; i < n; ++i) {
|
|
659
|
+
let O = t[i][e].indices,
|
|
660
|
+
L = O.length;
|
|
661
|
+
for (o = 0; o < L; ++o) A[E++] = P + O[o];
|
|
662
|
+
P += B.computeNumberOfVertices(t[i][e]);
|
|
663
|
+
}
|
|
664
|
+
y = A;
|
|
665
|
+
}
|
|
666
|
+
let v = new r(),
|
|
667
|
+
b = 0,
|
|
668
|
+
S;
|
|
669
|
+
for (i = 0; i < n; ++i) {
|
|
670
|
+
if (((S = t[i][e].boundingSphere), !f(S))) {
|
|
671
|
+
v = void 0;
|
|
672
|
+
break;
|
|
673
|
+
}
|
|
674
|
+
r.add(S.center, v, v);
|
|
675
|
+
}
|
|
676
|
+
if (f(v))
|
|
677
|
+
for (r.divideByScalar(v, n, v), i = 0; i < n; ++i) {
|
|
678
|
+
S = t[i][e].boundingSphere;
|
|
679
|
+
let x = r.magnitude(r.subtract(S.center, v, ye)) + S.radius;
|
|
680
|
+
x > b && (b = x);
|
|
681
|
+
}
|
|
682
|
+
return new B({
|
|
683
|
+
attributes: d,
|
|
684
|
+
indices: y,
|
|
685
|
+
primitiveType: u,
|
|
686
|
+
boundingSphere: f(v) ? new rt(v, b) : void 0,
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
F.combineInstances = function (t) {
|
|
690
|
+
if (!f(t) || t.length < 1)
|
|
691
|
+
throw new I(
|
|
692
|
+
"instances is required and must have length greater than zero.",
|
|
693
|
+
);
|
|
694
|
+
let e = [],
|
|
695
|
+
n = [],
|
|
696
|
+
s = t.length;
|
|
697
|
+
for (let c = 0; c < s; ++c) {
|
|
698
|
+
let o = t[c];
|
|
699
|
+
f(o.geometry)
|
|
700
|
+
? e.push(o)
|
|
701
|
+
: f(o.westHemisphereGeometry) && f(o.eastHemisphereGeometry) && n.push(o);
|
|
702
|
+
}
|
|
703
|
+
let i = [];
|
|
704
|
+
return (
|
|
705
|
+
e.length > 0 && i.push(Vt(e, "geometry")),
|
|
706
|
+
n.length > 0 &&
|
|
707
|
+
(i.push(Vt(n, "westHemisphereGeometry")),
|
|
708
|
+
i.push(Vt(n, "eastHemisphereGeometry"))),
|
|
709
|
+
i
|
|
710
|
+
);
|
|
711
|
+
};
|
|
712
|
+
var Z = new r(),
|
|
713
|
+
ht = new r(),
|
|
714
|
+
ct = new r(),
|
|
715
|
+
at = new r();
|
|
716
|
+
F.computeNormal = function (t) {
|
|
717
|
+
if (!f(t)) throw new I("geometry is required.");
|
|
718
|
+
if (!f(t.attributes.position) || !f(t.attributes.position.values))
|
|
719
|
+
throw new I("geometry.attributes.position.values is required.");
|
|
720
|
+
if (!f(t.indices)) throw new I("geometry.indices is required.");
|
|
721
|
+
if (t.indices.length < 2 || t.indices.length % 3 !== 0)
|
|
722
|
+
throw new I(
|
|
723
|
+
"geometry.indices length must be greater than 0 and be a multiple of 3.",
|
|
724
|
+
);
|
|
725
|
+
if (t.primitiveType !== D.TRIANGLES)
|
|
726
|
+
throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");
|
|
727
|
+
let e = t.indices,
|
|
728
|
+
n = t.attributes,
|
|
729
|
+
s = n.position.values,
|
|
730
|
+
i = n.position.values.length / 3,
|
|
731
|
+
c = e.length,
|
|
732
|
+
o = new Array(i),
|
|
733
|
+
a = new Array(c / 3),
|
|
734
|
+
p = new Array(c),
|
|
735
|
+
u;
|
|
736
|
+
for (u = 0; u < i; u++) o[u] = { indexOffset: 0, count: 0, currentCount: 0 };
|
|
737
|
+
let d = 0;
|
|
738
|
+
for (u = 0; u < c; u += 3) {
|
|
739
|
+
let y = e[u],
|
|
740
|
+
v = e[u + 1],
|
|
741
|
+
b = e[u + 2],
|
|
742
|
+
S = y * 3,
|
|
743
|
+
x = v * 3,
|
|
744
|
+
w = b * 3;
|
|
745
|
+
((ht.x = s[S]),
|
|
746
|
+
(ht.y = s[S + 1]),
|
|
747
|
+
(ht.z = s[S + 2]),
|
|
748
|
+
(ct.x = s[x]),
|
|
749
|
+
(ct.y = s[x + 1]),
|
|
750
|
+
(ct.z = s[x + 2]),
|
|
751
|
+
(at.x = s[w]),
|
|
752
|
+
(at.y = s[w + 1]),
|
|
753
|
+
(at.z = s[w + 2]),
|
|
754
|
+
o[y].count++,
|
|
755
|
+
o[v].count++,
|
|
756
|
+
o[b].count++,
|
|
757
|
+
r.subtract(ct, ht, ct),
|
|
758
|
+
r.subtract(at, ht, at),
|
|
759
|
+
(a[d] = r.cross(ct, at, new r())),
|
|
760
|
+
d++);
|
|
761
|
+
}
|
|
762
|
+
let m = 0;
|
|
763
|
+
for (u = 0; u < i; u++) ((o[u].indexOffset += m), (m += o[u].count));
|
|
764
|
+
d = 0;
|
|
765
|
+
let l;
|
|
766
|
+
for (u = 0; u < c; u += 3) {
|
|
767
|
+
l = o[e[u]];
|
|
768
|
+
let y = l.indexOffset + l.currentCount;
|
|
769
|
+
((p[y] = d),
|
|
770
|
+
l.currentCount++,
|
|
771
|
+
(l = o[e[u + 1]]),
|
|
772
|
+
(y = l.indexOffset + l.currentCount),
|
|
773
|
+
(p[y] = d),
|
|
774
|
+
l.currentCount++,
|
|
775
|
+
(l = o[e[u + 2]]),
|
|
776
|
+
(y = l.indexOffset + l.currentCount),
|
|
777
|
+
(p[y] = d),
|
|
778
|
+
l.currentCount++,
|
|
779
|
+
d++);
|
|
780
|
+
}
|
|
781
|
+
let h = new Float32Array(i * 3);
|
|
782
|
+
for (u = 0; u < i; u++) {
|
|
783
|
+
let y = u * 3;
|
|
784
|
+
if (((l = o[u]), r.clone(r.ZERO, Z), l.count > 0)) {
|
|
785
|
+
for (d = 0; d < l.count; d++) r.add(Z, a[p[l.indexOffset + d]], Z);
|
|
786
|
+
r.equalsEpsilon(r.ZERO, Z, N.EPSILON10) &&
|
|
787
|
+
r.clone(a[p[l.indexOffset]], Z);
|
|
788
|
+
}
|
|
789
|
+
(r.equalsEpsilon(r.ZERO, Z, N.EPSILON10) && (Z.z = 1),
|
|
790
|
+
r.normalize(Z, Z),
|
|
791
|
+
(h[y] = Z.x),
|
|
792
|
+
(h[y + 1] = Z.y),
|
|
793
|
+
(h[y + 2] = Z.z));
|
|
794
|
+
}
|
|
795
|
+
return (
|
|
796
|
+
(t.attributes.normal = new U({
|
|
797
|
+
componentDatatype: k.FLOAT,
|
|
798
|
+
componentsPerAttribute: 3,
|
|
799
|
+
values: h,
|
|
800
|
+
})),
|
|
801
|
+
t
|
|
802
|
+
);
|
|
803
|
+
};
|
|
804
|
+
var xe = new r(),
|
|
805
|
+
Kt = new r(),
|
|
806
|
+
Te = new r();
|
|
807
|
+
F.computeTangentAndBitangent = function (t) {
|
|
808
|
+
if (!f(t)) throw new I("geometry is required.");
|
|
809
|
+
let e = t.attributes,
|
|
810
|
+
n = t.indices;
|
|
811
|
+
if (!f(e.position) || !f(e.position.values))
|
|
812
|
+
throw new I("geometry.attributes.position.values is required.");
|
|
813
|
+
if (!f(e.normal) || !f(e.normal.values))
|
|
814
|
+
throw new I("geometry.attributes.normal.values is required.");
|
|
815
|
+
if (!f(e.st) || !f(e.st.values))
|
|
816
|
+
throw new I("geometry.attributes.st.values is required.");
|
|
817
|
+
if (!f(n)) throw new I("geometry.indices is required.");
|
|
818
|
+
if (n.length < 2 || n.length % 3 !== 0)
|
|
819
|
+
throw new I(
|
|
820
|
+
"geometry.indices length must be greater than 0 and be a multiple of 3.",
|
|
821
|
+
);
|
|
822
|
+
if (t.primitiveType !== D.TRIANGLES)
|
|
823
|
+
throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");
|
|
824
|
+
let s = t.attributes.position.values,
|
|
825
|
+
i = t.attributes.normal.values,
|
|
826
|
+
c = t.attributes.st.values,
|
|
827
|
+
o = t.attributes.position.values.length / 3,
|
|
828
|
+
a = n.length,
|
|
829
|
+
p = new Array(o * 3),
|
|
830
|
+
u;
|
|
831
|
+
for (u = 0; u < p.length; u++) p[u] = 0;
|
|
832
|
+
let d, m, l;
|
|
833
|
+
for (u = 0; u < a; u += 3) {
|
|
834
|
+
let v = n[u],
|
|
835
|
+
b = n[u + 1],
|
|
836
|
+
S = n[u + 2];
|
|
837
|
+
((d = v * 3), (m = b * 3), (l = S * 3));
|
|
838
|
+
let x = v * 2,
|
|
839
|
+
w = b * 2,
|
|
840
|
+
A = S * 2,
|
|
841
|
+
E = s[d],
|
|
842
|
+
P = s[d + 1],
|
|
843
|
+
O = s[d + 2],
|
|
844
|
+
L = c[x],
|
|
845
|
+
g = c[x + 1],
|
|
846
|
+
T = c[w + 1] - g,
|
|
847
|
+
C = c[A + 1] - g,
|
|
848
|
+
z = 1 / ((c[w] - L) * C - (c[A] - L) * T),
|
|
849
|
+
q = (C * (s[m] - E) - T * (s[l] - E)) * z,
|
|
850
|
+
V = (C * (s[m + 1] - P) - T * (s[l + 1] - P)) * z,
|
|
851
|
+
G = (C * (s[m + 2] - O) - T * (s[l + 2] - O)) * z;
|
|
852
|
+
((p[d] += q),
|
|
853
|
+
(p[d + 1] += V),
|
|
854
|
+
(p[d + 2] += G),
|
|
855
|
+
(p[m] += q),
|
|
856
|
+
(p[m + 1] += V),
|
|
857
|
+
(p[m + 2] += G),
|
|
858
|
+
(p[l] += q),
|
|
859
|
+
(p[l + 1] += V),
|
|
860
|
+
(p[l + 2] += G));
|
|
861
|
+
}
|
|
862
|
+
let h = new Float32Array(o * 3),
|
|
863
|
+
y = new Float32Array(o * 3);
|
|
864
|
+
for (u = 0; u < o; u++) {
|
|
865
|
+
((d = u * 3), (m = d + 1), (l = d + 2));
|
|
866
|
+
let v = r.fromArray(i, d, xe),
|
|
867
|
+
b = r.fromArray(p, d, Te),
|
|
868
|
+
S = r.dot(v, b);
|
|
869
|
+
(r.multiplyByScalar(v, S, Kt),
|
|
870
|
+
r.normalize(r.subtract(b, Kt, b), b),
|
|
871
|
+
(h[d] = b.x),
|
|
872
|
+
(h[m] = b.y),
|
|
873
|
+
(h[l] = b.z),
|
|
874
|
+
r.normalize(r.cross(v, b, b), b),
|
|
875
|
+
(y[d] = b.x),
|
|
876
|
+
(y[m] = b.y),
|
|
877
|
+
(y[l] = b.z));
|
|
878
|
+
}
|
|
879
|
+
return (
|
|
880
|
+
(t.attributes.tangent = new U({
|
|
881
|
+
componentDatatype: k.FLOAT,
|
|
882
|
+
componentsPerAttribute: 3,
|
|
883
|
+
values: h,
|
|
884
|
+
})),
|
|
885
|
+
(t.attributes.bitangent = new U({
|
|
886
|
+
componentDatatype: k.FLOAT,
|
|
887
|
+
componentsPerAttribute: 3,
|
|
888
|
+
values: y,
|
|
889
|
+
})),
|
|
890
|
+
t
|
|
891
|
+
);
|
|
892
|
+
};
|
|
893
|
+
var bt = new R(),
|
|
894
|
+
W = new r(),
|
|
895
|
+
Qt = new r(),
|
|
896
|
+
te = new r(),
|
|
897
|
+
xt = new R();
|
|
898
|
+
F.compressVertices = function (t) {
|
|
899
|
+
if (!f(t)) throw new I("geometry is required.");
|
|
900
|
+
let e = t.attributes.extrudeDirection,
|
|
901
|
+
n,
|
|
902
|
+
s;
|
|
903
|
+
if (f(e)) {
|
|
904
|
+
let P = e.values;
|
|
905
|
+
s = P.length / 3;
|
|
906
|
+
let O = new Float32Array(s * 2),
|
|
907
|
+
L = 0;
|
|
908
|
+
for (n = 0; n < s; ++n) {
|
|
909
|
+
if ((r.fromArray(P, n * 3, W), r.equals(W, r.ZERO))) {
|
|
910
|
+
L += 2;
|
|
911
|
+
continue;
|
|
912
|
+
}
|
|
913
|
+
((xt = et.octEncodeInRange(W, 65535, xt)),
|
|
914
|
+
(O[L++] = xt.x),
|
|
915
|
+
(O[L++] = xt.y));
|
|
916
|
+
}
|
|
917
|
+
return (
|
|
918
|
+
(t.attributes.compressedAttributes = new U({
|
|
919
|
+
componentDatatype: k.FLOAT,
|
|
920
|
+
componentsPerAttribute: 2,
|
|
921
|
+
values: O,
|
|
922
|
+
})),
|
|
923
|
+
delete t.attributes.extrudeDirection,
|
|
924
|
+
t
|
|
925
|
+
);
|
|
926
|
+
}
|
|
927
|
+
let i = t.attributes.normal,
|
|
928
|
+
c = t.attributes.st,
|
|
929
|
+
o = f(i),
|
|
930
|
+
a = f(c);
|
|
931
|
+
if (!o && !a) return t;
|
|
932
|
+
let p = t.attributes.tangent,
|
|
933
|
+
u = t.attributes.bitangent,
|
|
934
|
+
d = f(p),
|
|
935
|
+
m = f(u),
|
|
936
|
+
l,
|
|
937
|
+
h,
|
|
938
|
+
y,
|
|
939
|
+
v;
|
|
940
|
+
(o && (l = i.values),
|
|
941
|
+
a && (h = c.values),
|
|
942
|
+
d && (y = p.values),
|
|
943
|
+
m && (v = u.values),
|
|
944
|
+
(s = (o ? l.length : h.length) / (o ? 3 : 2)));
|
|
945
|
+
let x = s,
|
|
946
|
+
w = a && o ? 2 : 1;
|
|
947
|
+
((w += d || m ? 1 : 0), (x *= w));
|
|
948
|
+
let A = new Float32Array(x),
|
|
949
|
+
E = 0;
|
|
950
|
+
for (n = 0; n < s; ++n) {
|
|
951
|
+
a &&
|
|
952
|
+
(R.fromArray(h, n * 2, bt), (A[E++] = et.compressTextureCoordinates(bt)));
|
|
953
|
+
let P = n * 3;
|
|
954
|
+
o && f(y) && f(v)
|
|
955
|
+
? (r.fromArray(l, P, W),
|
|
956
|
+
r.fromArray(y, P, Qt),
|
|
957
|
+
r.fromArray(v, P, te),
|
|
958
|
+
et.octPack(W, Qt, te, bt),
|
|
959
|
+
(A[E++] = bt.x),
|
|
960
|
+
(A[E++] = bt.y))
|
|
961
|
+
: (o && (r.fromArray(l, P, W), (A[E++] = et.octEncodeFloat(W))),
|
|
962
|
+
d && (r.fromArray(y, P, W), (A[E++] = et.octEncodeFloat(W))),
|
|
963
|
+
m && (r.fromArray(v, P, W), (A[E++] = et.octEncodeFloat(W))));
|
|
964
|
+
}
|
|
965
|
+
return (
|
|
966
|
+
(t.attributes.compressedAttributes = new U({
|
|
967
|
+
componentDatatype: k.FLOAT,
|
|
968
|
+
componentsPerAttribute: w,
|
|
969
|
+
values: A,
|
|
970
|
+
})),
|
|
971
|
+
o && delete t.attributes.normal,
|
|
972
|
+
a && delete t.attributes.st,
|
|
973
|
+
m && delete t.attributes.bitangent,
|
|
974
|
+
d && delete t.attributes.tangent,
|
|
975
|
+
t
|
|
976
|
+
);
|
|
977
|
+
};
|
|
978
|
+
function Ae(t) {
|
|
979
|
+
if (f(t.indices)) return t;
|
|
980
|
+
let e = B.computeNumberOfVertices(t);
|
|
981
|
+
if (e < 3) throw new I("The number of vertices must be at least three.");
|
|
982
|
+
if (e % 3 !== 0)
|
|
983
|
+
throw new I("The number of vertices must be a multiple of three.");
|
|
984
|
+
let n = j.createTypedArray(e, e);
|
|
985
|
+
for (let s = 0; s < e; ++s) n[s] = s;
|
|
986
|
+
return ((t.indices = n), t);
|
|
987
|
+
}
|
|
988
|
+
function Ie(t) {
|
|
989
|
+
let e = B.computeNumberOfVertices(t);
|
|
990
|
+
if (e < 3) throw new I("The number of vertices must be at least three.");
|
|
991
|
+
let n = j.createTypedArray(e, (e - 2) * 3);
|
|
992
|
+
((n[0] = 1), (n[1] = 0), (n[2] = 2));
|
|
993
|
+
let s = 3;
|
|
994
|
+
for (let i = 3; i < e; ++i) ((n[s++] = i - 1), (n[s++] = 0), (n[s++] = i));
|
|
995
|
+
return ((t.indices = n), (t.primitiveType = D.TRIANGLES), t);
|
|
996
|
+
}
|
|
997
|
+
function Se(t) {
|
|
998
|
+
let e = B.computeNumberOfVertices(t);
|
|
999
|
+
if (e < 3) throw new I("The number of vertices must be at least 3.");
|
|
1000
|
+
let n = j.createTypedArray(e, (e - 2) * 3);
|
|
1001
|
+
((n[0] = 0),
|
|
1002
|
+
(n[1] = 1),
|
|
1003
|
+
(n[2] = 2),
|
|
1004
|
+
e > 3 && ((n[3] = 0), (n[4] = 2), (n[5] = 3)));
|
|
1005
|
+
let s = 6;
|
|
1006
|
+
for (let i = 3; i < e - 1; i += 2)
|
|
1007
|
+
((n[s++] = i),
|
|
1008
|
+
(n[s++] = i - 1),
|
|
1009
|
+
(n[s++] = i + 1),
|
|
1010
|
+
i + 2 < e && ((n[s++] = i), (n[s++] = i + 1), (n[s++] = i + 2)));
|
|
1011
|
+
return ((t.indices = n), (t.primitiveType = D.TRIANGLES), t);
|
|
1012
|
+
}
|
|
1013
|
+
function Pe(t) {
|
|
1014
|
+
if (f(t.indices)) return t;
|
|
1015
|
+
let e = B.computeNumberOfVertices(t);
|
|
1016
|
+
if (e < 2) throw new I("The number of vertices must be at least two.");
|
|
1017
|
+
if (e % 2 !== 0)
|
|
1018
|
+
throw new I("The number of vertices must be a multiple of 2.");
|
|
1019
|
+
let n = j.createTypedArray(e, e);
|
|
1020
|
+
for (let s = 0; s < e; ++s) n[s] = s;
|
|
1021
|
+
return ((t.indices = n), t);
|
|
1022
|
+
}
|
|
1023
|
+
function ge(t) {
|
|
1024
|
+
let e = B.computeNumberOfVertices(t);
|
|
1025
|
+
if (e < 2) throw new I("The number of vertices must be at least two.");
|
|
1026
|
+
let n = j.createTypedArray(e, (e - 1) * 2);
|
|
1027
|
+
((n[0] = 0), (n[1] = 1));
|
|
1028
|
+
let s = 2;
|
|
1029
|
+
for (let i = 2; i < e; ++i) ((n[s++] = i - 1), (n[s++] = i));
|
|
1030
|
+
return ((t.indices = n), (t.primitiveType = D.LINES), t);
|
|
1031
|
+
}
|
|
1032
|
+
function Oe(t) {
|
|
1033
|
+
let e = B.computeNumberOfVertices(t);
|
|
1034
|
+
if (e < 2) throw new I("The number of vertices must be at least two.");
|
|
1035
|
+
let n = j.createTypedArray(e, e * 2);
|
|
1036
|
+
((n[0] = 0), (n[1] = 1));
|
|
1037
|
+
let s = 2;
|
|
1038
|
+
for (let i = 2; i < e; ++i) ((n[s++] = i - 1), (n[s++] = i));
|
|
1039
|
+
return (
|
|
1040
|
+
(n[s++] = e - 1),
|
|
1041
|
+
(n[s] = 0),
|
|
1042
|
+
(t.indices = n),
|
|
1043
|
+
(t.primitiveType = D.LINES),
|
|
1044
|
+
t
|
|
1045
|
+
);
|
|
1046
|
+
}
|
|
1047
|
+
function Le(t) {
|
|
1048
|
+
switch (t.primitiveType) {
|
|
1049
|
+
case D.TRIANGLE_FAN:
|
|
1050
|
+
return Ie(t);
|
|
1051
|
+
case D.TRIANGLE_STRIP:
|
|
1052
|
+
return Se(t);
|
|
1053
|
+
case D.TRIANGLES:
|
|
1054
|
+
return Ae(t);
|
|
1055
|
+
case D.LINE_STRIP:
|
|
1056
|
+
return ge(t);
|
|
1057
|
+
case D.LINE_LOOP:
|
|
1058
|
+
return Oe(t);
|
|
1059
|
+
case D.LINES:
|
|
1060
|
+
return Pe(t);
|
|
1061
|
+
}
|
|
1062
|
+
return t;
|
|
1063
|
+
}
|
|
1064
|
+
function tt(t, e) {
|
|
1065
|
+
Math.abs(t.y) < N.EPSILON6 && (e ? (t.y = -N.EPSILON6) : (t.y = N.EPSILON6));
|
|
1066
|
+
}
|
|
1067
|
+
function Ee(t, e, n) {
|
|
1068
|
+
if (t.y !== 0 && e.y !== 0 && n.y !== 0) {
|
|
1069
|
+
(tt(t, t.y < 0), tt(e, e.y < 0), tt(n, n.y < 0));
|
|
1070
|
+
return;
|
|
1071
|
+
}
|
|
1072
|
+
let s = Math.abs(t.y),
|
|
1073
|
+
i = Math.abs(e.y),
|
|
1074
|
+
c = Math.abs(n.y),
|
|
1075
|
+
o;
|
|
1076
|
+
s > i
|
|
1077
|
+
? s > c
|
|
1078
|
+
? (o = N.sign(t.y))
|
|
1079
|
+
: (o = N.sign(n.y))
|
|
1080
|
+
: i > c
|
|
1081
|
+
? (o = N.sign(e.y))
|
|
1082
|
+
: (o = N.sign(n.y));
|
|
1083
|
+
let a = o < 0;
|
|
1084
|
+
(tt(t, a), tt(e, a), tt(n, a));
|
|
1085
|
+
}
|
|
1086
|
+
var ee = new r();
|
|
1087
|
+
function X(t, e, n, s) {
|
|
1088
|
+
(r.add(t, r.multiplyByScalar(r.subtract(e, t, ee), t.y / (t.y - e.y), ee), n),
|
|
1089
|
+
r.clone(n, s),
|
|
1090
|
+
tt(n, !0),
|
|
1091
|
+
tt(s, !1));
|
|
1092
|
+
}
|
|
1093
|
+
var nt = new r(),
|
|
1094
|
+
it = new r(),
|
|
1095
|
+
st = new r(),
|
|
1096
|
+
ot = new r(),
|
|
1097
|
+
Rt = { positions: new Array(7), indices: new Array(3 * 3) };
|
|
1098
|
+
function Ne(t, e, n) {
|
|
1099
|
+
if (t.x >= 0 || e.x >= 0 || n.x >= 0) return;
|
|
1100
|
+
Ee(t, e, n);
|
|
1101
|
+
let s = t.y < 0,
|
|
1102
|
+
i = e.y < 0,
|
|
1103
|
+
c = n.y < 0,
|
|
1104
|
+
o = 0;
|
|
1105
|
+
((o += s ? 1 : 0), (o += i ? 1 : 0), (o += c ? 1 : 0));
|
|
1106
|
+
let a = Rt.indices;
|
|
1107
|
+
o === 1
|
|
1108
|
+
? ((a[1] = 3),
|
|
1109
|
+
(a[2] = 4),
|
|
1110
|
+
(a[5] = 6),
|
|
1111
|
+
(a[7] = 6),
|
|
1112
|
+
(a[8] = 5),
|
|
1113
|
+
s
|
|
1114
|
+
? (X(t, e, nt, st),
|
|
1115
|
+
X(t, n, it, ot),
|
|
1116
|
+
(a[0] = 0),
|
|
1117
|
+
(a[3] = 1),
|
|
1118
|
+
(a[4] = 2),
|
|
1119
|
+
(a[6] = 1))
|
|
1120
|
+
: i
|
|
1121
|
+
? (X(e, n, nt, st),
|
|
1122
|
+
X(e, t, it, ot),
|
|
1123
|
+
(a[0] = 1),
|
|
1124
|
+
(a[3] = 2),
|
|
1125
|
+
(a[4] = 0),
|
|
1126
|
+
(a[6] = 2))
|
|
1127
|
+
: c &&
|
|
1128
|
+
(X(n, t, nt, st),
|
|
1129
|
+
X(n, e, it, ot),
|
|
1130
|
+
(a[0] = 2),
|
|
1131
|
+
(a[3] = 0),
|
|
1132
|
+
(a[4] = 1),
|
|
1133
|
+
(a[6] = 0)))
|
|
1134
|
+
: o === 2 &&
|
|
1135
|
+
((a[2] = 4),
|
|
1136
|
+
(a[4] = 4),
|
|
1137
|
+
(a[5] = 3),
|
|
1138
|
+
(a[7] = 5),
|
|
1139
|
+
(a[8] = 6),
|
|
1140
|
+
s
|
|
1141
|
+
? i
|
|
1142
|
+
? c ||
|
|
1143
|
+
(X(n, t, nt, st),
|
|
1144
|
+
X(n, e, it, ot),
|
|
1145
|
+
(a[0] = 0),
|
|
1146
|
+
(a[1] = 1),
|
|
1147
|
+
(a[3] = 0),
|
|
1148
|
+
(a[6] = 2))
|
|
1149
|
+
: (X(e, n, nt, st),
|
|
1150
|
+
X(e, t, it, ot),
|
|
1151
|
+
(a[0] = 2),
|
|
1152
|
+
(a[1] = 0),
|
|
1153
|
+
(a[3] = 2),
|
|
1154
|
+
(a[6] = 1))
|
|
1155
|
+
: (X(t, e, nt, st),
|
|
1156
|
+
X(t, n, it, ot),
|
|
1157
|
+
(a[0] = 1),
|
|
1158
|
+
(a[1] = 2),
|
|
1159
|
+
(a[3] = 1),
|
|
1160
|
+
(a[6] = 0)));
|
|
1161
|
+
let p = Rt.positions;
|
|
1162
|
+
return (
|
|
1163
|
+
(p[0] = t),
|
|
1164
|
+
(p[1] = e),
|
|
1165
|
+
(p[2] = n),
|
|
1166
|
+
(p.length = 3),
|
|
1167
|
+
(o === 1 || o === 2) &&
|
|
1168
|
+
((p[3] = nt), (p[4] = it), (p[5] = st), (p[6] = ot), (p.length = 7)),
|
|
1169
|
+
Rt
|
|
1170
|
+
);
|
|
1171
|
+
}
|
|
1172
|
+
function ne(t, e) {
|
|
1173
|
+
let n = t.attributes;
|
|
1174
|
+
if (n.position.values.length === 0) return;
|
|
1175
|
+
for (let i in n)
|
|
1176
|
+
if (n.hasOwnProperty(i) && f(n[i]) && f(n[i].values)) {
|
|
1177
|
+
let c = n[i];
|
|
1178
|
+
c.values = k.createTypedArray(c.componentDatatype, c.values);
|
|
1179
|
+
}
|
|
1180
|
+
let s = B.computeNumberOfVertices(t);
|
|
1181
|
+
return (
|
|
1182
|
+
(t.indices = j.createTypedArray(s, t.indices)),
|
|
1183
|
+
e && (t.boundingSphere = rt.fromVertices(n.position.values)),
|
|
1184
|
+
t
|
|
1185
|
+
);
|
|
1186
|
+
}
|
|
1187
|
+
function lt(t) {
|
|
1188
|
+
let e = t.attributes,
|
|
1189
|
+
n = {};
|
|
1190
|
+
for (let s in e)
|
|
1191
|
+
if (e.hasOwnProperty(s) && f(e[s]) && f(e[s].values)) {
|
|
1192
|
+
let i = e[s];
|
|
1193
|
+
n[s] = new U({
|
|
1194
|
+
componentDatatype: i.componentDatatype,
|
|
1195
|
+
componentsPerAttribute: i.componentsPerAttribute,
|
|
1196
|
+
normalize: i.normalize,
|
|
1197
|
+
values: [],
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
return new B({ attributes: n, indices: [], primitiveType: t.primitiveType });
|
|
1201
|
+
}
|
|
1202
|
+
function kt(t, e, n) {
|
|
1203
|
+
let s = f(t.geometry.boundingSphere);
|
|
1204
|
+
((e = ne(e, s)),
|
|
1205
|
+
(n = ne(n, s)),
|
|
1206
|
+
f(n) && !f(e)
|
|
1207
|
+
? (t.geometry = n)
|
|
1208
|
+
: !f(n) && f(e)
|
|
1209
|
+
? (t.geometry = e)
|
|
1210
|
+
: ((t.westHemisphereGeometry = e),
|
|
1211
|
+
(t.eastHemisphereGeometry = n),
|
|
1212
|
+
(t.geometry = void 0)));
|
|
1213
|
+
}
|
|
1214
|
+
function Ft(t, e) {
|
|
1215
|
+
let n = new t(),
|
|
1216
|
+
s = new t(),
|
|
1217
|
+
i = new t();
|
|
1218
|
+
return function (c, o, a, p, u, d, m, l) {
|
|
1219
|
+
let h = t.fromArray(u, c * e, n),
|
|
1220
|
+
y = t.fromArray(u, o * e, s),
|
|
1221
|
+
v = t.fromArray(u, a * e, i);
|
|
1222
|
+
(t.multiplyByScalar(h, p.x, h),
|
|
1223
|
+
t.multiplyByScalar(y, p.y, y),
|
|
1224
|
+
t.multiplyByScalar(v, p.z, v));
|
|
1225
|
+
let b = t.add(h, y, h);
|
|
1226
|
+
(t.add(b, v, b), l && t.normalize(b, b), t.pack(b, d, m * e));
|
|
1227
|
+
};
|
|
1228
|
+
}
|
|
1229
|
+
var ze = Ft(dt, 4),
|
|
1230
|
+
It = Ft(r, 3),
|
|
1231
|
+
ae = Ft(R, 2),
|
|
1232
|
+
De = function (t, e, n, s, i, c, o) {
|
|
1233
|
+
let a = i[t] * s.x,
|
|
1234
|
+
p = i[e] * s.y,
|
|
1235
|
+
u = i[n] * s.z;
|
|
1236
|
+
c[o] = a + p + u > N.EPSILON6 ? 1 : 0;
|
|
1237
|
+
},
|
|
1238
|
+
wt = new r(),
|
|
1239
|
+
Gt = new r(),
|
|
1240
|
+
Ct = new r(),
|
|
1241
|
+
qe = new r();
|
|
1242
|
+
function Tt(t, e, n, s, i, c, o, a, p, u, d, m, l, h, y, v) {
|
|
1243
|
+
if (!f(c) && !f(o) && !f(a) && !f(p) && !f(u) && h === 0) return;
|
|
1244
|
+
let b = r.fromArray(i, t * 3, wt),
|
|
1245
|
+
S = r.fromArray(i, e * 3, Gt),
|
|
1246
|
+
x = r.fromArray(i, n * 3, Ct),
|
|
1247
|
+
w = Ht(s, b, S, x, qe);
|
|
1248
|
+
if (f(w)) {
|
|
1249
|
+
if ((f(c) && It(t, e, n, w, c, m.normal.values, v, !0), f(u))) {
|
|
1250
|
+
let A = r.fromArray(u, t * 3, wt),
|
|
1251
|
+
E = r.fromArray(u, e * 3, Gt),
|
|
1252
|
+
P = r.fromArray(u, n * 3, Ct);
|
|
1253
|
+
(r.multiplyByScalar(A, w.x, A),
|
|
1254
|
+
r.multiplyByScalar(E, w.y, E),
|
|
1255
|
+
r.multiplyByScalar(P, w.z, P));
|
|
1256
|
+
let O;
|
|
1257
|
+
(!r.equals(A, r.ZERO) || !r.equals(E, r.ZERO) || !r.equals(P, r.ZERO)
|
|
1258
|
+
? ((O = r.add(A, E, A)), r.add(O, P, O), r.normalize(O, O))
|
|
1259
|
+
: ((O = wt), (O.x = 0), (O.y = 0), (O.z = 0)),
|
|
1260
|
+
r.pack(O, m.extrudeDirection.values, v * 3));
|
|
1261
|
+
}
|
|
1262
|
+
if (
|
|
1263
|
+
(f(d) && De(t, e, n, w, d, m.applyOffset.values, v),
|
|
1264
|
+
f(o) && It(t, e, n, w, o, m.tangent.values, v, !0),
|
|
1265
|
+
f(a) && It(t, e, n, w, a, m.bitangent.values, v, !0),
|
|
1266
|
+
f(p) && ae(t, e, n, w, p, m.st.values, v),
|
|
1267
|
+
h > 0)
|
|
1268
|
+
)
|
|
1269
|
+
for (let A = 0; A < h; A++) {
|
|
1270
|
+
let E = l[A];
|
|
1271
|
+
Ve(t, e, n, w, v, y[E], m[E]);
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
function Ve(t, e, n, s, i, c, o) {
|
|
1276
|
+
let a = c.componentsPerAttribute,
|
|
1277
|
+
p = c.values,
|
|
1278
|
+
u = o.values;
|
|
1279
|
+
switch (a) {
|
|
1280
|
+
case 4:
|
|
1281
|
+
ze(t, e, n, s, p, u, i, !1);
|
|
1282
|
+
break;
|
|
1283
|
+
case 3:
|
|
1284
|
+
It(t, e, n, s, p, u, i, !1);
|
|
1285
|
+
break;
|
|
1286
|
+
case 2:
|
|
1287
|
+
ae(t, e, n, s, p, u, i, !1);
|
|
1288
|
+
break;
|
|
1289
|
+
default:
|
|
1290
|
+
u[i] = p[t] * s.x + p[e] * s.y + p[n] * s.z;
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
function Q(t, e, n, s, i, c) {
|
|
1294
|
+
let o = t.position.values.length / 3;
|
|
1295
|
+
if (i !== -1) {
|
|
1296
|
+
let a = s[i],
|
|
1297
|
+
p = n[a];
|
|
1298
|
+
return p === -1
|
|
1299
|
+
? ((n[a] = o), t.position.values.push(c.x, c.y, c.z), e.push(o), o)
|
|
1300
|
+
: (e.push(p), p);
|
|
1301
|
+
}
|
|
1302
|
+
return (t.position.values.push(c.x, c.y, c.z), e.push(o), o);
|
|
1303
|
+
}
|
|
1304
|
+
var Re = {
|
|
1305
|
+
position: !0,
|
|
1306
|
+
normal: !0,
|
|
1307
|
+
bitangent: !0,
|
|
1308
|
+
tangent: !0,
|
|
1309
|
+
st: !0,
|
|
1310
|
+
extrudeDirection: !0,
|
|
1311
|
+
applyOffset: !0,
|
|
1312
|
+
};
|
|
1313
|
+
function ie(t) {
|
|
1314
|
+
let e = t.geometry,
|
|
1315
|
+
n = e.attributes,
|
|
1316
|
+
s = n.position.values,
|
|
1317
|
+
i = f(n.normal) ? n.normal.values : void 0,
|
|
1318
|
+
c = f(n.bitangent) ? n.bitangent.values : void 0,
|
|
1319
|
+
o = f(n.tangent) ? n.tangent.values : void 0,
|
|
1320
|
+
a = f(n.st) ? n.st.values : void 0,
|
|
1321
|
+
p = f(n.extrudeDirection) ? n.extrudeDirection.values : void 0,
|
|
1322
|
+
u = f(n.applyOffset) ? n.applyOffset.values : void 0,
|
|
1323
|
+
d = e.indices,
|
|
1324
|
+
m = [];
|
|
1325
|
+
for (let O in n) n.hasOwnProperty(O) && !Re[O] && f(n[O]) && m.push(O);
|
|
1326
|
+
let l = m.length,
|
|
1327
|
+
h = lt(e),
|
|
1328
|
+
y = lt(e),
|
|
1329
|
+
v,
|
|
1330
|
+
b,
|
|
1331
|
+
S,
|
|
1332
|
+
x,
|
|
1333
|
+
w,
|
|
1334
|
+
A = [];
|
|
1335
|
+
A.length = s.length / 3;
|
|
1336
|
+
let E = [];
|
|
1337
|
+
for (E.length = s.length / 3, w = 0; w < A.length; ++w)
|
|
1338
|
+
((A[w] = -1), (E[w] = -1));
|
|
1339
|
+
let P = d.length;
|
|
1340
|
+
for (w = 0; w < P; w += 3) {
|
|
1341
|
+
let O = d[w],
|
|
1342
|
+
L = d[w + 1],
|
|
1343
|
+
g = d[w + 2],
|
|
1344
|
+
T = r.fromArray(s, O * 3),
|
|
1345
|
+
C = r.fromArray(s, L * 3),
|
|
1346
|
+
z = r.fromArray(s, g * 3),
|
|
1347
|
+
q = Ne(T, C, z);
|
|
1348
|
+
if (f(q) && q.positions.length > 3) {
|
|
1349
|
+
let V = q.positions,
|
|
1350
|
+
G = q.indices,
|
|
1351
|
+
M = G.length;
|
|
1352
|
+
for (let J = 0; J < M; ++J) {
|
|
1353
|
+
let Y = G[J],
|
|
1354
|
+
_ = V[Y];
|
|
1355
|
+
(_.y < 0
|
|
1356
|
+
? ((v = y.attributes), (b = y.indices), (S = A))
|
|
1357
|
+
: ((v = h.attributes), (b = h.indices), (S = E)),
|
|
1358
|
+
(x = Q(v, b, S, d, Y < 3 ? w + Y : -1, _)),
|
|
1359
|
+
Tt(O, L, g, _, s, i, o, c, a, p, u, v, m, l, n, x));
|
|
1360
|
+
}
|
|
1361
|
+
} else
|
|
1362
|
+
(f(q) &&
|
|
1363
|
+
((T = q.positions[0]), (C = q.positions[1]), (z = q.positions[2])),
|
|
1364
|
+
T.y < 0
|
|
1365
|
+
? ((v = y.attributes), (b = y.indices), (S = A))
|
|
1366
|
+
: ((v = h.attributes), (b = h.indices), (S = E)),
|
|
1367
|
+
(x = Q(v, b, S, d, w, T)),
|
|
1368
|
+
Tt(O, L, g, T, s, i, o, c, a, p, u, v, m, l, n, x),
|
|
1369
|
+
(x = Q(v, b, S, d, w + 1, C)),
|
|
1370
|
+
Tt(O, L, g, C, s, i, o, c, a, p, u, v, m, l, n, x),
|
|
1371
|
+
(x = Q(v, b, S, d, w + 2, z)),
|
|
1372
|
+
Tt(O, L, g, z, s, i, o, c, a, p, u, v, m, l, n, x));
|
|
1373
|
+
}
|
|
1374
|
+
kt(t, y, h);
|
|
1375
|
+
}
|
|
1376
|
+
var ue = Et.fromPointNormal(r.ZERO, r.UNIT_Y),
|
|
1377
|
+
Ge = new r(),
|
|
1378
|
+
Ce = new r();
|
|
1379
|
+
function ut(t, e, n, s, i, c, o) {
|
|
1380
|
+
if (!f(o)) return;
|
|
1381
|
+
let a = r.fromArray(s, t * 3, wt);
|
|
1382
|
+
r.equalsEpsilon(a, n, N.EPSILON10)
|
|
1383
|
+
? (c.applyOffset.values[i] = o[t])
|
|
1384
|
+
: (c.applyOffset.values[i] = o[e]);
|
|
1385
|
+
}
|
|
1386
|
+
function se(t) {
|
|
1387
|
+
let e = t.geometry,
|
|
1388
|
+
n = e.attributes,
|
|
1389
|
+
s = n.position.values,
|
|
1390
|
+
i = f(n.applyOffset) ? n.applyOffset.values : void 0,
|
|
1391
|
+
c = e.indices,
|
|
1392
|
+
o = lt(e),
|
|
1393
|
+
a = lt(e),
|
|
1394
|
+
p,
|
|
1395
|
+
u = c.length,
|
|
1396
|
+
d = [];
|
|
1397
|
+
d.length = s.length / 3;
|
|
1398
|
+
let m = [];
|
|
1399
|
+
for (m.length = s.length / 3, p = 0; p < d.length; ++p)
|
|
1400
|
+
((d[p] = -1), (m[p] = -1));
|
|
1401
|
+
for (p = 0; p < u; p += 2) {
|
|
1402
|
+
let l = c[p],
|
|
1403
|
+
h = c[p + 1],
|
|
1404
|
+
y = r.fromArray(s, l * 3, wt),
|
|
1405
|
+
v = r.fromArray(s, h * 3, Gt),
|
|
1406
|
+
b;
|
|
1407
|
+
(Math.abs(y.y) < N.EPSILON6 &&
|
|
1408
|
+
(y.y < 0 ? (y.y = -N.EPSILON6) : (y.y = N.EPSILON6)),
|
|
1409
|
+
Math.abs(v.y) < N.EPSILON6 &&
|
|
1410
|
+
(v.y < 0 ? (v.y = -N.EPSILON6) : (v.y = N.EPSILON6)));
|
|
1411
|
+
let S = o.attributes,
|
|
1412
|
+
x = o.indices,
|
|
1413
|
+
w = m,
|
|
1414
|
+
A = a.attributes,
|
|
1415
|
+
E = a.indices,
|
|
1416
|
+
P = d,
|
|
1417
|
+
O = Lt.lineSegmentPlane(y, v, ue, Ct);
|
|
1418
|
+
if (f(O)) {
|
|
1419
|
+
let L = r.multiplyByScalar(r.UNIT_Y, 5 * N.EPSILON9, Ge);
|
|
1420
|
+
y.y < 0 &&
|
|
1421
|
+
(r.negate(L, L),
|
|
1422
|
+
(S = a.attributes),
|
|
1423
|
+
(x = a.indices),
|
|
1424
|
+
(w = d),
|
|
1425
|
+
(A = o.attributes),
|
|
1426
|
+
(E = o.indices),
|
|
1427
|
+
(P = m));
|
|
1428
|
+
let g = r.add(O, L, Ce);
|
|
1429
|
+
((b = Q(S, x, w, c, p, y)),
|
|
1430
|
+
ut(l, h, y, s, b, S, i),
|
|
1431
|
+
(b = Q(S, x, w, c, -1, g)),
|
|
1432
|
+
ut(l, h, g, s, b, S, i),
|
|
1433
|
+
r.negate(L, L),
|
|
1434
|
+
r.add(O, L, g),
|
|
1435
|
+
(b = Q(A, E, P, c, -1, g)),
|
|
1436
|
+
ut(l, h, g, s, b, A, i),
|
|
1437
|
+
(b = Q(A, E, P, c, p + 1, v)),
|
|
1438
|
+
ut(l, h, v, s, b, A, i));
|
|
1439
|
+
} else {
|
|
1440
|
+
let L, g, T;
|
|
1441
|
+
(y.y < 0
|
|
1442
|
+
? ((L = a.attributes), (g = a.indices), (T = d))
|
|
1443
|
+
: ((L = o.attributes), (g = o.indices), (T = m)),
|
|
1444
|
+
(b = Q(L, g, T, c, p, y)),
|
|
1445
|
+
ut(l, h, y, s, b, L, i),
|
|
1446
|
+
(b = Q(L, g, T, c, p + 1, v)),
|
|
1447
|
+
ut(l, h, v, s, b, L, i));
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
kt(t, a, o);
|
|
1451
|
+
}
|
|
1452
|
+
var oe = new R(),
|
|
1453
|
+
Be = new R(),
|
|
1454
|
+
le = new r(),
|
|
1455
|
+
fe = new r(),
|
|
1456
|
+
Bt = new r(),
|
|
1457
|
+
ke = new r(),
|
|
1458
|
+
Fe = new r(),
|
|
1459
|
+
Me = new r(),
|
|
1460
|
+
re = new dt();
|
|
1461
|
+
function ce(t) {
|
|
1462
|
+
let e = t.attributes,
|
|
1463
|
+
n = e.position.values,
|
|
1464
|
+
s = e.prevPosition.values,
|
|
1465
|
+
i = e.nextPosition.values,
|
|
1466
|
+
c = n.length;
|
|
1467
|
+
for (let o = 0; o < c; o += 3) {
|
|
1468
|
+
let a = r.unpack(n, o, le);
|
|
1469
|
+
if (a.x > 0) continue;
|
|
1470
|
+
let p = r.unpack(s, o, fe);
|
|
1471
|
+
((a.y < 0 && p.y > 0) || (a.y > 0 && p.y < 0)) &&
|
|
1472
|
+
(o - 3 > 0
|
|
1473
|
+
? ((s[o] = n[o - 3]), (s[o + 1] = n[o - 2]), (s[o + 2] = n[o - 1]))
|
|
1474
|
+
: r.pack(a, s, o));
|
|
1475
|
+
let u = r.unpack(i, o, Bt);
|
|
1476
|
+
((a.y < 0 && u.y > 0) || (a.y > 0 && u.y < 0)) &&
|
|
1477
|
+
(o + 3 < c
|
|
1478
|
+
? ((i[o] = n[o + 3]), (i[o + 1] = n[o + 4]), (i[o + 2] = n[o + 5]))
|
|
1479
|
+
: r.pack(a, i, o));
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
var _e = 5 * N.EPSILON9,
|
|
1483
|
+
At = N.EPSILON6;
|
|
1484
|
+
function Ue(t) {
|
|
1485
|
+
let e = t.geometry,
|
|
1486
|
+
n = e.attributes,
|
|
1487
|
+
s = n.position.values,
|
|
1488
|
+
i = n.prevPosition.values,
|
|
1489
|
+
c = n.nextPosition.values,
|
|
1490
|
+
o = n.expandAndWidth.values,
|
|
1491
|
+
a = f(n.st) ? n.st.values : void 0,
|
|
1492
|
+
p = f(n.color) ? n.color.values : void 0,
|
|
1493
|
+
u = lt(e),
|
|
1494
|
+
d = lt(e),
|
|
1495
|
+
m,
|
|
1496
|
+
l,
|
|
1497
|
+
h,
|
|
1498
|
+
y = !1,
|
|
1499
|
+
v = s.length / 3;
|
|
1500
|
+
for (m = 0; m < v; m += 4) {
|
|
1501
|
+
let b = m,
|
|
1502
|
+
S = m + 2,
|
|
1503
|
+
x = r.fromArray(s, b * 3, le),
|
|
1504
|
+
w = r.fromArray(s, S * 3, fe);
|
|
1505
|
+
if (Math.abs(x.y) < At)
|
|
1506
|
+
for (
|
|
1507
|
+
x.y = At * (w.y < 0 ? -1 : 1),
|
|
1508
|
+
s[m * 3 + 1] = x.y,
|
|
1509
|
+
s[(m + 1) * 3 + 1] = x.y,
|
|
1510
|
+
l = b * 3;
|
|
1511
|
+
l < b * 3 + 4 * 3;
|
|
1512
|
+
l += 3
|
|
1513
|
+
)
|
|
1514
|
+
((i[l] = s[m * 3]),
|
|
1515
|
+
(i[l + 1] = s[m * 3 + 1]),
|
|
1516
|
+
(i[l + 2] = s[m * 3 + 2]));
|
|
1517
|
+
if (Math.abs(w.y) < At)
|
|
1518
|
+
for (
|
|
1519
|
+
w.y = At * (x.y < 0 ? -1 : 1),
|
|
1520
|
+
s[(m + 2) * 3 + 1] = w.y,
|
|
1521
|
+
s[(m + 3) * 3 + 1] = w.y,
|
|
1522
|
+
l = b * 3;
|
|
1523
|
+
l < b * 3 + 4 * 3;
|
|
1524
|
+
l += 3
|
|
1525
|
+
)
|
|
1526
|
+
((c[l] = s[(m + 2) * 3]),
|
|
1527
|
+
(c[l + 1] = s[(m + 2) * 3 + 1]),
|
|
1528
|
+
(c[l + 2] = s[(m + 2) * 3 + 2]));
|
|
1529
|
+
let A = u.attributes,
|
|
1530
|
+
E = u.indices,
|
|
1531
|
+
P = d.attributes,
|
|
1532
|
+
O = d.indices,
|
|
1533
|
+
L = Lt.lineSegmentPlane(x, w, ue, ke);
|
|
1534
|
+
if (f(L)) {
|
|
1535
|
+
y = !0;
|
|
1536
|
+
let g = r.multiplyByScalar(r.UNIT_Y, _e, Fe);
|
|
1537
|
+
x.y < 0 &&
|
|
1538
|
+
(r.negate(g, g),
|
|
1539
|
+
(A = d.attributes),
|
|
1540
|
+
(E = d.indices),
|
|
1541
|
+
(P = u.attributes),
|
|
1542
|
+
(O = u.indices));
|
|
1543
|
+
let T = r.add(L, g, Me);
|
|
1544
|
+
(A.position.values.push(x.x, x.y, x.z, x.x, x.y, x.z),
|
|
1545
|
+
A.position.values.push(T.x, T.y, T.z),
|
|
1546
|
+
A.position.values.push(T.x, T.y, T.z),
|
|
1547
|
+
A.prevPosition.values.push(i[b * 3], i[b * 3 + 1], i[b * 3 + 2]),
|
|
1548
|
+
A.prevPosition.values.push(i[b * 3 + 3], i[b * 3 + 4], i[b * 3 + 5]),
|
|
1549
|
+
A.prevPosition.values.push(x.x, x.y, x.z, x.x, x.y, x.z),
|
|
1550
|
+
A.nextPosition.values.push(T.x, T.y, T.z),
|
|
1551
|
+
A.nextPosition.values.push(T.x, T.y, T.z),
|
|
1552
|
+
A.nextPosition.values.push(T.x, T.y, T.z),
|
|
1553
|
+
A.nextPosition.values.push(T.x, T.y, T.z),
|
|
1554
|
+
r.negate(g, g),
|
|
1555
|
+
r.add(L, g, T),
|
|
1556
|
+
P.position.values.push(T.x, T.y, T.z),
|
|
1557
|
+
P.position.values.push(T.x, T.y, T.z),
|
|
1558
|
+
P.position.values.push(w.x, w.y, w.z, w.x, w.y, w.z),
|
|
1559
|
+
P.prevPosition.values.push(T.x, T.y, T.z),
|
|
1560
|
+
P.prevPosition.values.push(T.x, T.y, T.z),
|
|
1561
|
+
P.prevPosition.values.push(T.x, T.y, T.z),
|
|
1562
|
+
P.prevPosition.values.push(T.x, T.y, T.z),
|
|
1563
|
+
P.nextPosition.values.push(w.x, w.y, w.z, w.x, w.y, w.z),
|
|
1564
|
+
P.nextPosition.values.push(c[S * 3], c[S * 3 + 1], c[S * 3 + 2]),
|
|
1565
|
+
P.nextPosition.values.push(c[S * 3 + 3], c[S * 3 + 4], c[S * 3 + 5]));
|
|
1566
|
+
let C = R.fromArray(o, b * 2, oe),
|
|
1567
|
+
z = Math.abs(C.y);
|
|
1568
|
+
(A.expandAndWidth.values.push(-1, z, 1, z),
|
|
1569
|
+
A.expandAndWidth.values.push(-1, -z, 1, -z),
|
|
1570
|
+
P.expandAndWidth.values.push(-1, z, 1, z),
|
|
1571
|
+
P.expandAndWidth.values.push(-1, -z, 1, -z));
|
|
1572
|
+
let q = r.magnitudeSquared(r.subtract(L, x, Bt));
|
|
1573
|
+
if (((q /= r.magnitudeSquared(r.subtract(w, x, Bt))), f(p))) {
|
|
1574
|
+
let V = dt.fromArray(p, b * 4, re),
|
|
1575
|
+
G = dt.fromArray(p, S * 4, re),
|
|
1576
|
+
M = N.lerp(V.x, G.x, q),
|
|
1577
|
+
J = N.lerp(V.y, G.y, q),
|
|
1578
|
+
Y = N.lerp(V.z, G.z, q),
|
|
1579
|
+
_ = N.lerp(V.w, G.w, q);
|
|
1580
|
+
for (l = b * 4; l < b * 4 + 2 * 4; ++l) A.color.values.push(p[l]);
|
|
1581
|
+
for (
|
|
1582
|
+
A.color.values.push(M, J, Y, _),
|
|
1583
|
+
A.color.values.push(M, J, Y, _),
|
|
1584
|
+
P.color.values.push(M, J, Y, _),
|
|
1585
|
+
P.color.values.push(M, J, Y, _),
|
|
1586
|
+
l = S * 4;
|
|
1587
|
+
l < S * 4 + 2 * 4;
|
|
1588
|
+
++l
|
|
1589
|
+
)
|
|
1590
|
+
P.color.values.push(p[l]);
|
|
1591
|
+
}
|
|
1592
|
+
if (f(a)) {
|
|
1593
|
+
let V = R.fromArray(a, b * 2, oe),
|
|
1594
|
+
G = R.fromArray(a, (m + 3) * 2, Be),
|
|
1595
|
+
M = N.lerp(V.x, G.x, q);
|
|
1596
|
+
for (l = b * 2; l < b * 2 + 2 * 2; ++l) A.st.values.push(a[l]);
|
|
1597
|
+
for (
|
|
1598
|
+
A.st.values.push(M, V.y),
|
|
1599
|
+
A.st.values.push(M, G.y),
|
|
1600
|
+
P.st.values.push(M, V.y),
|
|
1601
|
+
P.st.values.push(M, G.y),
|
|
1602
|
+
l = S * 2;
|
|
1603
|
+
l < S * 2 + 2 * 2;
|
|
1604
|
+
++l
|
|
1605
|
+
)
|
|
1606
|
+
P.st.values.push(a[l]);
|
|
1607
|
+
}
|
|
1608
|
+
((h = A.position.values.length / 3 - 4),
|
|
1609
|
+
E.push(h, h + 2, h + 1),
|
|
1610
|
+
E.push(h + 1, h + 2, h + 3),
|
|
1611
|
+
(h = P.position.values.length / 3 - 4),
|
|
1612
|
+
O.push(h, h + 2, h + 1),
|
|
1613
|
+
O.push(h + 1, h + 2, h + 3));
|
|
1614
|
+
} else {
|
|
1615
|
+
let g, T;
|
|
1616
|
+
for (
|
|
1617
|
+
x.y < 0
|
|
1618
|
+
? ((g = d.attributes), (T = d.indices))
|
|
1619
|
+
: ((g = u.attributes), (T = u.indices)),
|
|
1620
|
+
g.position.values.push(x.x, x.y, x.z),
|
|
1621
|
+
g.position.values.push(x.x, x.y, x.z),
|
|
1622
|
+
g.position.values.push(w.x, w.y, w.z),
|
|
1623
|
+
g.position.values.push(w.x, w.y, w.z),
|
|
1624
|
+
l = m * 3;
|
|
1625
|
+
l < m * 3 + 4 * 3;
|
|
1626
|
+
++l
|
|
1627
|
+
)
|
|
1628
|
+
(g.prevPosition.values.push(i[l]), g.nextPosition.values.push(c[l]));
|
|
1629
|
+
for (l = m * 2; l < m * 2 + 4 * 2; ++l)
|
|
1630
|
+
(g.expandAndWidth.values.push(o[l]), f(a) && g.st.values.push(a[l]));
|
|
1631
|
+
if (f(p))
|
|
1632
|
+
for (l = m * 4; l < m * 4 + 4 * 4; ++l) g.color.values.push(p[l]);
|
|
1633
|
+
((h = g.position.values.length / 3 - 4),
|
|
1634
|
+
T.push(h, h + 2, h + 1),
|
|
1635
|
+
T.push(h + 1, h + 2, h + 3));
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
(y && (ce(d), ce(u)), kt(t, d, u));
|
|
1639
|
+
}
|
|
1640
|
+
F.splitLongitude = function (t) {
|
|
1641
|
+
if (!f(t)) throw new I("instance is required.");
|
|
1642
|
+
let e = t.geometry,
|
|
1643
|
+
n = e.boundingSphere;
|
|
1644
|
+
if (
|
|
1645
|
+
f(n) &&
|
|
1646
|
+
(n.center.x - n.radius > 0 ||
|
|
1647
|
+
rt.intersectPlane(n, Et.ORIGIN_ZX_PLANE) !== Ut.INTERSECTING)
|
|
1648
|
+
)
|
|
1649
|
+
return t;
|
|
1650
|
+
if (e.geometryType !== mt.NONE)
|
|
1651
|
+
switch (e.geometryType) {
|
|
1652
|
+
case mt.POLYLINES:
|
|
1653
|
+
Ue(t);
|
|
1654
|
+
break;
|
|
1655
|
+
case mt.TRIANGLES:
|
|
1656
|
+
ie(t);
|
|
1657
|
+
break;
|
|
1658
|
+
case mt.LINES:
|
|
1659
|
+
se(t);
|
|
1660
|
+
break;
|
|
1661
|
+
}
|
|
1662
|
+
else
|
|
1663
|
+
(Le(e),
|
|
1664
|
+
e.primitiveType === D.TRIANGLES
|
|
1665
|
+
? ie(t)
|
|
1666
|
+
: e.primitiveType === D.LINES && se(t));
|
|
1667
|
+
return t;
|
|
1668
|
+
};
|
|
1669
|
+
var gn = F;
|
|
1670
|
+
export { gn as a };
|