create-swdg-frontend 0.1.6 → 0.2.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 +31 -13
- package/bin/index.js +3 -244
- package/lib/argv.js +43 -0
- package/lib/cli.js +141 -0
- package/lib/constants.js +24 -0
- package/lib/gis.js +92 -0
- package/lib/manifest.js +23 -0
- package/lib/prompts.js +55 -0
- package/lib/scaffold.js +118 -0
- package/package.json +6 -2
- package/scripts/sync-template.js +120 -0
- package/scripts/validate-template.mjs +74 -0
- package/stubs/tsconfig.node.json +11 -0
- package/stubs/types-env.d.ts +9 -0
- package/stubs/vite.config.ts +64 -0
- package/template/.env.example +6 -0
- package/template/.github/workflows/ci.yml +23 -0
- package/template/.github/workflows/release.yml +69 -0
- package/template/.husky/commit-msg +42 -42
- package/template/.husky/pre-commit +2 -2
- package/template/.husky/prepare-commit-msg +0 -0
- package/template/.lintstagedrc +5 -5
- package/template/.prettierignore +26 -26
- package/template/.prettierrc.cjs +10 -10
- package/template/.stylelintignore +1 -1
- package/template/.stylelintrc.json +12 -6
- package/template/README.md +99 -36
- package/template/auto-imports.d.ts +10 -0
- package/template/commitlint.config.cjs +64 -64
- package/template/docs/MAINTAINER.md +77 -0
- package/template/docs/ONBOARDING.md +284 -0
- package/template/docs/TESTING.md +104 -0
- package/template/eslint.config.js +97 -96
- package/template/index.html +17 -17
- package/template/interface/user.ts +5 -5
- package/template/package.json +88 -86
- package/template/pnpm-lock.yaml +6360 -0
- package/template/postcss.config.js +5 -0
- package/template/scripts/gen-api.cjs +280 -230
- package/template/scripts/release.mjs +53 -59
- package/template/scripts/set-release-version.mjs +46 -0
- package/template/scripts/test-pipeline.mjs +85 -0
- package/template/scripts/test-scaffold.mjs +197 -0
- package/template/scripts/test-template.mjs +52 -0
- package/template/scripts/verify.mjs +28 -0
- package/template/scripts/vite-plugin-cesium-dev.ts +56 -0
- package/template/src/App.vue +6 -6
- package/template/src/api/README.md +7 -3
- package/template/src/assets/favicon.svg +49 -49
- package/template/src/components/Body/index.vue +80 -16
- package/template/src/components/CesiumViewer/index.vue +36 -0
- package/template/src/components/Header/index.vue +19 -8
- package/template/src/components/OnboardingDeck/index.vue +449 -0
- package/template/src/data/onboardingSlides.ts +208 -0
- package/template/src/directive/focus.ts +9 -9
- package/template/src/layout/BasicLayout.vue +28 -28
- package/template/src/main.ts +25 -33
- package/template/src/router/index.ts +30 -24
- package/template/src/router/routeUtils.ts +13 -0
- package/template/src/stores/README.md +3 -3
- package/template/src/stores/useCounter.ts +12 -12
- package/template/src/styles/alerts.less +85 -85
- package/template/src/styles/global.css +326 -326
- package/template/src/styles/shell.css +232 -0
- package/template/src/utils/alert.ts +58 -58
- package/template/src/utils/axios-middleware.js +180 -0
- package/template/src/utils/cesium/index.ts +71 -0
- package/template/src/utils/components.ts +21 -21
- package/template/src/utils/composables/useAlert.ts +14 -14
- package/template/src/utils/composables/useFeatureGis.ts +24 -0
- package/template/src/utils/http.ts +5 -0
- package/template/src/views/examples/cesium/index.vue +85 -0
- package/template/src/views/examples/guide/index.vue +42 -0
- package/template/src/views/examples/test/index.vue +63 -0
- package/template/src/views/index.vue +8 -9
- package/template/src/vite-env.d.ts +1 -1
- package/template/tests/README.md +7 -6
- package/template/tests/e2e/README.md +3 -3
- package/template/tests/setup.ts +1 -1
- package/template/tests/unit/onboardingSlides.test.ts +20 -0
- package/template/tests/unit/router.utils.test.ts +21 -0
- package/template/tests/unit/scaffold.lib.test.ts +44 -0
- package/template/tests/unit/useFeatureGis.test.ts +14 -0
- package/template/tests/utils/helpers.ts +1 -1
- package/template/tsconfig.json +51 -51
- package/template/tsconfig.node.json +11 -11
- package/template/types/README.md +3 -3
- package/template/types/env.d.ts +13 -0
- package/template/types/global.d.ts +9 -9
- package/template/vite.config.ts +89 -75
- package/template/vitest.config.ts +22 -9
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_0.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_1.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_10.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_11.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_12.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_13.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_14.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_15.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_16.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_17.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_18.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_19.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_2.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_20.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_21.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_22.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_23.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_24.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_25.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_26.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_27.json +0 -438
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_3.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_4.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_5.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_6.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_7.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_8.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_9.json +0 -1012
- 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 +0 -14
- 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 +0 -1
- 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 +0 -10924
- package/template/public/Cesium1.119/Cesium.js +0 -185772
- package/template/public/Cesium1.119/ThirdParty/Workers/package.json +0 -3
- package/template/public/Cesium1.119/ThirdParty/Workers/pako_deflate.min.js +0 -1681
- package/template/public/Cesium1.119/ThirdParty/Workers/pako_inflate.min.js +0 -1489
- package/template/public/Cesium1.119/ThirdParty/Workers/z-worker-pako.js +0 -1070
- 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 +0 -11424
- package/template/public/Cesium1.119/Widgets/Animation/Animation.css +0 -127
- package/template/public/Cesium1.119/Widgets/Animation/lighter.css +0 -78
- package/template/public/Cesium1.119/Widgets/BaseLayerPicker/BaseLayerPicker.css +0 -112
- package/template/public/Cesium1.119/Widgets/BaseLayerPicker/lighter.css +0 -28
- package/template/public/Cesium1.119/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +0 -104
- package/template/public/Cesium1.119/Widgets/CesiumInspector/CesiumInspector.css +0 -115
- package/template/public/Cesium1.119/Widgets/CesiumWidget/CesiumWidget.css +0 -119
- package/template/public/Cesium1.119/Widgets/CesiumWidget/lighter.css +0 -14
- package/template/public/Cesium1.119/Widgets/FullscreenButton/FullscreenButton.css +0 -8
- package/template/public/Cesium1.119/Widgets/Geocoder/Geocoder.css +0 -72
- package/template/public/Cesium1.119/Widgets/Geocoder/lighter.css +0 -17
- package/template/public/Cesium1.119/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +0 -27
- 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 +0 -84
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseLeft.svg +0 -76
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseMiddle.svg +0 -76
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseRight.svg +0 -76
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/Touch.svg +0 -120
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchDrag.svg +0 -129
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchRotate.svg +0 -76
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchTilt.svg +0 -135
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchZoom.svg +0 -74
- 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 +0 -94
- package/template/public/Cesium1.119/Widgets/InfoBox/InfoBoxDescription.css +0 -178
- package/template/public/Cesium1.119/Widgets/NavigationHelpButton/NavigationHelpButton.css +0 -95
- package/template/public/Cesium1.119/Widgets/NavigationHelpButton/lighter.css +0 -38
- package/template/public/Cesium1.119/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +0 -15
- package/template/public/Cesium1.119/Widgets/ProjectionPicker/ProjectionPicker.css +0 -46
- package/template/public/Cesium1.119/Widgets/SceneModePicker/SceneModePicker.css +0 -72
- package/template/public/Cesium1.119/Widgets/SelectionIndicator/SelectionIndicator.css +0 -22
- package/template/public/Cesium1.119/Widgets/Timeline/Timeline.css +0 -103
- package/template/public/Cesium1.119/Widgets/Timeline/lighter.css +0 -18
- package/template/public/Cesium1.119/Widgets/VRButton/VRButton.css +0 -8
- package/template/public/Cesium1.119/Widgets/Viewer/Viewer.css +0 -107
- package/template/public/Cesium1.119/Widgets/VoxelInspector/VoxelInspector.css +0 -18
- package/template/public/Cesium1.119/Widgets/lighter.css +0 -246
- package/template/public/Cesium1.119/Widgets/lighterShared.css +0 -46
- package/template/public/Cesium1.119/Widgets/shared.css +0 -103
- package/template/public/Cesium1.119/Widgets/widgets.css +0 -1376
- package/template/public/Cesium1.119/Workers/chunk-3C7WC463.js +0 -611
- package/template/public/Cesium1.119/Workers/chunk-3JW36LZF.js +0 -166
- package/template/public/Cesium1.119/Workers/chunk-4BTGX3WJ.js +0 -264
- package/template/public/Cesium1.119/Workers/chunk-4WRMLZA7.js +0 -128
- package/template/public/Cesium1.119/Workers/chunk-7Z5IIKOJ.js +0 -8046
- package/template/public/Cesium1.119/Workers/chunk-ABGXSJNX.js +0 -341
- package/template/public/Cesium1.119/Workers/chunk-AMQUWUD4.js +0 -269
- package/template/public/Cesium1.119/Workers/chunk-ATPDRNKI.js +0 -28
- package/template/public/Cesium1.119/Workers/chunk-BMHPVZ4H.js +0 -199
- package/template/public/Cesium1.119/Workers/chunk-CBEO3SHS.js +0 -1102
- package/template/public/Cesium1.119/Workers/chunk-CV7DLCWG.js +0 -485
- package/template/public/Cesium1.119/Workers/chunk-DQO6B4EQ.js +0 -76
- package/template/public/Cesium1.119/Workers/chunk-ED3TLP6D.js +0 -91
- package/template/public/Cesium1.119/Workers/chunk-EFZKO5RU.js +0 -42
- package/template/public/Cesium1.119/Workers/chunk-F5IHREXR.js +0 -2678
- package/template/public/Cesium1.119/Workers/chunk-FKRG4HDY.js +0 -516
- package/template/public/Cesium1.119/Workers/chunk-FYOYUPXG.js +0 -399
- package/template/public/Cesium1.119/Workers/chunk-GFN7NNSJ.js +0 -65
- package/template/public/Cesium1.119/Workers/chunk-HEEMUCG6.js +0 -92
- package/template/public/Cesium1.119/Workers/chunk-HSWA4OEL.js +0 -672
- package/template/public/Cesium1.119/Workers/chunk-IAC5XVZV.js +0 -287
- package/template/public/Cesium1.119/Workers/chunk-II4VNKYR.js +0 -50
- package/template/public/Cesium1.119/Workers/chunk-ILGBPNP6.js +0 -28
- package/template/public/Cesium1.119/Workers/chunk-IRH46BDL.js +0 -124
- package/template/public/Cesium1.119/Workers/chunk-IUA6FAOZ.js +0 -31
- package/template/public/Cesium1.119/Workers/chunk-K4ASOM65.js +0 -331
- package/template/public/Cesium1.119/Workers/chunk-KCIZBVXL.js +0 -258
- package/template/public/Cesium1.119/Workers/chunk-KF5NF354.js +0 -162
- package/template/public/Cesium1.119/Workers/chunk-KRKI6AAO.js +0 -773
- package/template/public/Cesium1.119/Workers/chunk-KZNJOCYU.js +0 -162
- package/template/public/Cesium1.119/Workers/chunk-O5IJ3OGP.js +0 -857
- package/template/public/Cesium1.119/Workers/chunk-OO23RBLX.js +0 -183
- package/template/public/Cesium1.119/Workers/chunk-P37AI2DW.js +0 -85
- package/template/public/Cesium1.119/Workers/chunk-PDMQLSBL.js +0 -108
- package/template/public/Cesium1.119/Workers/chunk-PEYJTJPE.js +0 -73
- package/template/public/Cesium1.119/Workers/chunk-POASMU2N.js +0 -2372
- package/template/public/Cesium1.119/Workers/chunk-PXCJYT2S.js +0 -73
- package/template/public/Cesium1.119/Workers/chunk-Q6L7X3LP.js +0 -538
- package/template/public/Cesium1.119/Workers/chunk-QB3MDM4J.js +0 -1670
- package/template/public/Cesium1.119/Workers/chunk-R6KGAEF6.js +0 -392
- package/template/public/Cesium1.119/Workers/chunk-RXTBM4OI.js +0 -57
- package/template/public/Cesium1.119/Workers/chunk-SB224QGV.js +0 -72
- package/template/public/Cesium1.119/Workers/chunk-T6BE4RZK.js +0 -37
- package/template/public/Cesium1.119/Workers/chunk-TAMCUKAR.js +0 -814
- package/template/public/Cesium1.119/Workers/chunk-TMSETF7M.js +0 -579
- package/template/public/Cesium1.119/Workers/chunk-TOGHF3VN.js +0 -376
- package/template/public/Cesium1.119/Workers/chunk-UH2WFNTA.js +0 -111
- package/template/public/Cesium1.119/Workers/chunk-V7JEDBOE.js +0 -573
- package/template/public/Cesium1.119/Workers/chunk-VBIROZR5.js +0 -633
- package/template/public/Cesium1.119/Workers/chunk-W23CU777.js +0 -271
- package/template/public/Cesium1.119/Workers/chunk-X5IHHI6X.js +0 -173
- package/template/public/Cesium1.119/Workers/chunk-XHX2UPDO.js +0 -217
- package/template/public/Cesium1.119/Workers/combineGeometry.js +0 -53
- package/template/public/Cesium1.119/Workers/createBoxGeometry.js +0 -45
- package/template/public/Cesium1.119/Workers/createBoxOutlineGeometry.js +0 -189
- package/template/public/Cesium1.119/Workers/createCircleGeometry.js +0 -148
- package/template/public/Cesium1.119/Workers/createCircleOutlineGeometry.js +0 -105
- package/template/public/Cesium1.119/Workers/createCoplanarPolygonGeometry.js +0 -293
- package/template/public/Cesium1.119/Workers/createCoplanarPolygonOutlineGeometry.js +0 -143
- package/template/public/Cesium1.119/Workers/createCorridorGeometry.js +0 -830
- package/template/public/Cesium1.119/Workers/createCorridorOutlineGeometry.js +0 -417
- package/template/public/Cesium1.119/Workers/createCylinderGeometry.js +0 -47
- package/template/public/Cesium1.119/Workers/createCylinderOutlineGeometry.js +0 -170
- package/template/public/Cesium1.119/Workers/createEllipseGeometry.js +0 -58
- package/template/public/Cesium1.119/Workers/createEllipseOutlineGeometry.js +0 -51
- package/template/public/Cesium1.119/Workers/createEllipsoidGeometry.js +0 -46
- package/template/public/Cesium1.119/Workers/createEllipsoidOutlineGeometry.js +0 -45
- package/template/public/Cesium1.119/Workers/createFrustumGeometry.js +0 -45
- package/template/public/Cesium1.119/Workers/createFrustumOutlineGeometry.js +0 -164
- package/template/public/Cesium1.119/Workers/createGeometry.js +0 -159
- package/template/public/Cesium1.119/Workers/createGroundPolylineGeometry.js +0 -911
- package/template/public/Cesium1.119/Workers/createPlaneGeometry.js +0 -185
- package/template/public/Cesium1.119/Workers/createPlaneOutlineGeometry.js +0 -93
- package/template/public/Cesium1.119/Workers/createPolygonGeometry.js +0 -884
- package/template/public/Cesium1.119/Workers/createPolygonOutlineGeometry.js +0 -359
- package/template/public/Cesium1.119/Workers/createPolylineGeometry.js +0 -349
- package/template/public/Cesium1.119/Workers/createPolylineVolumeGeometry.js +0 -262
- package/template/public/Cesium1.119/Workers/createPolylineVolumeOutlineGeometry.js +0 -177
- package/template/public/Cesium1.119/Workers/createRectangleGeometry.js +0 -787
- package/template/public/Cesium1.119/Workers/createRectangleOutlineGeometry.js +0 -299
- package/template/public/Cesium1.119/Workers/createSimplePolylineGeometry.js +0 -294
- package/template/public/Cesium1.119/Workers/createSphereGeometry.js +0 -84
- package/template/public/Cesium1.119/Workers/createSphereOutlineGeometry.js +0 -83
- package/template/public/Cesium1.119/Workers/createTaskProcessorWorker.js +0 -28
- package/template/public/Cesium1.119/Workers/createVectorTileClampedPolylines.js +0 -289
- package/template/public/Cesium1.119/Workers/createVectorTileGeometries.js +0 -258
- package/template/public/Cesium1.119/Workers/createVectorTilePoints.js +0 -79
- package/template/public/Cesium1.119/Workers/createVectorTilePolygons.js +0 -275
- package/template/public/Cesium1.119/Workers/createVectorTilePolylines.js +0 -176
- package/template/public/Cesium1.119/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -375
- package/template/public/Cesium1.119/Workers/createVerticesFromHeightmap.js +0 -1772
- package/template/public/Cesium1.119/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -425
- package/template/public/Cesium1.119/Workers/createWallGeometry.js +0 -320
- package/template/public/Cesium1.119/Workers/createWallOutlineGeometry.js +0 -229
- package/template/public/Cesium1.119/Workers/decodeDraco.js +0 -227
- package/template/public/Cesium1.119/Workers/decodeGoogleEarthEnterprisePacket.js +0 -1836
- package/template/public/Cesium1.119/Workers/decodeI3S.js +0 -924
- package/template/public/Cesium1.119/Workers/transcodeKTX2.js +0 -3180
- package/template/public/Cesium1.119/Workers/transferTypedArrayTest.js +0 -34
- package/template/public/Cesium1.119/Workers/upsampleQuantizedTerrainMesh.js +0 -534
- package/template/public/Cesium1.119/index.cjs +0 -185632
- package/template/public/Cesium1.119/index.js +0 -182874
- package/template/src/views/Test/index.vue +0 -23
- package/template/tests/unit/example.test.ts +0 -7
|
@@ -1,2372 +0,0 @@
|
|
|
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 w } from "./chunk-R6KGAEF6.js";
|
|
27
|
-
import { a as O } from "./chunk-IUA6FAOZ.js";
|
|
28
|
-
import { a as S, b as c } from "./chunk-UH2WFNTA.js";
|
|
29
|
-
import { e as u } from "./chunk-PEYJTJPE.js";
|
|
30
|
-
function f(n, e, o) {
|
|
31
|
-
((this.x = O(n, 0)), (this.y = O(e, 0)), (this.z = O(o, 0)));
|
|
32
|
-
}
|
|
33
|
-
f.fromSpherical = function (n, e) {
|
|
34
|
-
(c.typeOf.object("spherical", n), u(e) || (e = new f()));
|
|
35
|
-
let o = n.clock,
|
|
36
|
-
t = n.cone,
|
|
37
|
-
i = O(n.magnitude, 1),
|
|
38
|
-
p = i * Math.sin(t);
|
|
39
|
-
return (
|
|
40
|
-
(e.x = p * Math.cos(o)),
|
|
41
|
-
(e.y = p * Math.sin(o)),
|
|
42
|
-
(e.z = i * Math.cos(t)),
|
|
43
|
-
e
|
|
44
|
-
);
|
|
45
|
-
};
|
|
46
|
-
f.fromElements = function (n, e, o, t) {
|
|
47
|
-
return u(t) ? ((t.x = n), (t.y = e), (t.z = o), t) : new f(n, e, o);
|
|
48
|
-
};
|
|
49
|
-
f.clone = function (n, e) {
|
|
50
|
-
if (u(n))
|
|
51
|
-
return u(e)
|
|
52
|
-
? ((e.x = n.x), (e.y = n.y), (e.z = n.z), e)
|
|
53
|
-
: new f(n.x, n.y, n.z);
|
|
54
|
-
};
|
|
55
|
-
f.fromCartesian4 = f.clone;
|
|
56
|
-
f.packedLength = 3;
|
|
57
|
-
f.pack = function (n, e, o) {
|
|
58
|
-
return (
|
|
59
|
-
c.typeOf.object("value", n),
|
|
60
|
-
c.defined("array", e),
|
|
61
|
-
(o = O(o, 0)),
|
|
62
|
-
(e[o++] = n.x),
|
|
63
|
-
(e[o++] = n.y),
|
|
64
|
-
(e[o] = n.z),
|
|
65
|
-
e
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
f.unpack = function (n, e, o) {
|
|
69
|
-
return (
|
|
70
|
-
c.defined("array", n),
|
|
71
|
-
(e = O(e, 0)),
|
|
72
|
-
u(o) || (o = new f()),
|
|
73
|
-
(o.x = n[e++]),
|
|
74
|
-
(o.y = n[e++]),
|
|
75
|
-
(o.z = n[e]),
|
|
76
|
-
o
|
|
77
|
-
);
|
|
78
|
-
};
|
|
79
|
-
f.packArray = function (n, e) {
|
|
80
|
-
c.defined("array", n);
|
|
81
|
-
let o = n.length,
|
|
82
|
-
t = o * 3;
|
|
83
|
-
if (!u(e)) e = new Array(t);
|
|
84
|
-
else {
|
|
85
|
-
if (!Array.isArray(e) && e.length !== t)
|
|
86
|
-
throw new S(
|
|
87
|
-
"If result is a typed array, it must have exactly array.length * 3 elements",
|
|
88
|
-
);
|
|
89
|
-
e.length !== t && (e.length = t);
|
|
90
|
-
}
|
|
91
|
-
for (let i = 0; i < o; ++i) f.pack(n[i], e, i * 3);
|
|
92
|
-
return e;
|
|
93
|
-
};
|
|
94
|
-
f.unpackArray = function (n, e) {
|
|
95
|
-
if (
|
|
96
|
-
(c.defined("array", n),
|
|
97
|
-
c.typeOf.number.greaterThanOrEquals("array.length", n.length, 3),
|
|
98
|
-
n.length % 3 !== 0)
|
|
99
|
-
)
|
|
100
|
-
throw new S("array length must be a multiple of 3.");
|
|
101
|
-
let o = n.length;
|
|
102
|
-
u(e) ? (e.length = o / 3) : (e = new Array(o / 3));
|
|
103
|
-
for (let t = 0; t < o; t += 3) {
|
|
104
|
-
let i = t / 3;
|
|
105
|
-
e[i] = f.unpack(n, t, e[i]);
|
|
106
|
-
}
|
|
107
|
-
return e;
|
|
108
|
-
};
|
|
109
|
-
f.fromArray = f.unpack;
|
|
110
|
-
f.maximumComponent = function (n) {
|
|
111
|
-
return (c.typeOf.object("cartesian", n), Math.max(n.x, n.y, n.z));
|
|
112
|
-
};
|
|
113
|
-
f.minimumComponent = function (n) {
|
|
114
|
-
return (c.typeOf.object("cartesian", n), Math.min(n.x, n.y, n.z));
|
|
115
|
-
};
|
|
116
|
-
f.minimumByComponent = function (n, e, o) {
|
|
117
|
-
return (
|
|
118
|
-
c.typeOf.object("first", n),
|
|
119
|
-
c.typeOf.object("second", e),
|
|
120
|
-
c.typeOf.object("result", o),
|
|
121
|
-
(o.x = Math.min(n.x, e.x)),
|
|
122
|
-
(o.y = Math.min(n.y, e.y)),
|
|
123
|
-
(o.z = Math.min(n.z, e.z)),
|
|
124
|
-
o
|
|
125
|
-
);
|
|
126
|
-
};
|
|
127
|
-
f.maximumByComponent = function (n, e, o) {
|
|
128
|
-
return (
|
|
129
|
-
c.typeOf.object("first", n),
|
|
130
|
-
c.typeOf.object("second", e),
|
|
131
|
-
c.typeOf.object("result", o),
|
|
132
|
-
(o.x = Math.max(n.x, e.x)),
|
|
133
|
-
(o.y = Math.max(n.y, e.y)),
|
|
134
|
-
(o.z = Math.max(n.z, e.z)),
|
|
135
|
-
o
|
|
136
|
-
);
|
|
137
|
-
};
|
|
138
|
-
f.clamp = function (n, e, o, t) {
|
|
139
|
-
(c.typeOf.object("value", n),
|
|
140
|
-
c.typeOf.object("min", e),
|
|
141
|
-
c.typeOf.object("max", o),
|
|
142
|
-
c.typeOf.object("result", t));
|
|
143
|
-
let i = w.clamp(n.x, e.x, o.x),
|
|
144
|
-
p = w.clamp(n.y, e.y, o.y),
|
|
145
|
-
d = w.clamp(n.z, e.z, o.z);
|
|
146
|
-
return ((t.x = i), (t.y = p), (t.z = d), t);
|
|
147
|
-
};
|
|
148
|
-
f.magnitudeSquared = function (n) {
|
|
149
|
-
return (c.typeOf.object("cartesian", n), n.x * n.x + n.y * n.y + n.z * n.z);
|
|
150
|
-
};
|
|
151
|
-
f.magnitude = function (n) {
|
|
152
|
-
return Math.sqrt(f.magnitudeSquared(n));
|
|
153
|
-
};
|
|
154
|
-
var G = new f();
|
|
155
|
-
f.distance = function (n, e) {
|
|
156
|
-
return (
|
|
157
|
-
c.typeOf.object("left", n),
|
|
158
|
-
c.typeOf.object("right", e),
|
|
159
|
-
f.subtract(n, e, G),
|
|
160
|
-
f.magnitude(G)
|
|
161
|
-
);
|
|
162
|
-
};
|
|
163
|
-
f.distanceSquared = function (n, e) {
|
|
164
|
-
return (
|
|
165
|
-
c.typeOf.object("left", n),
|
|
166
|
-
c.typeOf.object("right", e),
|
|
167
|
-
f.subtract(n, e, G),
|
|
168
|
-
f.magnitudeSquared(G)
|
|
169
|
-
);
|
|
170
|
-
};
|
|
171
|
-
f.normalize = function (n, e) {
|
|
172
|
-
(c.typeOf.object("cartesian", n), c.typeOf.object("result", e));
|
|
173
|
-
let o = f.magnitude(n);
|
|
174
|
-
if (
|
|
175
|
-
((e.x = n.x / o),
|
|
176
|
-
(e.y = n.y / o),
|
|
177
|
-
(e.z = n.z / o),
|
|
178
|
-
isNaN(e.x) || isNaN(e.y) || isNaN(e.z))
|
|
179
|
-
)
|
|
180
|
-
throw new S("normalized result is not a number");
|
|
181
|
-
return e;
|
|
182
|
-
};
|
|
183
|
-
f.dot = function (n, e) {
|
|
184
|
-
return (
|
|
185
|
-
c.typeOf.object("left", n),
|
|
186
|
-
c.typeOf.object("right", e),
|
|
187
|
-
n.x * e.x + n.y * e.y + n.z * e.z
|
|
188
|
-
);
|
|
189
|
-
};
|
|
190
|
-
f.multiplyComponents = function (n, e, o) {
|
|
191
|
-
return (
|
|
192
|
-
c.typeOf.object("left", n),
|
|
193
|
-
c.typeOf.object("right", e),
|
|
194
|
-
c.typeOf.object("result", o),
|
|
195
|
-
(o.x = n.x * e.x),
|
|
196
|
-
(o.y = n.y * e.y),
|
|
197
|
-
(o.z = n.z * e.z),
|
|
198
|
-
o
|
|
199
|
-
);
|
|
200
|
-
};
|
|
201
|
-
f.divideComponents = function (n, e, o) {
|
|
202
|
-
return (
|
|
203
|
-
c.typeOf.object("left", n),
|
|
204
|
-
c.typeOf.object("right", e),
|
|
205
|
-
c.typeOf.object("result", o),
|
|
206
|
-
(o.x = n.x / e.x),
|
|
207
|
-
(o.y = n.y / e.y),
|
|
208
|
-
(o.z = n.z / e.z),
|
|
209
|
-
o
|
|
210
|
-
);
|
|
211
|
-
};
|
|
212
|
-
f.add = function (n, e, o) {
|
|
213
|
-
return (
|
|
214
|
-
c.typeOf.object("left", n),
|
|
215
|
-
c.typeOf.object("right", e),
|
|
216
|
-
c.typeOf.object("result", o),
|
|
217
|
-
(o.x = n.x + e.x),
|
|
218
|
-
(o.y = n.y + e.y),
|
|
219
|
-
(o.z = n.z + e.z),
|
|
220
|
-
o
|
|
221
|
-
);
|
|
222
|
-
};
|
|
223
|
-
f.subtract = function (n, e, o) {
|
|
224
|
-
return (
|
|
225
|
-
c.typeOf.object("left", n),
|
|
226
|
-
c.typeOf.object("right", e),
|
|
227
|
-
c.typeOf.object("result", o),
|
|
228
|
-
(o.x = n.x - e.x),
|
|
229
|
-
(o.y = n.y - e.y),
|
|
230
|
-
(o.z = n.z - e.z),
|
|
231
|
-
o
|
|
232
|
-
);
|
|
233
|
-
};
|
|
234
|
-
f.multiplyByScalar = function (n, e, o) {
|
|
235
|
-
return (
|
|
236
|
-
c.typeOf.object("cartesian", n),
|
|
237
|
-
c.typeOf.number("scalar", e),
|
|
238
|
-
c.typeOf.object("result", o),
|
|
239
|
-
(o.x = n.x * e),
|
|
240
|
-
(o.y = n.y * e),
|
|
241
|
-
(o.z = n.z * e),
|
|
242
|
-
o
|
|
243
|
-
);
|
|
244
|
-
};
|
|
245
|
-
f.divideByScalar = function (n, e, o) {
|
|
246
|
-
return (
|
|
247
|
-
c.typeOf.object("cartesian", n),
|
|
248
|
-
c.typeOf.number("scalar", e),
|
|
249
|
-
c.typeOf.object("result", o),
|
|
250
|
-
(o.x = n.x / e),
|
|
251
|
-
(o.y = n.y / e),
|
|
252
|
-
(o.z = n.z / e),
|
|
253
|
-
o
|
|
254
|
-
);
|
|
255
|
-
};
|
|
256
|
-
f.negate = function (n, e) {
|
|
257
|
-
return (
|
|
258
|
-
c.typeOf.object("cartesian", n),
|
|
259
|
-
c.typeOf.object("result", e),
|
|
260
|
-
(e.x = -n.x),
|
|
261
|
-
(e.y = -n.y),
|
|
262
|
-
(e.z = -n.z),
|
|
263
|
-
e
|
|
264
|
-
);
|
|
265
|
-
};
|
|
266
|
-
f.abs = function (n, e) {
|
|
267
|
-
return (
|
|
268
|
-
c.typeOf.object("cartesian", n),
|
|
269
|
-
c.typeOf.object("result", e),
|
|
270
|
-
(e.x = Math.abs(n.x)),
|
|
271
|
-
(e.y = Math.abs(n.y)),
|
|
272
|
-
(e.z = Math.abs(n.z)),
|
|
273
|
-
e
|
|
274
|
-
);
|
|
275
|
-
};
|
|
276
|
-
var ln = new f();
|
|
277
|
-
f.lerp = function (n, e, o, t) {
|
|
278
|
-
return (
|
|
279
|
-
c.typeOf.object("start", n),
|
|
280
|
-
c.typeOf.object("end", e),
|
|
281
|
-
c.typeOf.number("t", o),
|
|
282
|
-
c.typeOf.object("result", t),
|
|
283
|
-
f.multiplyByScalar(e, o, ln),
|
|
284
|
-
(t = f.multiplyByScalar(n, 1 - o, t)),
|
|
285
|
-
f.add(ln, t, t)
|
|
286
|
-
);
|
|
287
|
-
};
|
|
288
|
-
var Y = new f(),
|
|
289
|
-
yn = new f();
|
|
290
|
-
f.angleBetween = function (n, e) {
|
|
291
|
-
(c.typeOf.object("left", n),
|
|
292
|
-
c.typeOf.object("right", e),
|
|
293
|
-
f.normalize(n, Y),
|
|
294
|
-
f.normalize(e, yn));
|
|
295
|
-
let o = f.dot(Y, yn),
|
|
296
|
-
t = f.magnitude(f.cross(Y, yn, Y));
|
|
297
|
-
return Math.atan2(t, o);
|
|
298
|
-
};
|
|
299
|
-
var Xn = new f();
|
|
300
|
-
f.mostOrthogonalAxis = function (n, e) {
|
|
301
|
-
(c.typeOf.object("cartesian", n), c.typeOf.object("result", e));
|
|
302
|
-
let o = f.normalize(n, Xn);
|
|
303
|
-
return (
|
|
304
|
-
f.abs(o, o),
|
|
305
|
-
o.x <= o.y
|
|
306
|
-
? o.x <= o.z
|
|
307
|
-
? (e = f.clone(f.UNIT_X, e))
|
|
308
|
-
: (e = f.clone(f.UNIT_Z, e))
|
|
309
|
-
: o.y <= o.z
|
|
310
|
-
? (e = f.clone(f.UNIT_Y, e))
|
|
311
|
-
: (e = f.clone(f.UNIT_Z, e)),
|
|
312
|
-
e
|
|
313
|
-
);
|
|
314
|
-
};
|
|
315
|
-
f.projectVector = function (n, e, o) {
|
|
316
|
-
(c.defined("a", n), c.defined("b", e), c.defined("result", o));
|
|
317
|
-
let t = f.dot(n, e) / f.dot(e, e);
|
|
318
|
-
return f.multiplyByScalar(e, t, o);
|
|
319
|
-
};
|
|
320
|
-
f.equals = function (n, e) {
|
|
321
|
-
return n === e || (u(n) && u(e) && n.x === e.x && n.y === e.y && n.z === e.z);
|
|
322
|
-
};
|
|
323
|
-
f.equalsArray = function (n, e, o) {
|
|
324
|
-
return n.x === e[o] && n.y === e[o + 1] && n.z === e[o + 2];
|
|
325
|
-
};
|
|
326
|
-
f.equalsEpsilon = function (n, e, o, t) {
|
|
327
|
-
return (
|
|
328
|
-
n === e ||
|
|
329
|
-
(u(n) &&
|
|
330
|
-
u(e) &&
|
|
331
|
-
w.equalsEpsilon(n.x, e.x, o, t) &&
|
|
332
|
-
w.equalsEpsilon(n.y, e.y, o, t) &&
|
|
333
|
-
w.equalsEpsilon(n.z, e.z, o, t))
|
|
334
|
-
);
|
|
335
|
-
};
|
|
336
|
-
f.cross = function (n, e, o) {
|
|
337
|
-
(c.typeOf.object("left", n),
|
|
338
|
-
c.typeOf.object("right", e),
|
|
339
|
-
c.typeOf.object("result", o));
|
|
340
|
-
let t = n.x,
|
|
341
|
-
i = n.y,
|
|
342
|
-
p = n.z,
|
|
343
|
-
d = e.x,
|
|
344
|
-
m = e.y,
|
|
345
|
-
s = e.z,
|
|
346
|
-
h = i * s - p * m,
|
|
347
|
-
j = p * d - t * s,
|
|
348
|
-
z = t * m - i * d;
|
|
349
|
-
return ((o.x = h), (o.y = j), (o.z = z), o);
|
|
350
|
-
};
|
|
351
|
-
f.midpoint = function (n, e, o) {
|
|
352
|
-
return (
|
|
353
|
-
c.typeOf.object("left", n),
|
|
354
|
-
c.typeOf.object("right", e),
|
|
355
|
-
c.typeOf.object("result", o),
|
|
356
|
-
(o.x = (n.x + e.x) * 0.5),
|
|
357
|
-
(o.y = (n.y + e.y) * 0.5),
|
|
358
|
-
(o.z = (n.z + e.z) * 0.5),
|
|
359
|
-
o
|
|
360
|
-
);
|
|
361
|
-
};
|
|
362
|
-
f.fromDegrees = function (n, e, o, t, i) {
|
|
363
|
-
return (
|
|
364
|
-
c.typeOf.number("longitude", n),
|
|
365
|
-
c.typeOf.number("latitude", e),
|
|
366
|
-
(n = w.toRadians(n)),
|
|
367
|
-
(e = w.toRadians(e)),
|
|
368
|
-
f.fromRadians(n, e, o, t, i)
|
|
369
|
-
);
|
|
370
|
-
};
|
|
371
|
-
var C = new f(),
|
|
372
|
-
v = new f();
|
|
373
|
-
f._ellipsoidRadiiSquared = new f(
|
|
374
|
-
6378137 * 6378137,
|
|
375
|
-
6378137 * 6378137,
|
|
376
|
-
6356752314245179e-9 * 6356752314245179e-9,
|
|
377
|
-
);
|
|
378
|
-
f.fromRadians = function (n, e, o, t, i) {
|
|
379
|
-
(c.typeOf.number("longitude", n),
|
|
380
|
-
c.typeOf.number("latitude", e),
|
|
381
|
-
(o = O(o, 0)));
|
|
382
|
-
let p = u(t) ? t.radiiSquared : f._ellipsoidRadiiSquared,
|
|
383
|
-
d = Math.cos(e);
|
|
384
|
-
((C.x = d * Math.cos(n)),
|
|
385
|
-
(C.y = d * Math.sin(n)),
|
|
386
|
-
(C.z = Math.sin(e)),
|
|
387
|
-
(C = f.normalize(C, C)),
|
|
388
|
-
f.multiplyComponents(p, C, v));
|
|
389
|
-
let m = Math.sqrt(f.dot(C, v));
|
|
390
|
-
return (
|
|
391
|
-
(v = f.divideByScalar(v, m, v)),
|
|
392
|
-
(C = f.multiplyByScalar(C, o, C)),
|
|
393
|
-
u(i) || (i = new f()),
|
|
394
|
-
f.add(v, C, i)
|
|
395
|
-
);
|
|
396
|
-
};
|
|
397
|
-
f.fromDegreesArray = function (n, e, o) {
|
|
398
|
-
if ((c.defined("coordinates", n), n.length < 2 || n.length % 2 !== 0))
|
|
399
|
-
throw new S(
|
|
400
|
-
"the number of coordinates must be a multiple of 2 and at least 2",
|
|
401
|
-
);
|
|
402
|
-
let t = n.length;
|
|
403
|
-
u(o) ? (o.length = t / 2) : (o = new Array(t / 2));
|
|
404
|
-
for (let i = 0; i < t; i += 2) {
|
|
405
|
-
let p = n[i],
|
|
406
|
-
d = n[i + 1],
|
|
407
|
-
m = i / 2;
|
|
408
|
-
o[m] = f.fromDegrees(p, d, 0, e, o[m]);
|
|
409
|
-
}
|
|
410
|
-
return o;
|
|
411
|
-
};
|
|
412
|
-
f.fromRadiansArray = function (n, e, o) {
|
|
413
|
-
if ((c.defined("coordinates", n), n.length < 2 || n.length % 2 !== 0))
|
|
414
|
-
throw new S(
|
|
415
|
-
"the number of coordinates must be a multiple of 2 and at least 2",
|
|
416
|
-
);
|
|
417
|
-
let t = n.length;
|
|
418
|
-
u(o) ? (o.length = t / 2) : (o = new Array(t / 2));
|
|
419
|
-
for (let i = 0; i < t; i += 2) {
|
|
420
|
-
let p = n[i],
|
|
421
|
-
d = n[i + 1],
|
|
422
|
-
m = i / 2;
|
|
423
|
-
o[m] = f.fromRadians(p, d, 0, e, o[m]);
|
|
424
|
-
}
|
|
425
|
-
return o;
|
|
426
|
-
};
|
|
427
|
-
f.fromDegreesArrayHeights = function (n, e, o) {
|
|
428
|
-
if ((c.defined("coordinates", n), n.length < 3 || n.length % 3 !== 0))
|
|
429
|
-
throw new S(
|
|
430
|
-
"the number of coordinates must be a multiple of 3 and at least 3",
|
|
431
|
-
);
|
|
432
|
-
let t = n.length;
|
|
433
|
-
u(o) ? (o.length = t / 3) : (o = new Array(t / 3));
|
|
434
|
-
for (let i = 0; i < t; i += 3) {
|
|
435
|
-
let p = n[i],
|
|
436
|
-
d = n[i + 1],
|
|
437
|
-
m = n[i + 2],
|
|
438
|
-
s = i / 3;
|
|
439
|
-
o[s] = f.fromDegrees(p, d, m, e, o[s]);
|
|
440
|
-
}
|
|
441
|
-
return o;
|
|
442
|
-
};
|
|
443
|
-
f.fromRadiansArrayHeights = function (n, e, o) {
|
|
444
|
-
if ((c.defined("coordinates", n), n.length < 3 || n.length % 3 !== 0))
|
|
445
|
-
throw new S(
|
|
446
|
-
"the number of coordinates must be a multiple of 3 and at least 3",
|
|
447
|
-
);
|
|
448
|
-
let t = n.length;
|
|
449
|
-
u(o) ? (o.length = t / 3) : (o = new Array(t / 3));
|
|
450
|
-
for (let i = 0; i < t; i += 3) {
|
|
451
|
-
let p = n[i],
|
|
452
|
-
d = n[i + 1],
|
|
453
|
-
m = n[i + 2],
|
|
454
|
-
s = i / 3;
|
|
455
|
-
o[s] = f.fromRadians(p, d, m, e, o[s]);
|
|
456
|
-
}
|
|
457
|
-
return o;
|
|
458
|
-
};
|
|
459
|
-
f.ZERO = Object.freeze(new f(0, 0, 0));
|
|
460
|
-
f.ONE = Object.freeze(new f(1, 1, 1));
|
|
461
|
-
f.UNIT_X = Object.freeze(new f(1, 0, 0));
|
|
462
|
-
f.UNIT_Y = Object.freeze(new f(0, 1, 0));
|
|
463
|
-
f.UNIT_Z = Object.freeze(new f(0, 0, 1));
|
|
464
|
-
f.prototype.clone = function (n) {
|
|
465
|
-
return f.clone(this, n);
|
|
466
|
-
};
|
|
467
|
-
f.prototype.equals = function (n) {
|
|
468
|
-
return f.equals(this, n);
|
|
469
|
-
};
|
|
470
|
-
f.prototype.equalsEpsilon = function (n, e, o) {
|
|
471
|
-
return f.equalsEpsilon(this, n, e, o);
|
|
472
|
-
};
|
|
473
|
-
f.prototype.toString = function () {
|
|
474
|
-
return `(${this.x}, ${this.y}, ${this.z})`;
|
|
475
|
-
};
|
|
476
|
-
var y = f;
|
|
477
|
-
var Yn = new y(),
|
|
478
|
-
Gn = new y();
|
|
479
|
-
function Hn(n, e, o, t, i) {
|
|
480
|
-
if (!u(n)) throw new S("cartesian is required.");
|
|
481
|
-
if (!u(e)) throw new S("oneOverRadii is required.");
|
|
482
|
-
if (!u(o)) throw new S("oneOverRadiiSquared is required.");
|
|
483
|
-
if (!u(t)) throw new S("centerToleranceSquared is required.");
|
|
484
|
-
let p = n.x,
|
|
485
|
-
d = n.y,
|
|
486
|
-
m = n.z,
|
|
487
|
-
s = e.x,
|
|
488
|
-
h = e.y,
|
|
489
|
-
j = e.z,
|
|
490
|
-
z = p * p * s * s,
|
|
491
|
-
M = d * d * h * h,
|
|
492
|
-
q = m * m * j * j,
|
|
493
|
-
N = z + M + q,
|
|
494
|
-
l = Math.sqrt(1 / N),
|
|
495
|
-
x = y.multiplyByScalar(n, l, Yn);
|
|
496
|
-
if (N < t) return isFinite(l) ? y.clone(x, i) : void 0;
|
|
497
|
-
let U = o.x,
|
|
498
|
-
I = o.y,
|
|
499
|
-
P = o.z,
|
|
500
|
-
k = Gn;
|
|
501
|
-
((k.x = x.x * U * 2), (k.y = x.y * I * 2), (k.z = x.z * P * 2));
|
|
502
|
-
let X = ((1 - l) * y.magnitude(n)) / (0.5 * y.magnitude(k)),
|
|
503
|
-
Mn = 0,
|
|
504
|
-
pn,
|
|
505
|
-
qn,
|
|
506
|
-
L,
|
|
507
|
-
V,
|
|
508
|
-
W,
|
|
509
|
-
un,
|
|
510
|
-
an,
|
|
511
|
-
dn,
|
|
512
|
-
En,
|
|
513
|
-
An,
|
|
514
|
-
_n;
|
|
515
|
-
do {
|
|
516
|
-
((X -= Mn),
|
|
517
|
-
(L = 1 / (1 + X * U)),
|
|
518
|
-
(V = 1 / (1 + X * I)),
|
|
519
|
-
(W = 1 / (1 + X * P)),
|
|
520
|
-
(un = L * L),
|
|
521
|
-
(an = V * V),
|
|
522
|
-
(dn = W * W),
|
|
523
|
-
(En = un * L),
|
|
524
|
-
(An = an * V),
|
|
525
|
-
(_n = dn * W),
|
|
526
|
-
(pn = z * un + M * an + q * dn - 1),
|
|
527
|
-
(qn = z * En * U + M * An * I + q * _n * P));
|
|
528
|
-
let Zn = -2 * qn;
|
|
529
|
-
Mn = pn / Zn;
|
|
530
|
-
} while (Math.abs(pn) > w.EPSILON12);
|
|
531
|
-
return u(i)
|
|
532
|
-
? ((i.x = p * L), (i.y = d * V), (i.z = m * W), i)
|
|
533
|
-
: new y(p * L, d * V, m * W);
|
|
534
|
-
}
|
|
535
|
-
var H = Hn;
|
|
536
|
-
function g(n, e, o) {
|
|
537
|
-
((this.longitude = O(n, 0)),
|
|
538
|
-
(this.latitude = O(e, 0)),
|
|
539
|
-
(this.height = O(o, 0)));
|
|
540
|
-
}
|
|
541
|
-
g.fromRadians = function (n, e, o, t) {
|
|
542
|
-
return (
|
|
543
|
-
c.typeOf.number("longitude", n),
|
|
544
|
-
c.typeOf.number("latitude", e),
|
|
545
|
-
(o = O(o, 0)),
|
|
546
|
-
u(t)
|
|
547
|
-
? ((t.longitude = n), (t.latitude = e), (t.height = o), t)
|
|
548
|
-
: new g(n, e, o)
|
|
549
|
-
);
|
|
550
|
-
};
|
|
551
|
-
g.fromDegrees = function (n, e, o, t) {
|
|
552
|
-
return (
|
|
553
|
-
c.typeOf.number("longitude", n),
|
|
554
|
-
c.typeOf.number("latitude", e),
|
|
555
|
-
(n = w.toRadians(n)),
|
|
556
|
-
(e = w.toRadians(e)),
|
|
557
|
-
g.fromRadians(n, e, o, t)
|
|
558
|
-
);
|
|
559
|
-
};
|
|
560
|
-
var Qn = new y(),
|
|
561
|
-
Kn = new y(),
|
|
562
|
-
Jn = new y();
|
|
563
|
-
g._ellipsoidOneOverRadii = new y(
|
|
564
|
-
1 / 6378137,
|
|
565
|
-
1 / 6378137,
|
|
566
|
-
1 / 6356752314245179e-9,
|
|
567
|
-
);
|
|
568
|
-
g._ellipsoidOneOverRadiiSquared = new y(
|
|
569
|
-
1 / (6378137 * 6378137),
|
|
570
|
-
1 / (6378137 * 6378137),
|
|
571
|
-
1 / (6356752314245179e-9 * 6356752314245179e-9),
|
|
572
|
-
);
|
|
573
|
-
g._ellipsoidCenterToleranceSquared = w.EPSILON1;
|
|
574
|
-
g.fromCartesian = function (n, e, o) {
|
|
575
|
-
let t = u(e) ? e.oneOverRadii : g._ellipsoidOneOverRadii,
|
|
576
|
-
i = u(e) ? e.oneOverRadiiSquared : g._ellipsoidOneOverRadiiSquared,
|
|
577
|
-
p = u(e) ? e._centerToleranceSquared : g._ellipsoidCenterToleranceSquared,
|
|
578
|
-
d = H(n, t, i, p, Kn);
|
|
579
|
-
if (!u(d)) return;
|
|
580
|
-
let m = y.multiplyComponents(d, i, Qn);
|
|
581
|
-
m = y.normalize(m, m);
|
|
582
|
-
let s = y.subtract(n, d, Jn),
|
|
583
|
-
h = Math.atan2(m.y, m.x),
|
|
584
|
-
j = Math.asin(m.z),
|
|
585
|
-
z = w.sign(y.dot(s, n)) * y.magnitude(s);
|
|
586
|
-
return u(o)
|
|
587
|
-
? ((o.longitude = h), (o.latitude = j), (o.height = z), o)
|
|
588
|
-
: new g(h, j, z);
|
|
589
|
-
};
|
|
590
|
-
g.toCartesian = function (n, e, o) {
|
|
591
|
-
return (
|
|
592
|
-
c.defined("cartographic", n),
|
|
593
|
-
y.fromRadians(n.longitude, n.latitude, n.height, e, o)
|
|
594
|
-
);
|
|
595
|
-
};
|
|
596
|
-
g.clone = function (n, e) {
|
|
597
|
-
if (u(n))
|
|
598
|
-
return u(e)
|
|
599
|
-
? ((e.longitude = n.longitude),
|
|
600
|
-
(e.latitude = n.latitude),
|
|
601
|
-
(e.height = n.height),
|
|
602
|
-
e)
|
|
603
|
-
: new g(n.longitude, n.latitude, n.height);
|
|
604
|
-
};
|
|
605
|
-
g.equals = function (n, e) {
|
|
606
|
-
return (
|
|
607
|
-
n === e ||
|
|
608
|
-
(u(n) &&
|
|
609
|
-
u(e) &&
|
|
610
|
-
n.longitude === e.longitude &&
|
|
611
|
-
n.latitude === e.latitude &&
|
|
612
|
-
n.height === e.height)
|
|
613
|
-
);
|
|
614
|
-
};
|
|
615
|
-
g.equalsEpsilon = function (n, e, o) {
|
|
616
|
-
return (
|
|
617
|
-
(o = O(o, 0)),
|
|
618
|
-
n === e ||
|
|
619
|
-
(u(n) &&
|
|
620
|
-
u(e) &&
|
|
621
|
-
Math.abs(n.longitude - e.longitude) <= o &&
|
|
622
|
-
Math.abs(n.latitude - e.latitude) <= o &&
|
|
623
|
-
Math.abs(n.height - e.height) <= o)
|
|
624
|
-
);
|
|
625
|
-
};
|
|
626
|
-
g.ZERO = Object.freeze(new g(0, 0, 0));
|
|
627
|
-
g.prototype.clone = function (n) {
|
|
628
|
-
return g.clone(this, n);
|
|
629
|
-
};
|
|
630
|
-
g.prototype.equals = function (n) {
|
|
631
|
-
return g.equals(this, n);
|
|
632
|
-
};
|
|
633
|
-
g.prototype.equalsEpsilon = function (n, e) {
|
|
634
|
-
return g.equalsEpsilon(this, n, e);
|
|
635
|
-
};
|
|
636
|
-
g.prototype.toString = function () {
|
|
637
|
-
return `(${this.longitude}, ${this.latitude}, ${this.height})`;
|
|
638
|
-
};
|
|
639
|
-
var D = g;
|
|
640
|
-
function a(n, e) {
|
|
641
|
-
((this.x = O(n, 0)), (this.y = O(e, 0)));
|
|
642
|
-
}
|
|
643
|
-
a.fromElements = function (n, e, o) {
|
|
644
|
-
return u(o) ? ((o.x = n), (o.y = e), o) : new a(n, e);
|
|
645
|
-
};
|
|
646
|
-
a.clone = function (n, e) {
|
|
647
|
-
if (u(n)) return u(e) ? ((e.x = n.x), (e.y = n.y), e) : new a(n.x, n.y);
|
|
648
|
-
};
|
|
649
|
-
a.fromCartesian3 = a.clone;
|
|
650
|
-
a.fromCartesian4 = a.clone;
|
|
651
|
-
a.packedLength = 2;
|
|
652
|
-
a.pack = function (n, e, o) {
|
|
653
|
-
return (
|
|
654
|
-
c.typeOf.object("value", n),
|
|
655
|
-
c.defined("array", e),
|
|
656
|
-
(o = O(o, 0)),
|
|
657
|
-
(e[o++] = n.x),
|
|
658
|
-
(e[o] = n.y),
|
|
659
|
-
e
|
|
660
|
-
);
|
|
661
|
-
};
|
|
662
|
-
a.unpack = function (n, e, o) {
|
|
663
|
-
return (
|
|
664
|
-
c.defined("array", n),
|
|
665
|
-
(e = O(e, 0)),
|
|
666
|
-
u(o) || (o = new a()),
|
|
667
|
-
(o.x = n[e++]),
|
|
668
|
-
(o.y = n[e]),
|
|
669
|
-
o
|
|
670
|
-
);
|
|
671
|
-
};
|
|
672
|
-
a.packArray = function (n, e) {
|
|
673
|
-
c.defined("array", n);
|
|
674
|
-
let o = n.length,
|
|
675
|
-
t = o * 2;
|
|
676
|
-
if (!u(e)) e = new Array(t);
|
|
677
|
-
else {
|
|
678
|
-
if (!Array.isArray(e) && e.length !== t)
|
|
679
|
-
throw new S(
|
|
680
|
-
"If result is a typed array, it must have exactly array.length * 2 elements",
|
|
681
|
-
);
|
|
682
|
-
e.length !== t && (e.length = t);
|
|
683
|
-
}
|
|
684
|
-
for (let i = 0; i < o; ++i) a.pack(n[i], e, i * 2);
|
|
685
|
-
return e;
|
|
686
|
-
};
|
|
687
|
-
a.unpackArray = function (n, e) {
|
|
688
|
-
if (
|
|
689
|
-
(c.defined("array", n),
|
|
690
|
-
c.typeOf.number.greaterThanOrEquals("array.length", n.length, 2),
|
|
691
|
-
n.length % 2 !== 0)
|
|
692
|
-
)
|
|
693
|
-
throw new S("array length must be a multiple of 2.");
|
|
694
|
-
let o = n.length;
|
|
695
|
-
u(e) ? (e.length = o / 2) : (e = new Array(o / 2));
|
|
696
|
-
for (let t = 0; t < o; t += 2) {
|
|
697
|
-
let i = t / 2;
|
|
698
|
-
e[i] = a.unpack(n, t, e[i]);
|
|
699
|
-
}
|
|
700
|
-
return e;
|
|
701
|
-
};
|
|
702
|
-
a.fromArray = a.unpack;
|
|
703
|
-
a.maximumComponent = function (n) {
|
|
704
|
-
return (c.typeOf.object("cartesian", n), Math.max(n.x, n.y));
|
|
705
|
-
};
|
|
706
|
-
a.minimumComponent = function (n) {
|
|
707
|
-
return (c.typeOf.object("cartesian", n), Math.min(n.x, n.y));
|
|
708
|
-
};
|
|
709
|
-
a.minimumByComponent = function (n, e, o) {
|
|
710
|
-
return (
|
|
711
|
-
c.typeOf.object("first", n),
|
|
712
|
-
c.typeOf.object("second", e),
|
|
713
|
-
c.typeOf.object("result", o),
|
|
714
|
-
(o.x = Math.min(n.x, e.x)),
|
|
715
|
-
(o.y = Math.min(n.y, e.y)),
|
|
716
|
-
o
|
|
717
|
-
);
|
|
718
|
-
};
|
|
719
|
-
a.maximumByComponent = function (n, e, o) {
|
|
720
|
-
return (
|
|
721
|
-
c.typeOf.object("first", n),
|
|
722
|
-
c.typeOf.object("second", e),
|
|
723
|
-
c.typeOf.object("result", o),
|
|
724
|
-
(o.x = Math.max(n.x, e.x)),
|
|
725
|
-
(o.y = Math.max(n.y, e.y)),
|
|
726
|
-
o
|
|
727
|
-
);
|
|
728
|
-
};
|
|
729
|
-
a.clamp = function (n, e, o, t) {
|
|
730
|
-
(c.typeOf.object("value", n),
|
|
731
|
-
c.typeOf.object("min", e),
|
|
732
|
-
c.typeOf.object("max", o),
|
|
733
|
-
c.typeOf.object("result", t));
|
|
734
|
-
let i = w.clamp(n.x, e.x, o.x),
|
|
735
|
-
p = w.clamp(n.y, e.y, o.y);
|
|
736
|
-
return ((t.x = i), (t.y = p), t);
|
|
737
|
-
};
|
|
738
|
-
a.magnitudeSquared = function (n) {
|
|
739
|
-
return (c.typeOf.object("cartesian", n), n.x * n.x + n.y * n.y);
|
|
740
|
-
};
|
|
741
|
-
a.magnitude = function (n) {
|
|
742
|
-
return Math.sqrt(a.magnitudeSquared(n));
|
|
743
|
-
};
|
|
744
|
-
var Q = new a();
|
|
745
|
-
a.distance = function (n, e) {
|
|
746
|
-
return (
|
|
747
|
-
c.typeOf.object("left", n),
|
|
748
|
-
c.typeOf.object("right", e),
|
|
749
|
-
a.subtract(n, e, Q),
|
|
750
|
-
a.magnitude(Q)
|
|
751
|
-
);
|
|
752
|
-
};
|
|
753
|
-
a.distanceSquared = function (n, e) {
|
|
754
|
-
return (
|
|
755
|
-
c.typeOf.object("left", n),
|
|
756
|
-
c.typeOf.object("right", e),
|
|
757
|
-
a.subtract(n, e, Q),
|
|
758
|
-
a.magnitudeSquared(Q)
|
|
759
|
-
);
|
|
760
|
-
};
|
|
761
|
-
a.normalize = function (n, e) {
|
|
762
|
-
(c.typeOf.object("cartesian", n), c.typeOf.object("result", e));
|
|
763
|
-
let o = a.magnitude(n);
|
|
764
|
-
if (((e.x = n.x / o), (e.y = n.y / o), isNaN(e.x) || isNaN(e.y)))
|
|
765
|
-
throw new S("normalized result is not a number");
|
|
766
|
-
return e;
|
|
767
|
-
};
|
|
768
|
-
a.dot = function (n, e) {
|
|
769
|
-
return (
|
|
770
|
-
c.typeOf.object("left", n),
|
|
771
|
-
c.typeOf.object("right", e),
|
|
772
|
-
n.x * e.x + n.y * e.y
|
|
773
|
-
);
|
|
774
|
-
};
|
|
775
|
-
a.cross = function (n, e) {
|
|
776
|
-
return (
|
|
777
|
-
c.typeOf.object("left", n),
|
|
778
|
-
c.typeOf.object("right", e),
|
|
779
|
-
n.x * e.y - n.y * e.x
|
|
780
|
-
);
|
|
781
|
-
};
|
|
782
|
-
a.multiplyComponents = function (n, e, o) {
|
|
783
|
-
return (
|
|
784
|
-
c.typeOf.object("left", n),
|
|
785
|
-
c.typeOf.object("right", e),
|
|
786
|
-
c.typeOf.object("result", o),
|
|
787
|
-
(o.x = n.x * e.x),
|
|
788
|
-
(o.y = n.y * e.y),
|
|
789
|
-
o
|
|
790
|
-
);
|
|
791
|
-
};
|
|
792
|
-
a.divideComponents = function (n, e, o) {
|
|
793
|
-
return (
|
|
794
|
-
c.typeOf.object("left", n),
|
|
795
|
-
c.typeOf.object("right", e),
|
|
796
|
-
c.typeOf.object("result", o),
|
|
797
|
-
(o.x = n.x / e.x),
|
|
798
|
-
(o.y = n.y / e.y),
|
|
799
|
-
o
|
|
800
|
-
);
|
|
801
|
-
};
|
|
802
|
-
a.add = function (n, e, o) {
|
|
803
|
-
return (
|
|
804
|
-
c.typeOf.object("left", n),
|
|
805
|
-
c.typeOf.object("right", e),
|
|
806
|
-
c.typeOf.object("result", o),
|
|
807
|
-
(o.x = n.x + e.x),
|
|
808
|
-
(o.y = n.y + e.y),
|
|
809
|
-
o
|
|
810
|
-
);
|
|
811
|
-
};
|
|
812
|
-
a.subtract = function (n, e, o) {
|
|
813
|
-
return (
|
|
814
|
-
c.typeOf.object("left", n),
|
|
815
|
-
c.typeOf.object("right", e),
|
|
816
|
-
c.typeOf.object("result", o),
|
|
817
|
-
(o.x = n.x - e.x),
|
|
818
|
-
(o.y = n.y - e.y),
|
|
819
|
-
o
|
|
820
|
-
);
|
|
821
|
-
};
|
|
822
|
-
a.multiplyByScalar = function (n, e, o) {
|
|
823
|
-
return (
|
|
824
|
-
c.typeOf.object("cartesian", n),
|
|
825
|
-
c.typeOf.number("scalar", e),
|
|
826
|
-
c.typeOf.object("result", o),
|
|
827
|
-
(o.x = n.x * e),
|
|
828
|
-
(o.y = n.y * e),
|
|
829
|
-
o
|
|
830
|
-
);
|
|
831
|
-
};
|
|
832
|
-
a.divideByScalar = function (n, e, o) {
|
|
833
|
-
return (
|
|
834
|
-
c.typeOf.object("cartesian", n),
|
|
835
|
-
c.typeOf.number("scalar", e),
|
|
836
|
-
c.typeOf.object("result", o),
|
|
837
|
-
(o.x = n.x / e),
|
|
838
|
-
(o.y = n.y / e),
|
|
839
|
-
o
|
|
840
|
-
);
|
|
841
|
-
};
|
|
842
|
-
a.negate = function (n, e) {
|
|
843
|
-
return (
|
|
844
|
-
c.typeOf.object("cartesian", n),
|
|
845
|
-
c.typeOf.object("result", e),
|
|
846
|
-
(e.x = -n.x),
|
|
847
|
-
(e.y = -n.y),
|
|
848
|
-
e
|
|
849
|
-
);
|
|
850
|
-
};
|
|
851
|
-
a.abs = function (n, e) {
|
|
852
|
-
return (
|
|
853
|
-
c.typeOf.object("cartesian", n),
|
|
854
|
-
c.typeOf.object("result", e),
|
|
855
|
-
(e.x = Math.abs(n.x)),
|
|
856
|
-
(e.y = Math.abs(n.y)),
|
|
857
|
-
e
|
|
858
|
-
);
|
|
859
|
-
};
|
|
860
|
-
var Cn = new a();
|
|
861
|
-
a.lerp = function (n, e, o, t) {
|
|
862
|
-
return (
|
|
863
|
-
c.typeOf.object("start", n),
|
|
864
|
-
c.typeOf.object("end", e),
|
|
865
|
-
c.typeOf.number("t", o),
|
|
866
|
-
c.typeOf.object("result", t),
|
|
867
|
-
a.multiplyByScalar(e, o, Cn),
|
|
868
|
-
(t = a.multiplyByScalar(n, 1 - o, t)),
|
|
869
|
-
a.add(Cn, t, t)
|
|
870
|
-
);
|
|
871
|
-
};
|
|
872
|
-
var Tn = new a(),
|
|
873
|
-
Nn = new a();
|
|
874
|
-
a.angleBetween = function (n, e) {
|
|
875
|
-
return (
|
|
876
|
-
c.typeOf.object("left", n),
|
|
877
|
-
c.typeOf.object("right", e),
|
|
878
|
-
a.normalize(n, Tn),
|
|
879
|
-
a.normalize(e, Nn),
|
|
880
|
-
w.acosClamped(a.dot(Tn, Nn))
|
|
881
|
-
);
|
|
882
|
-
};
|
|
883
|
-
var ne = new a();
|
|
884
|
-
a.mostOrthogonalAxis = function (n, e) {
|
|
885
|
-
(c.typeOf.object("cartesian", n), c.typeOf.object("result", e));
|
|
886
|
-
let o = a.normalize(n, ne);
|
|
887
|
-
return (
|
|
888
|
-
a.abs(o, o),
|
|
889
|
-
o.x <= o.y ? (e = a.clone(a.UNIT_X, e)) : (e = a.clone(a.UNIT_Y, e)),
|
|
890
|
-
e
|
|
891
|
-
);
|
|
892
|
-
};
|
|
893
|
-
a.equals = function (n, e) {
|
|
894
|
-
return n === e || (u(n) && u(e) && n.x === e.x && n.y === e.y);
|
|
895
|
-
};
|
|
896
|
-
a.equalsArray = function (n, e, o) {
|
|
897
|
-
return n.x === e[o] && n.y === e[o + 1];
|
|
898
|
-
};
|
|
899
|
-
a.equalsEpsilon = function (n, e, o, t) {
|
|
900
|
-
return (
|
|
901
|
-
n === e ||
|
|
902
|
-
(u(n) &&
|
|
903
|
-
u(e) &&
|
|
904
|
-
w.equalsEpsilon(n.x, e.x, o, t) &&
|
|
905
|
-
w.equalsEpsilon(n.y, e.y, o, t))
|
|
906
|
-
);
|
|
907
|
-
};
|
|
908
|
-
a.ZERO = Object.freeze(new a(0, 0));
|
|
909
|
-
a.ONE = Object.freeze(new a(1, 1));
|
|
910
|
-
a.UNIT_X = Object.freeze(new a(1, 0));
|
|
911
|
-
a.UNIT_Y = Object.freeze(new a(0, 1));
|
|
912
|
-
a.prototype.clone = function (n) {
|
|
913
|
-
return a.clone(this, n);
|
|
914
|
-
};
|
|
915
|
-
a.prototype.equals = function (n) {
|
|
916
|
-
return a.equals(this, n);
|
|
917
|
-
};
|
|
918
|
-
a.prototype.equalsEpsilon = function (n, e, o) {
|
|
919
|
-
return a.equalsEpsilon(this, n, e, o);
|
|
920
|
-
};
|
|
921
|
-
a.prototype.toString = function () {
|
|
922
|
-
return `(${this.x}, ${this.y})`;
|
|
923
|
-
};
|
|
924
|
-
var mn = a;
|
|
925
|
-
function Fn(n, e, o, t) {
|
|
926
|
-
((e = O(e, 0)),
|
|
927
|
-
(o = O(o, 0)),
|
|
928
|
-
(t = O(t, 0)),
|
|
929
|
-
c.typeOf.number.greaterThanOrEquals("x", e, 0),
|
|
930
|
-
c.typeOf.number.greaterThanOrEquals("y", o, 0),
|
|
931
|
-
c.typeOf.number.greaterThanOrEquals("z", t, 0),
|
|
932
|
-
(n._radii = new y(e, o, t)),
|
|
933
|
-
(n._radiiSquared = new y(e * e, o * o, t * t)),
|
|
934
|
-
(n._radiiToTheFourth = new y(e * e * e * e, o * o * o * o, t * t * t * t)),
|
|
935
|
-
(n._oneOverRadii = new y(
|
|
936
|
-
e === 0 ? 0 : 1 / e,
|
|
937
|
-
o === 0 ? 0 : 1 / o,
|
|
938
|
-
t === 0 ? 0 : 1 / t,
|
|
939
|
-
)),
|
|
940
|
-
(n._oneOverRadiiSquared = new y(
|
|
941
|
-
e === 0 ? 0 : 1 / (e * e),
|
|
942
|
-
o === 0 ? 0 : 1 / (o * o),
|
|
943
|
-
t === 0 ? 0 : 1 / (t * t),
|
|
944
|
-
)),
|
|
945
|
-
(n._minimumRadius = Math.min(e, o, t)),
|
|
946
|
-
(n._maximumRadius = Math.max(e, o, t)),
|
|
947
|
-
(n._centerToleranceSquared = w.EPSILON1),
|
|
948
|
-
n._radiiSquared.z !== 0 &&
|
|
949
|
-
(n._squaredXOverSquaredZ = n._radiiSquared.x / n._radiiSquared.z));
|
|
950
|
-
}
|
|
951
|
-
function b(n, e, o) {
|
|
952
|
-
((this._radii = void 0),
|
|
953
|
-
(this._radiiSquared = void 0),
|
|
954
|
-
(this._radiiToTheFourth = void 0),
|
|
955
|
-
(this._oneOverRadii = void 0),
|
|
956
|
-
(this._oneOverRadiiSquared = void 0),
|
|
957
|
-
(this._minimumRadius = void 0),
|
|
958
|
-
(this._maximumRadius = void 0),
|
|
959
|
-
(this._centerToleranceSquared = void 0),
|
|
960
|
-
(this._squaredXOverSquaredZ = void 0),
|
|
961
|
-
Fn(this, n, e, o));
|
|
962
|
-
}
|
|
963
|
-
Object.defineProperties(b.prototype, {
|
|
964
|
-
radii: {
|
|
965
|
-
get: function () {
|
|
966
|
-
return this._radii;
|
|
967
|
-
},
|
|
968
|
-
},
|
|
969
|
-
radiiSquared: {
|
|
970
|
-
get: function () {
|
|
971
|
-
return this._radiiSquared;
|
|
972
|
-
},
|
|
973
|
-
},
|
|
974
|
-
radiiToTheFourth: {
|
|
975
|
-
get: function () {
|
|
976
|
-
return this._radiiToTheFourth;
|
|
977
|
-
},
|
|
978
|
-
},
|
|
979
|
-
oneOverRadii: {
|
|
980
|
-
get: function () {
|
|
981
|
-
return this._oneOverRadii;
|
|
982
|
-
},
|
|
983
|
-
},
|
|
984
|
-
oneOverRadiiSquared: {
|
|
985
|
-
get: function () {
|
|
986
|
-
return this._oneOverRadiiSquared;
|
|
987
|
-
},
|
|
988
|
-
},
|
|
989
|
-
minimumRadius: {
|
|
990
|
-
get: function () {
|
|
991
|
-
return this._minimumRadius;
|
|
992
|
-
},
|
|
993
|
-
},
|
|
994
|
-
maximumRadius: {
|
|
995
|
-
get: function () {
|
|
996
|
-
return this._maximumRadius;
|
|
997
|
-
},
|
|
998
|
-
},
|
|
999
|
-
});
|
|
1000
|
-
b.clone = function (n, e) {
|
|
1001
|
-
if (!u(n)) return;
|
|
1002
|
-
let o = n._radii;
|
|
1003
|
-
return u(e)
|
|
1004
|
-
? (y.clone(o, e._radii),
|
|
1005
|
-
y.clone(n._radiiSquared, e._radiiSquared),
|
|
1006
|
-
y.clone(n._radiiToTheFourth, e._radiiToTheFourth),
|
|
1007
|
-
y.clone(n._oneOverRadii, e._oneOverRadii),
|
|
1008
|
-
y.clone(n._oneOverRadiiSquared, e._oneOverRadiiSquared),
|
|
1009
|
-
(e._minimumRadius = n._minimumRadius),
|
|
1010
|
-
(e._maximumRadius = n._maximumRadius),
|
|
1011
|
-
(e._centerToleranceSquared = n._centerToleranceSquared),
|
|
1012
|
-
e)
|
|
1013
|
-
: new b(o.x, o.y, o.z);
|
|
1014
|
-
};
|
|
1015
|
-
b.fromCartesian3 = function (n, e) {
|
|
1016
|
-
return (u(e) || (e = new b()), u(n) && Fn(e, n.x, n.y, n.z), e);
|
|
1017
|
-
};
|
|
1018
|
-
b.WGS84 = Object.freeze(new b(6378137, 6378137, 6356752314245179e-9));
|
|
1019
|
-
b.UNIT_SPHERE = Object.freeze(new b(1, 1, 1));
|
|
1020
|
-
b.MOON = Object.freeze(new b(w.LUNAR_RADIUS, w.LUNAR_RADIUS, w.LUNAR_RADIUS));
|
|
1021
|
-
b._default = b.WGS84;
|
|
1022
|
-
Object.defineProperties(b, {
|
|
1023
|
-
default: {
|
|
1024
|
-
get: function () {
|
|
1025
|
-
return b._default;
|
|
1026
|
-
},
|
|
1027
|
-
set: function (n) {
|
|
1028
|
-
(c.typeOf.object("value", n),
|
|
1029
|
-
(b._default = n),
|
|
1030
|
-
(y._ellipsoidRadiiSquared = n.radiiSquared),
|
|
1031
|
-
(D._ellipsoidOneOverRadii = n.oneOverRadii),
|
|
1032
|
-
(D._ellipsoidOneOverRadiiSquared = n.oneOverRadiiSquared),
|
|
1033
|
-
(D._ellipsoidCenterToleranceSquared = n._centerToleranceSquared));
|
|
1034
|
-
},
|
|
1035
|
-
},
|
|
1036
|
-
});
|
|
1037
|
-
b.prototype.clone = function (n) {
|
|
1038
|
-
return b.clone(this, n);
|
|
1039
|
-
};
|
|
1040
|
-
b.packedLength = y.packedLength;
|
|
1041
|
-
b.pack = function (n, e, o) {
|
|
1042
|
-
return (
|
|
1043
|
-
c.typeOf.object("value", n),
|
|
1044
|
-
c.defined("array", e),
|
|
1045
|
-
(o = O(o, 0)),
|
|
1046
|
-
y.pack(n._radii, e, o),
|
|
1047
|
-
e
|
|
1048
|
-
);
|
|
1049
|
-
};
|
|
1050
|
-
b.unpack = function (n, e, o) {
|
|
1051
|
-
(c.defined("array", n), (e = O(e, 0)));
|
|
1052
|
-
let t = y.unpack(n, e);
|
|
1053
|
-
return b.fromCartesian3(t, o);
|
|
1054
|
-
};
|
|
1055
|
-
b.prototype.geocentricSurfaceNormal = y.normalize;
|
|
1056
|
-
b.prototype.geodeticSurfaceNormalCartographic = function (n, e) {
|
|
1057
|
-
c.typeOf.object("cartographic", n);
|
|
1058
|
-
let o = n.longitude,
|
|
1059
|
-
t = n.latitude,
|
|
1060
|
-
i = Math.cos(t),
|
|
1061
|
-
p = i * Math.cos(o),
|
|
1062
|
-
d = i * Math.sin(o),
|
|
1063
|
-
m = Math.sin(t);
|
|
1064
|
-
return (
|
|
1065
|
-
u(e) || (e = new y()),
|
|
1066
|
-
(e.x = p),
|
|
1067
|
-
(e.y = d),
|
|
1068
|
-
(e.z = m),
|
|
1069
|
-
y.normalize(e, e)
|
|
1070
|
-
);
|
|
1071
|
-
};
|
|
1072
|
-
b.prototype.geodeticSurfaceNormal = function (n, e) {
|
|
1073
|
-
if ((c.typeOf.object("cartesian", n), isNaN(n.x) || isNaN(n.y) || isNaN(n.z)))
|
|
1074
|
-
throw new S("cartesian has a NaN component");
|
|
1075
|
-
if (!y.equalsEpsilon(n, y.ZERO, w.EPSILON14))
|
|
1076
|
-
return (
|
|
1077
|
-
u(e) || (e = new y()),
|
|
1078
|
-
(e = y.multiplyComponents(n, this._oneOverRadiiSquared, e)),
|
|
1079
|
-
y.normalize(e, e)
|
|
1080
|
-
);
|
|
1081
|
-
};
|
|
1082
|
-
var ee = new y(),
|
|
1083
|
-
oe = new y();
|
|
1084
|
-
b.prototype.cartographicToCartesian = function (n, e) {
|
|
1085
|
-
let o = ee,
|
|
1086
|
-
t = oe;
|
|
1087
|
-
(this.geodeticSurfaceNormalCartographic(n, o),
|
|
1088
|
-
y.multiplyComponents(this._radiiSquared, o, t));
|
|
1089
|
-
let i = Math.sqrt(y.dot(o, t));
|
|
1090
|
-
return (
|
|
1091
|
-
y.divideByScalar(t, i, t),
|
|
1092
|
-
y.multiplyByScalar(o, n.height, o),
|
|
1093
|
-
u(e) || (e = new y()),
|
|
1094
|
-
y.add(t, o, e)
|
|
1095
|
-
);
|
|
1096
|
-
};
|
|
1097
|
-
b.prototype.cartographicArrayToCartesianArray = function (n, e) {
|
|
1098
|
-
c.defined("cartographics", n);
|
|
1099
|
-
let o = n.length;
|
|
1100
|
-
u(e) ? (e.length = o) : (e = new Array(o));
|
|
1101
|
-
for (let t = 0; t < o; t++) e[t] = this.cartographicToCartesian(n[t], e[t]);
|
|
1102
|
-
return e;
|
|
1103
|
-
};
|
|
1104
|
-
var te = new y(),
|
|
1105
|
-
ce = new y(),
|
|
1106
|
-
ie = new y();
|
|
1107
|
-
b.prototype.cartesianToCartographic = function (n, e) {
|
|
1108
|
-
let o = this.scaleToGeodeticSurface(n, ce);
|
|
1109
|
-
if (!u(o)) return;
|
|
1110
|
-
let t = this.geodeticSurfaceNormal(o, te),
|
|
1111
|
-
i = y.subtract(n, o, ie),
|
|
1112
|
-
p = Math.atan2(t.y, t.x),
|
|
1113
|
-
d = Math.asin(t.z),
|
|
1114
|
-
m = w.sign(y.dot(i, n)) * y.magnitude(i);
|
|
1115
|
-
return u(e)
|
|
1116
|
-
? ((e.longitude = p), (e.latitude = d), (e.height = m), e)
|
|
1117
|
-
: new D(p, d, m);
|
|
1118
|
-
};
|
|
1119
|
-
b.prototype.cartesianArrayToCartographicArray = function (n, e) {
|
|
1120
|
-
c.defined("cartesians", n);
|
|
1121
|
-
let o = n.length;
|
|
1122
|
-
u(e) ? (e.length = o) : (e = new Array(o));
|
|
1123
|
-
for (let t = 0; t < o; ++t) e[t] = this.cartesianToCartographic(n[t], e[t]);
|
|
1124
|
-
return e;
|
|
1125
|
-
};
|
|
1126
|
-
b.prototype.scaleToGeodeticSurface = function (n, e) {
|
|
1127
|
-
return H(
|
|
1128
|
-
n,
|
|
1129
|
-
this._oneOverRadii,
|
|
1130
|
-
this._oneOverRadiiSquared,
|
|
1131
|
-
this._centerToleranceSquared,
|
|
1132
|
-
e,
|
|
1133
|
-
);
|
|
1134
|
-
};
|
|
1135
|
-
b.prototype.scaleToGeocentricSurface = function (n, e) {
|
|
1136
|
-
(c.typeOf.object("cartesian", n), u(e) || (e = new y()));
|
|
1137
|
-
let o = n.x,
|
|
1138
|
-
t = n.y,
|
|
1139
|
-
i = n.z,
|
|
1140
|
-
p = this._oneOverRadiiSquared,
|
|
1141
|
-
d = 1 / Math.sqrt(o * o * p.x + t * t * p.y + i * i * p.z);
|
|
1142
|
-
return y.multiplyByScalar(n, d, e);
|
|
1143
|
-
};
|
|
1144
|
-
b.prototype.transformPositionToScaledSpace = function (n, e) {
|
|
1145
|
-
return (
|
|
1146
|
-
u(e) || (e = new y()),
|
|
1147
|
-
y.multiplyComponents(n, this._oneOverRadii, e)
|
|
1148
|
-
);
|
|
1149
|
-
};
|
|
1150
|
-
b.prototype.transformPositionFromScaledSpace = function (n, e) {
|
|
1151
|
-
return (u(e) || (e = new y()), y.multiplyComponents(n, this._radii, e));
|
|
1152
|
-
};
|
|
1153
|
-
b.prototype.equals = function (n) {
|
|
1154
|
-
return this === n || (u(n) && y.equals(this._radii, n._radii));
|
|
1155
|
-
};
|
|
1156
|
-
b.prototype.toString = function () {
|
|
1157
|
-
return this._radii.toString();
|
|
1158
|
-
};
|
|
1159
|
-
b.prototype.getSurfaceNormalIntersectionWithZAxis = function (n, e, o) {
|
|
1160
|
-
if (
|
|
1161
|
-
(c.typeOf.object("position", n),
|
|
1162
|
-
!w.equalsEpsilon(this._radii.x, this._radii.y, w.EPSILON15))
|
|
1163
|
-
)
|
|
1164
|
-
throw new S(
|
|
1165
|
-
"Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)",
|
|
1166
|
-
);
|
|
1167
|
-
(c.typeOf.number.greaterThan("Ellipsoid.radii.z", this._radii.z, 0),
|
|
1168
|
-
(e = O(e, 0)));
|
|
1169
|
-
let t = this._squaredXOverSquaredZ;
|
|
1170
|
-
if (
|
|
1171
|
-
(u(o) || (o = new y()),
|
|
1172
|
-
(o.x = 0),
|
|
1173
|
-
(o.y = 0),
|
|
1174
|
-
(o.z = n.z * (1 - t)),
|
|
1175
|
-
!(Math.abs(o.z) >= this._radii.z - e))
|
|
1176
|
-
)
|
|
1177
|
-
return o;
|
|
1178
|
-
};
|
|
1179
|
-
var fe = new y();
|
|
1180
|
-
b.prototype.getLocalCurvature = function (n, e) {
|
|
1181
|
-
(c.typeOf.object("surfacePosition", n), u(e) || (e = new mn()));
|
|
1182
|
-
let o = this.getSurfaceNormalIntersectionWithZAxis(n, 0, fe),
|
|
1183
|
-
t = y.distance(n, o),
|
|
1184
|
-
i = (this.minimumRadius * t) / this.maximumRadius ** 2,
|
|
1185
|
-
p = t * i ** 2;
|
|
1186
|
-
return mn.fromElements(1 / t, 1 / p, e);
|
|
1187
|
-
};
|
|
1188
|
-
var re = [
|
|
1189
|
-
0.14887433898163, 0.43339539412925, 0.67940956829902, 0.86506336668898,
|
|
1190
|
-
0.97390652851717, 0,
|
|
1191
|
-
],
|
|
1192
|
-
pe = [
|
|
1193
|
-
0.29552422471475, 0.26926671930999, 0.21908636251598, 0.14945134915058,
|
|
1194
|
-
0.066671344308684, 0,
|
|
1195
|
-
];
|
|
1196
|
-
function xn(n, e, o) {
|
|
1197
|
-
(c.typeOf.number("a", n), c.typeOf.number("b", e), c.typeOf.func("func", o));
|
|
1198
|
-
let t = 0.5 * (e + n),
|
|
1199
|
-
i = 0.5 * (e - n),
|
|
1200
|
-
p = 0;
|
|
1201
|
-
for (let d = 0; d < 5; d++) {
|
|
1202
|
-
let m = i * re[d];
|
|
1203
|
-
p += pe[d] * (o(t + m) + o(t - m));
|
|
1204
|
-
}
|
|
1205
|
-
return ((p *= i), p);
|
|
1206
|
-
}
|
|
1207
|
-
b.prototype.surfaceArea = function (n) {
|
|
1208
|
-
c.typeOf.object("rectangle", n);
|
|
1209
|
-
let e = n.west,
|
|
1210
|
-
o = n.east,
|
|
1211
|
-
t = n.south,
|
|
1212
|
-
i = n.north;
|
|
1213
|
-
for (; o < e; ) o += w.TWO_PI;
|
|
1214
|
-
let p = this._radiiSquared,
|
|
1215
|
-
d = p.x,
|
|
1216
|
-
m = p.y,
|
|
1217
|
-
s = p.z,
|
|
1218
|
-
h = d * m;
|
|
1219
|
-
return xn(t, i, function (j) {
|
|
1220
|
-
let z = Math.cos(j),
|
|
1221
|
-
M = Math.sin(j);
|
|
1222
|
-
return (
|
|
1223
|
-
Math.cos(j) *
|
|
1224
|
-
xn(e, o, function (q) {
|
|
1225
|
-
let N = Math.cos(q),
|
|
1226
|
-
l = Math.sin(q);
|
|
1227
|
-
return Math.sqrt(h * M * M + s * (m * N * N + d * l * l) * z * z);
|
|
1228
|
-
})
|
|
1229
|
-
);
|
|
1230
|
-
});
|
|
1231
|
-
};
|
|
1232
|
-
var fo = b;
|
|
1233
|
-
function r(n, e, o, t, i, p, d, m, s) {
|
|
1234
|
-
((this[0] = O(n, 0)),
|
|
1235
|
-
(this[1] = O(t, 0)),
|
|
1236
|
-
(this[2] = O(d, 0)),
|
|
1237
|
-
(this[3] = O(e, 0)),
|
|
1238
|
-
(this[4] = O(i, 0)),
|
|
1239
|
-
(this[5] = O(m, 0)),
|
|
1240
|
-
(this[6] = O(o, 0)),
|
|
1241
|
-
(this[7] = O(p, 0)),
|
|
1242
|
-
(this[8] = O(s, 0)));
|
|
1243
|
-
}
|
|
1244
|
-
r.packedLength = 9;
|
|
1245
|
-
r.pack = function (n, e, o) {
|
|
1246
|
-
return (
|
|
1247
|
-
c.typeOf.object("value", n),
|
|
1248
|
-
c.defined("array", e),
|
|
1249
|
-
(o = O(o, 0)),
|
|
1250
|
-
(e[o++] = n[0]),
|
|
1251
|
-
(e[o++] = n[1]),
|
|
1252
|
-
(e[o++] = n[2]),
|
|
1253
|
-
(e[o++] = n[3]),
|
|
1254
|
-
(e[o++] = n[4]),
|
|
1255
|
-
(e[o++] = n[5]),
|
|
1256
|
-
(e[o++] = n[6]),
|
|
1257
|
-
(e[o++] = n[7]),
|
|
1258
|
-
(e[o++] = n[8]),
|
|
1259
|
-
e
|
|
1260
|
-
);
|
|
1261
|
-
};
|
|
1262
|
-
r.unpack = function (n, e, o) {
|
|
1263
|
-
return (
|
|
1264
|
-
c.defined("array", n),
|
|
1265
|
-
(e = O(e, 0)),
|
|
1266
|
-
u(o) || (o = new r()),
|
|
1267
|
-
(o[0] = n[e++]),
|
|
1268
|
-
(o[1] = n[e++]),
|
|
1269
|
-
(o[2] = n[e++]),
|
|
1270
|
-
(o[3] = n[e++]),
|
|
1271
|
-
(o[4] = n[e++]),
|
|
1272
|
-
(o[5] = n[e++]),
|
|
1273
|
-
(o[6] = n[e++]),
|
|
1274
|
-
(o[7] = n[e++]),
|
|
1275
|
-
(o[8] = n[e++]),
|
|
1276
|
-
o
|
|
1277
|
-
);
|
|
1278
|
-
};
|
|
1279
|
-
r.packArray = function (n, e) {
|
|
1280
|
-
c.defined("array", n);
|
|
1281
|
-
let o = n.length,
|
|
1282
|
-
t = o * 9;
|
|
1283
|
-
if (!u(e)) e = new Array(t);
|
|
1284
|
-
else {
|
|
1285
|
-
if (!Array.isArray(e) && e.length !== t)
|
|
1286
|
-
throw new S(
|
|
1287
|
-
"If result is a typed array, it must have exactly array.length * 9 elements",
|
|
1288
|
-
);
|
|
1289
|
-
e.length !== t && (e.length = t);
|
|
1290
|
-
}
|
|
1291
|
-
for (let i = 0; i < o; ++i) r.pack(n[i], e, i * 9);
|
|
1292
|
-
return e;
|
|
1293
|
-
};
|
|
1294
|
-
r.unpackArray = function (n, e) {
|
|
1295
|
-
if (
|
|
1296
|
-
(c.defined("array", n),
|
|
1297
|
-
c.typeOf.number.greaterThanOrEquals("array.length", n.length, 9),
|
|
1298
|
-
n.length % 9 !== 0)
|
|
1299
|
-
)
|
|
1300
|
-
throw new S("array length must be a multiple of 9.");
|
|
1301
|
-
let o = n.length;
|
|
1302
|
-
u(e) ? (e.length = o / 9) : (e = new Array(o / 9));
|
|
1303
|
-
for (let t = 0; t < o; t += 9) {
|
|
1304
|
-
let i = t / 9;
|
|
1305
|
-
e[i] = r.unpack(n, t, e[i]);
|
|
1306
|
-
}
|
|
1307
|
-
return e;
|
|
1308
|
-
};
|
|
1309
|
-
r.clone = function (n, e) {
|
|
1310
|
-
if (u(n))
|
|
1311
|
-
return u(e)
|
|
1312
|
-
? ((e[0] = n[0]),
|
|
1313
|
-
(e[1] = n[1]),
|
|
1314
|
-
(e[2] = n[2]),
|
|
1315
|
-
(e[3] = n[3]),
|
|
1316
|
-
(e[4] = n[4]),
|
|
1317
|
-
(e[5] = n[5]),
|
|
1318
|
-
(e[6] = n[6]),
|
|
1319
|
-
(e[7] = n[7]),
|
|
1320
|
-
(e[8] = n[8]),
|
|
1321
|
-
e)
|
|
1322
|
-
: new r(n[0], n[3], n[6], n[1], n[4], n[7], n[2], n[5], n[8]);
|
|
1323
|
-
};
|
|
1324
|
-
r.fromArray = r.unpack;
|
|
1325
|
-
r.fromColumnMajorArray = function (n, e) {
|
|
1326
|
-
return (c.defined("values", n), r.clone(n, e));
|
|
1327
|
-
};
|
|
1328
|
-
r.fromRowMajorArray = function (n, e) {
|
|
1329
|
-
return (
|
|
1330
|
-
c.defined("values", n),
|
|
1331
|
-
u(e)
|
|
1332
|
-
? ((e[0] = n[0]),
|
|
1333
|
-
(e[1] = n[3]),
|
|
1334
|
-
(e[2] = n[6]),
|
|
1335
|
-
(e[3] = n[1]),
|
|
1336
|
-
(e[4] = n[4]),
|
|
1337
|
-
(e[5] = n[7]),
|
|
1338
|
-
(e[6] = n[2]),
|
|
1339
|
-
(e[7] = n[5]),
|
|
1340
|
-
(e[8] = n[8]),
|
|
1341
|
-
e)
|
|
1342
|
-
: new r(n[0], n[1], n[2], n[3], n[4], n[5], n[6], n[7], n[8])
|
|
1343
|
-
);
|
|
1344
|
-
};
|
|
1345
|
-
r.fromQuaternion = function (n, e) {
|
|
1346
|
-
c.typeOf.object("quaternion", n);
|
|
1347
|
-
let o = n.x * n.x,
|
|
1348
|
-
t = n.x * n.y,
|
|
1349
|
-
i = n.x * n.z,
|
|
1350
|
-
p = n.x * n.w,
|
|
1351
|
-
d = n.y * n.y,
|
|
1352
|
-
m = n.y * n.z,
|
|
1353
|
-
s = n.y * n.w,
|
|
1354
|
-
h = n.z * n.z,
|
|
1355
|
-
j = n.z * n.w,
|
|
1356
|
-
z = n.w * n.w,
|
|
1357
|
-
M = o - d - h + z,
|
|
1358
|
-
q = 2 * (t - j),
|
|
1359
|
-
N = 2 * (i + s),
|
|
1360
|
-
l = 2 * (t + j),
|
|
1361
|
-
x = -o + d - h + z,
|
|
1362
|
-
U = 2 * (m - p),
|
|
1363
|
-
I = 2 * (i - s),
|
|
1364
|
-
P = 2 * (m + p),
|
|
1365
|
-
k = -o - d + h + z;
|
|
1366
|
-
return u(e)
|
|
1367
|
-
? ((e[0] = M),
|
|
1368
|
-
(e[1] = l),
|
|
1369
|
-
(e[2] = I),
|
|
1370
|
-
(e[3] = q),
|
|
1371
|
-
(e[4] = x),
|
|
1372
|
-
(e[5] = P),
|
|
1373
|
-
(e[6] = N),
|
|
1374
|
-
(e[7] = U),
|
|
1375
|
-
(e[8] = k),
|
|
1376
|
-
e)
|
|
1377
|
-
: new r(M, q, N, l, x, U, I, P, k);
|
|
1378
|
-
};
|
|
1379
|
-
r.fromHeadingPitchRoll = function (n, e) {
|
|
1380
|
-
c.typeOf.object("headingPitchRoll", n);
|
|
1381
|
-
let o = Math.cos(-n.pitch),
|
|
1382
|
-
t = Math.cos(-n.heading),
|
|
1383
|
-
i = Math.cos(n.roll),
|
|
1384
|
-
p = Math.sin(-n.pitch),
|
|
1385
|
-
d = Math.sin(-n.heading),
|
|
1386
|
-
m = Math.sin(n.roll),
|
|
1387
|
-
s = o * t,
|
|
1388
|
-
h = -i * d + m * p * t,
|
|
1389
|
-
j = m * d + i * p * t,
|
|
1390
|
-
z = o * d,
|
|
1391
|
-
M = i * t + m * p * d,
|
|
1392
|
-
q = -m * t + i * p * d,
|
|
1393
|
-
N = -p,
|
|
1394
|
-
l = m * o,
|
|
1395
|
-
x = i * o;
|
|
1396
|
-
return u(e)
|
|
1397
|
-
? ((e[0] = s),
|
|
1398
|
-
(e[1] = z),
|
|
1399
|
-
(e[2] = N),
|
|
1400
|
-
(e[3] = h),
|
|
1401
|
-
(e[4] = M),
|
|
1402
|
-
(e[5] = l),
|
|
1403
|
-
(e[6] = j),
|
|
1404
|
-
(e[7] = q),
|
|
1405
|
-
(e[8] = x),
|
|
1406
|
-
e)
|
|
1407
|
-
: new r(s, h, j, z, M, q, N, l, x);
|
|
1408
|
-
};
|
|
1409
|
-
r.fromScale = function (n, e) {
|
|
1410
|
-
return (
|
|
1411
|
-
c.typeOf.object("scale", n),
|
|
1412
|
-
u(e)
|
|
1413
|
-
? ((e[0] = n.x),
|
|
1414
|
-
(e[1] = 0),
|
|
1415
|
-
(e[2] = 0),
|
|
1416
|
-
(e[3] = 0),
|
|
1417
|
-
(e[4] = n.y),
|
|
1418
|
-
(e[5] = 0),
|
|
1419
|
-
(e[6] = 0),
|
|
1420
|
-
(e[7] = 0),
|
|
1421
|
-
(e[8] = n.z),
|
|
1422
|
-
e)
|
|
1423
|
-
: new r(n.x, 0, 0, 0, n.y, 0, 0, 0, n.z)
|
|
1424
|
-
);
|
|
1425
|
-
};
|
|
1426
|
-
r.fromUniformScale = function (n, e) {
|
|
1427
|
-
return (
|
|
1428
|
-
c.typeOf.number("scale", n),
|
|
1429
|
-
u(e)
|
|
1430
|
-
? ((e[0] = n),
|
|
1431
|
-
(e[1] = 0),
|
|
1432
|
-
(e[2] = 0),
|
|
1433
|
-
(e[3] = 0),
|
|
1434
|
-
(e[4] = n),
|
|
1435
|
-
(e[5] = 0),
|
|
1436
|
-
(e[6] = 0),
|
|
1437
|
-
(e[7] = 0),
|
|
1438
|
-
(e[8] = n),
|
|
1439
|
-
e)
|
|
1440
|
-
: new r(n, 0, 0, 0, n, 0, 0, 0, n)
|
|
1441
|
-
);
|
|
1442
|
-
};
|
|
1443
|
-
r.fromCrossProduct = function (n, e) {
|
|
1444
|
-
return (
|
|
1445
|
-
c.typeOf.object("vector", n),
|
|
1446
|
-
u(e)
|
|
1447
|
-
? ((e[0] = 0),
|
|
1448
|
-
(e[1] = n.z),
|
|
1449
|
-
(e[2] = -n.y),
|
|
1450
|
-
(e[3] = -n.z),
|
|
1451
|
-
(e[4] = 0),
|
|
1452
|
-
(e[5] = n.x),
|
|
1453
|
-
(e[6] = n.y),
|
|
1454
|
-
(e[7] = -n.x),
|
|
1455
|
-
(e[8] = 0),
|
|
1456
|
-
e)
|
|
1457
|
-
: new r(0, -n.z, n.y, n.z, 0, -n.x, -n.y, n.x, 0)
|
|
1458
|
-
);
|
|
1459
|
-
};
|
|
1460
|
-
r.fromRotationX = function (n, e) {
|
|
1461
|
-
c.typeOf.number("angle", n);
|
|
1462
|
-
let o = Math.cos(n),
|
|
1463
|
-
t = Math.sin(n);
|
|
1464
|
-
return u(e)
|
|
1465
|
-
? ((e[0] = 1),
|
|
1466
|
-
(e[1] = 0),
|
|
1467
|
-
(e[2] = 0),
|
|
1468
|
-
(e[3] = 0),
|
|
1469
|
-
(e[4] = o),
|
|
1470
|
-
(e[5] = t),
|
|
1471
|
-
(e[6] = 0),
|
|
1472
|
-
(e[7] = -t),
|
|
1473
|
-
(e[8] = o),
|
|
1474
|
-
e)
|
|
1475
|
-
: new r(1, 0, 0, 0, o, -t, 0, t, o);
|
|
1476
|
-
};
|
|
1477
|
-
r.fromRotationY = function (n, e) {
|
|
1478
|
-
c.typeOf.number("angle", n);
|
|
1479
|
-
let o = Math.cos(n),
|
|
1480
|
-
t = Math.sin(n);
|
|
1481
|
-
return u(e)
|
|
1482
|
-
? ((e[0] = o),
|
|
1483
|
-
(e[1] = 0),
|
|
1484
|
-
(e[2] = -t),
|
|
1485
|
-
(e[3] = 0),
|
|
1486
|
-
(e[4] = 1),
|
|
1487
|
-
(e[5] = 0),
|
|
1488
|
-
(e[6] = t),
|
|
1489
|
-
(e[7] = 0),
|
|
1490
|
-
(e[8] = o),
|
|
1491
|
-
e)
|
|
1492
|
-
: new r(o, 0, t, 0, 1, 0, -t, 0, o);
|
|
1493
|
-
};
|
|
1494
|
-
r.fromRotationZ = function (n, e) {
|
|
1495
|
-
c.typeOf.number("angle", n);
|
|
1496
|
-
let o = Math.cos(n),
|
|
1497
|
-
t = Math.sin(n);
|
|
1498
|
-
return u(e)
|
|
1499
|
-
? ((e[0] = o),
|
|
1500
|
-
(e[1] = t),
|
|
1501
|
-
(e[2] = 0),
|
|
1502
|
-
(e[3] = -t),
|
|
1503
|
-
(e[4] = o),
|
|
1504
|
-
(e[5] = 0),
|
|
1505
|
-
(e[6] = 0),
|
|
1506
|
-
(e[7] = 0),
|
|
1507
|
-
(e[8] = 1),
|
|
1508
|
-
e)
|
|
1509
|
-
: new r(o, -t, 0, t, o, 0, 0, 0, 1);
|
|
1510
|
-
};
|
|
1511
|
-
r.toArray = function (n, e) {
|
|
1512
|
-
return (
|
|
1513
|
-
c.typeOf.object("matrix", n),
|
|
1514
|
-
u(e)
|
|
1515
|
-
? ((e[0] = n[0]),
|
|
1516
|
-
(e[1] = n[1]),
|
|
1517
|
-
(e[2] = n[2]),
|
|
1518
|
-
(e[3] = n[3]),
|
|
1519
|
-
(e[4] = n[4]),
|
|
1520
|
-
(e[5] = n[5]),
|
|
1521
|
-
(e[6] = n[6]),
|
|
1522
|
-
(e[7] = n[7]),
|
|
1523
|
-
(e[8] = n[8]),
|
|
1524
|
-
e)
|
|
1525
|
-
: [n[0], n[1], n[2], n[3], n[4], n[5], n[6], n[7], n[8]]
|
|
1526
|
-
);
|
|
1527
|
-
};
|
|
1528
|
-
r.getElementIndex = function (n, e) {
|
|
1529
|
-
return (
|
|
1530
|
-
c.typeOf.number.greaterThanOrEquals("row", e, 0),
|
|
1531
|
-
c.typeOf.number.lessThanOrEquals("row", e, 2),
|
|
1532
|
-
c.typeOf.number.greaterThanOrEquals("column", n, 0),
|
|
1533
|
-
c.typeOf.number.lessThanOrEquals("column", n, 2),
|
|
1534
|
-
n * 3 + e
|
|
1535
|
-
);
|
|
1536
|
-
};
|
|
1537
|
-
r.getColumn = function (n, e, o) {
|
|
1538
|
-
(c.typeOf.object("matrix", n),
|
|
1539
|
-
c.typeOf.number.greaterThanOrEquals("index", e, 0),
|
|
1540
|
-
c.typeOf.number.lessThanOrEquals("index", e, 2),
|
|
1541
|
-
c.typeOf.object("result", o));
|
|
1542
|
-
let t = e * 3,
|
|
1543
|
-
i = n[t],
|
|
1544
|
-
p = n[t + 1],
|
|
1545
|
-
d = n[t + 2];
|
|
1546
|
-
return ((o.x = i), (o.y = p), (o.z = d), o);
|
|
1547
|
-
};
|
|
1548
|
-
r.setColumn = function (n, e, o, t) {
|
|
1549
|
-
(c.typeOf.object("matrix", n),
|
|
1550
|
-
c.typeOf.number.greaterThanOrEquals("index", e, 0),
|
|
1551
|
-
c.typeOf.number.lessThanOrEquals("index", e, 2),
|
|
1552
|
-
c.typeOf.object("cartesian", o),
|
|
1553
|
-
c.typeOf.object("result", t),
|
|
1554
|
-
(t = r.clone(n, t)));
|
|
1555
|
-
let i = e * 3;
|
|
1556
|
-
return ((t[i] = o.x), (t[i + 1] = o.y), (t[i + 2] = o.z), t);
|
|
1557
|
-
};
|
|
1558
|
-
r.getRow = function (n, e, o) {
|
|
1559
|
-
(c.typeOf.object("matrix", n),
|
|
1560
|
-
c.typeOf.number.greaterThanOrEquals("index", e, 0),
|
|
1561
|
-
c.typeOf.number.lessThanOrEquals("index", e, 2),
|
|
1562
|
-
c.typeOf.object("result", o));
|
|
1563
|
-
let t = n[e],
|
|
1564
|
-
i = n[e + 3],
|
|
1565
|
-
p = n[e + 6];
|
|
1566
|
-
return ((o.x = t), (o.y = i), (o.z = p), o);
|
|
1567
|
-
};
|
|
1568
|
-
r.setRow = function (n, e, o, t) {
|
|
1569
|
-
return (
|
|
1570
|
-
c.typeOf.object("matrix", n),
|
|
1571
|
-
c.typeOf.number.greaterThanOrEquals("index", e, 0),
|
|
1572
|
-
c.typeOf.number.lessThanOrEquals("index", e, 2),
|
|
1573
|
-
c.typeOf.object("cartesian", o),
|
|
1574
|
-
c.typeOf.object("result", t),
|
|
1575
|
-
(t = r.clone(n, t)),
|
|
1576
|
-
(t[e] = o.x),
|
|
1577
|
-
(t[e + 3] = o.y),
|
|
1578
|
-
(t[e + 6] = o.z),
|
|
1579
|
-
t
|
|
1580
|
-
);
|
|
1581
|
-
};
|
|
1582
|
-
var ue = new y();
|
|
1583
|
-
r.setScale = function (n, e, o) {
|
|
1584
|
-
(c.typeOf.object("matrix", n),
|
|
1585
|
-
c.typeOf.object("scale", e),
|
|
1586
|
-
c.typeOf.object("result", o));
|
|
1587
|
-
let t = r.getScale(n, ue),
|
|
1588
|
-
i = e.x / t.x,
|
|
1589
|
-
p = e.y / t.y,
|
|
1590
|
-
d = e.z / t.z;
|
|
1591
|
-
return (
|
|
1592
|
-
(o[0] = n[0] * i),
|
|
1593
|
-
(o[1] = n[1] * i),
|
|
1594
|
-
(o[2] = n[2] * i),
|
|
1595
|
-
(o[3] = n[3] * p),
|
|
1596
|
-
(o[4] = n[4] * p),
|
|
1597
|
-
(o[5] = n[5] * p),
|
|
1598
|
-
(o[6] = n[6] * d),
|
|
1599
|
-
(o[7] = n[7] * d),
|
|
1600
|
-
(o[8] = n[8] * d),
|
|
1601
|
-
o
|
|
1602
|
-
);
|
|
1603
|
-
};
|
|
1604
|
-
var ae = new y();
|
|
1605
|
-
r.setUniformScale = function (n, e, o) {
|
|
1606
|
-
(c.typeOf.object("matrix", n),
|
|
1607
|
-
c.typeOf.number("scale", e),
|
|
1608
|
-
c.typeOf.object("result", o));
|
|
1609
|
-
let t = r.getScale(n, ae),
|
|
1610
|
-
i = e / t.x,
|
|
1611
|
-
p = e / t.y,
|
|
1612
|
-
d = e / t.z;
|
|
1613
|
-
return (
|
|
1614
|
-
(o[0] = n[0] * i),
|
|
1615
|
-
(o[1] = n[1] * i),
|
|
1616
|
-
(o[2] = n[2] * i),
|
|
1617
|
-
(o[3] = n[3] * p),
|
|
1618
|
-
(o[4] = n[4] * p),
|
|
1619
|
-
(o[5] = n[5] * p),
|
|
1620
|
-
(o[6] = n[6] * d),
|
|
1621
|
-
(o[7] = n[7] * d),
|
|
1622
|
-
(o[8] = n[8] * d),
|
|
1623
|
-
o
|
|
1624
|
-
);
|
|
1625
|
-
};
|
|
1626
|
-
var sn = new y();
|
|
1627
|
-
r.getScale = function (n, e) {
|
|
1628
|
-
return (
|
|
1629
|
-
c.typeOf.object("matrix", n),
|
|
1630
|
-
c.typeOf.object("result", e),
|
|
1631
|
-
(e.x = y.magnitude(y.fromElements(n[0], n[1], n[2], sn))),
|
|
1632
|
-
(e.y = y.magnitude(y.fromElements(n[3], n[4], n[5], sn))),
|
|
1633
|
-
(e.z = y.magnitude(y.fromElements(n[6], n[7], n[8], sn))),
|
|
1634
|
-
e
|
|
1635
|
-
);
|
|
1636
|
-
};
|
|
1637
|
-
var kn = new y();
|
|
1638
|
-
r.getMaximumScale = function (n) {
|
|
1639
|
-
return (r.getScale(n, kn), y.maximumComponent(kn));
|
|
1640
|
-
};
|
|
1641
|
-
var de = new y();
|
|
1642
|
-
r.setRotation = function (n, e, o) {
|
|
1643
|
-
(c.typeOf.object("matrix", n), c.typeOf.object("result", o));
|
|
1644
|
-
let t = r.getScale(n, de);
|
|
1645
|
-
return (
|
|
1646
|
-
(o[0] = e[0] * t.x),
|
|
1647
|
-
(o[1] = e[1] * t.x),
|
|
1648
|
-
(o[2] = e[2] * t.x),
|
|
1649
|
-
(o[3] = e[3] * t.y),
|
|
1650
|
-
(o[4] = e[4] * t.y),
|
|
1651
|
-
(o[5] = e[5] * t.y),
|
|
1652
|
-
(o[6] = e[6] * t.z),
|
|
1653
|
-
(o[7] = e[7] * t.z),
|
|
1654
|
-
(o[8] = e[8] * t.z),
|
|
1655
|
-
o
|
|
1656
|
-
);
|
|
1657
|
-
};
|
|
1658
|
-
var ye = new y();
|
|
1659
|
-
r.getRotation = function (n, e) {
|
|
1660
|
-
(c.typeOf.object("matrix", n), c.typeOf.object("result", e));
|
|
1661
|
-
let o = r.getScale(n, ye);
|
|
1662
|
-
return (
|
|
1663
|
-
(e[0] = n[0] / o.x),
|
|
1664
|
-
(e[1] = n[1] / o.x),
|
|
1665
|
-
(e[2] = n[2] / o.x),
|
|
1666
|
-
(e[3] = n[3] / o.y),
|
|
1667
|
-
(e[4] = n[4] / o.y),
|
|
1668
|
-
(e[5] = n[5] / o.y),
|
|
1669
|
-
(e[6] = n[6] / o.z),
|
|
1670
|
-
(e[7] = n[7] / o.z),
|
|
1671
|
-
(e[8] = n[8] / o.z),
|
|
1672
|
-
e
|
|
1673
|
-
);
|
|
1674
|
-
};
|
|
1675
|
-
r.multiply = function (n, e, o) {
|
|
1676
|
-
(c.typeOf.object("left", n),
|
|
1677
|
-
c.typeOf.object("right", e),
|
|
1678
|
-
c.typeOf.object("result", o));
|
|
1679
|
-
let t = n[0] * e[0] + n[3] * e[1] + n[6] * e[2],
|
|
1680
|
-
i = n[1] * e[0] + n[4] * e[1] + n[7] * e[2],
|
|
1681
|
-
p = n[2] * e[0] + n[5] * e[1] + n[8] * e[2],
|
|
1682
|
-
d = n[0] * e[3] + n[3] * e[4] + n[6] * e[5],
|
|
1683
|
-
m = n[1] * e[3] + n[4] * e[4] + n[7] * e[5],
|
|
1684
|
-
s = n[2] * e[3] + n[5] * e[4] + n[8] * e[5],
|
|
1685
|
-
h = n[0] * e[6] + n[3] * e[7] + n[6] * e[8],
|
|
1686
|
-
j = n[1] * e[6] + n[4] * e[7] + n[7] * e[8],
|
|
1687
|
-
z = n[2] * e[6] + n[5] * e[7] + n[8] * e[8];
|
|
1688
|
-
return (
|
|
1689
|
-
(o[0] = t),
|
|
1690
|
-
(o[1] = i),
|
|
1691
|
-
(o[2] = p),
|
|
1692
|
-
(o[3] = d),
|
|
1693
|
-
(o[4] = m),
|
|
1694
|
-
(o[5] = s),
|
|
1695
|
-
(o[6] = h),
|
|
1696
|
-
(o[7] = j),
|
|
1697
|
-
(o[8] = z),
|
|
1698
|
-
o
|
|
1699
|
-
);
|
|
1700
|
-
};
|
|
1701
|
-
r.add = function (n, e, o) {
|
|
1702
|
-
return (
|
|
1703
|
-
c.typeOf.object("left", n),
|
|
1704
|
-
c.typeOf.object("right", e),
|
|
1705
|
-
c.typeOf.object("result", o),
|
|
1706
|
-
(o[0] = n[0] + e[0]),
|
|
1707
|
-
(o[1] = n[1] + e[1]),
|
|
1708
|
-
(o[2] = n[2] + e[2]),
|
|
1709
|
-
(o[3] = n[3] + e[3]),
|
|
1710
|
-
(o[4] = n[4] + e[4]),
|
|
1711
|
-
(o[5] = n[5] + e[5]),
|
|
1712
|
-
(o[6] = n[6] + e[6]),
|
|
1713
|
-
(o[7] = n[7] + e[7]),
|
|
1714
|
-
(o[8] = n[8] + e[8]),
|
|
1715
|
-
o
|
|
1716
|
-
);
|
|
1717
|
-
};
|
|
1718
|
-
r.subtract = function (n, e, o) {
|
|
1719
|
-
return (
|
|
1720
|
-
c.typeOf.object("left", n),
|
|
1721
|
-
c.typeOf.object("right", e),
|
|
1722
|
-
c.typeOf.object("result", o),
|
|
1723
|
-
(o[0] = n[0] - e[0]),
|
|
1724
|
-
(o[1] = n[1] - e[1]),
|
|
1725
|
-
(o[2] = n[2] - e[2]),
|
|
1726
|
-
(o[3] = n[3] - e[3]),
|
|
1727
|
-
(o[4] = n[4] - e[4]),
|
|
1728
|
-
(o[5] = n[5] - e[5]),
|
|
1729
|
-
(o[6] = n[6] - e[6]),
|
|
1730
|
-
(o[7] = n[7] - e[7]),
|
|
1731
|
-
(o[8] = n[8] - e[8]),
|
|
1732
|
-
o
|
|
1733
|
-
);
|
|
1734
|
-
};
|
|
1735
|
-
r.multiplyByVector = function (n, e, o) {
|
|
1736
|
-
(c.typeOf.object("matrix", n),
|
|
1737
|
-
c.typeOf.object("cartesian", e),
|
|
1738
|
-
c.typeOf.object("result", o));
|
|
1739
|
-
let t = e.x,
|
|
1740
|
-
i = e.y,
|
|
1741
|
-
p = e.z,
|
|
1742
|
-
d = n[0] * t + n[3] * i + n[6] * p,
|
|
1743
|
-
m = n[1] * t + n[4] * i + n[7] * p,
|
|
1744
|
-
s = n[2] * t + n[5] * i + n[8] * p;
|
|
1745
|
-
return ((o.x = d), (o.y = m), (o.z = s), o);
|
|
1746
|
-
};
|
|
1747
|
-
r.multiplyByScalar = function (n, e, o) {
|
|
1748
|
-
return (
|
|
1749
|
-
c.typeOf.object("matrix", n),
|
|
1750
|
-
c.typeOf.number("scalar", e),
|
|
1751
|
-
c.typeOf.object("result", o),
|
|
1752
|
-
(o[0] = n[0] * e),
|
|
1753
|
-
(o[1] = n[1] * e),
|
|
1754
|
-
(o[2] = n[2] * e),
|
|
1755
|
-
(o[3] = n[3] * e),
|
|
1756
|
-
(o[4] = n[4] * e),
|
|
1757
|
-
(o[5] = n[5] * e),
|
|
1758
|
-
(o[6] = n[6] * e),
|
|
1759
|
-
(o[7] = n[7] * e),
|
|
1760
|
-
(o[8] = n[8] * e),
|
|
1761
|
-
o
|
|
1762
|
-
);
|
|
1763
|
-
};
|
|
1764
|
-
r.multiplyByScale = function (n, e, o) {
|
|
1765
|
-
return (
|
|
1766
|
-
c.typeOf.object("matrix", n),
|
|
1767
|
-
c.typeOf.object("scale", e),
|
|
1768
|
-
c.typeOf.object("result", o),
|
|
1769
|
-
(o[0] = n[0] * e.x),
|
|
1770
|
-
(o[1] = n[1] * e.x),
|
|
1771
|
-
(o[2] = n[2] * e.x),
|
|
1772
|
-
(o[3] = n[3] * e.y),
|
|
1773
|
-
(o[4] = n[4] * e.y),
|
|
1774
|
-
(o[5] = n[5] * e.y),
|
|
1775
|
-
(o[6] = n[6] * e.z),
|
|
1776
|
-
(o[7] = n[7] * e.z),
|
|
1777
|
-
(o[8] = n[8] * e.z),
|
|
1778
|
-
o
|
|
1779
|
-
);
|
|
1780
|
-
};
|
|
1781
|
-
r.multiplyByUniformScale = function (n, e, o) {
|
|
1782
|
-
return (
|
|
1783
|
-
c.typeOf.object("matrix", n),
|
|
1784
|
-
c.typeOf.number("scale", e),
|
|
1785
|
-
c.typeOf.object("result", o),
|
|
1786
|
-
(o[0] = n[0] * e),
|
|
1787
|
-
(o[1] = n[1] * e),
|
|
1788
|
-
(o[2] = n[2] * e),
|
|
1789
|
-
(o[3] = n[3] * e),
|
|
1790
|
-
(o[4] = n[4] * e),
|
|
1791
|
-
(o[5] = n[5] * e),
|
|
1792
|
-
(o[6] = n[6] * e),
|
|
1793
|
-
(o[7] = n[7] * e),
|
|
1794
|
-
(o[8] = n[8] * e),
|
|
1795
|
-
o
|
|
1796
|
-
);
|
|
1797
|
-
};
|
|
1798
|
-
r.negate = function (n, e) {
|
|
1799
|
-
return (
|
|
1800
|
-
c.typeOf.object("matrix", n),
|
|
1801
|
-
c.typeOf.object("result", e),
|
|
1802
|
-
(e[0] = -n[0]),
|
|
1803
|
-
(e[1] = -n[1]),
|
|
1804
|
-
(e[2] = -n[2]),
|
|
1805
|
-
(e[3] = -n[3]),
|
|
1806
|
-
(e[4] = -n[4]),
|
|
1807
|
-
(e[5] = -n[5]),
|
|
1808
|
-
(e[6] = -n[6]),
|
|
1809
|
-
(e[7] = -n[7]),
|
|
1810
|
-
(e[8] = -n[8]),
|
|
1811
|
-
e
|
|
1812
|
-
);
|
|
1813
|
-
};
|
|
1814
|
-
r.transpose = function (n, e) {
|
|
1815
|
-
(c.typeOf.object("matrix", n), c.typeOf.object("result", e));
|
|
1816
|
-
let o = n[0],
|
|
1817
|
-
t = n[3],
|
|
1818
|
-
i = n[6],
|
|
1819
|
-
p = n[1],
|
|
1820
|
-
d = n[4],
|
|
1821
|
-
m = n[7],
|
|
1822
|
-
s = n[2],
|
|
1823
|
-
h = n[5],
|
|
1824
|
-
j = n[8];
|
|
1825
|
-
return (
|
|
1826
|
-
(e[0] = o),
|
|
1827
|
-
(e[1] = t),
|
|
1828
|
-
(e[2] = i),
|
|
1829
|
-
(e[3] = p),
|
|
1830
|
-
(e[4] = d),
|
|
1831
|
-
(e[5] = m),
|
|
1832
|
-
(e[6] = s),
|
|
1833
|
-
(e[7] = h),
|
|
1834
|
-
(e[8] = j),
|
|
1835
|
-
e
|
|
1836
|
-
);
|
|
1837
|
-
};
|
|
1838
|
-
function me(n) {
|
|
1839
|
-
let e = 0;
|
|
1840
|
-
for (let o = 0; o < 9; ++o) {
|
|
1841
|
-
let t = n[o];
|
|
1842
|
-
e += t * t;
|
|
1843
|
-
}
|
|
1844
|
-
return Math.sqrt(e);
|
|
1845
|
-
}
|
|
1846
|
-
var On = [1, 0, 0],
|
|
1847
|
-
bn = [2, 2, 1];
|
|
1848
|
-
function se(n) {
|
|
1849
|
-
let e = 0;
|
|
1850
|
-
for (let o = 0; o < 3; ++o) {
|
|
1851
|
-
let t = n[r.getElementIndex(bn[o], On[o])];
|
|
1852
|
-
e += 2 * t * t;
|
|
1853
|
-
}
|
|
1854
|
-
return Math.sqrt(e);
|
|
1855
|
-
}
|
|
1856
|
-
function Oe(n, e) {
|
|
1857
|
-
let o = w.EPSILON15,
|
|
1858
|
-
t = 0,
|
|
1859
|
-
i = 1;
|
|
1860
|
-
for (let h = 0; h < 3; ++h) {
|
|
1861
|
-
let j = Math.abs(n[r.getElementIndex(bn[h], On[h])]);
|
|
1862
|
-
j > t && ((i = h), (t = j));
|
|
1863
|
-
}
|
|
1864
|
-
let p = 1,
|
|
1865
|
-
d = 0,
|
|
1866
|
-
m = On[i],
|
|
1867
|
-
s = bn[i];
|
|
1868
|
-
if (Math.abs(n[r.getElementIndex(s, m)]) > o) {
|
|
1869
|
-
let h = n[r.getElementIndex(s, s)],
|
|
1870
|
-
j = n[r.getElementIndex(m, m)],
|
|
1871
|
-
z = n[r.getElementIndex(s, m)],
|
|
1872
|
-
M = (h - j) / 2 / z,
|
|
1873
|
-
q;
|
|
1874
|
-
(M < 0
|
|
1875
|
-
? (q = -1 / (-M + Math.sqrt(1 + M * M)))
|
|
1876
|
-
: (q = 1 / (M + Math.sqrt(1 + M * M))),
|
|
1877
|
-
(p = 1 / Math.sqrt(1 + q * q)),
|
|
1878
|
-
(d = q * p));
|
|
1879
|
-
}
|
|
1880
|
-
return (
|
|
1881
|
-
(e = r.clone(r.IDENTITY, e)),
|
|
1882
|
-
(e[r.getElementIndex(m, m)] = e[r.getElementIndex(s, s)] = p),
|
|
1883
|
-
(e[r.getElementIndex(s, m)] = d),
|
|
1884
|
-
(e[r.getElementIndex(m, s)] = -d),
|
|
1885
|
-
e
|
|
1886
|
-
);
|
|
1887
|
-
}
|
|
1888
|
-
var K = new r(),
|
|
1889
|
-
Bn = new r();
|
|
1890
|
-
r.computeEigenDecomposition = function (n, e) {
|
|
1891
|
-
c.typeOf.object("matrix", n);
|
|
1892
|
-
let o = w.EPSILON20,
|
|
1893
|
-
t = 10,
|
|
1894
|
-
i = 0,
|
|
1895
|
-
p = 0;
|
|
1896
|
-
u(e) || (e = {});
|
|
1897
|
-
let d = (e.unitary = r.clone(r.IDENTITY, e.unitary)),
|
|
1898
|
-
m = (e.diagonal = r.clone(n, e.diagonal)),
|
|
1899
|
-
s = o * me(m);
|
|
1900
|
-
for (; p < t && se(m) > s; )
|
|
1901
|
-
(Oe(m, K),
|
|
1902
|
-
r.transpose(K, Bn),
|
|
1903
|
-
r.multiply(m, K, m),
|
|
1904
|
-
r.multiply(Bn, m, m),
|
|
1905
|
-
r.multiply(d, K, d),
|
|
1906
|
-
++i > 2 && (++p, (i = 0)));
|
|
1907
|
-
return e;
|
|
1908
|
-
};
|
|
1909
|
-
r.abs = function (n, e) {
|
|
1910
|
-
return (
|
|
1911
|
-
c.typeOf.object("matrix", n),
|
|
1912
|
-
c.typeOf.object("result", e),
|
|
1913
|
-
(e[0] = Math.abs(n[0])),
|
|
1914
|
-
(e[1] = Math.abs(n[1])),
|
|
1915
|
-
(e[2] = Math.abs(n[2])),
|
|
1916
|
-
(e[3] = Math.abs(n[3])),
|
|
1917
|
-
(e[4] = Math.abs(n[4])),
|
|
1918
|
-
(e[5] = Math.abs(n[5])),
|
|
1919
|
-
(e[6] = Math.abs(n[6])),
|
|
1920
|
-
(e[7] = Math.abs(n[7])),
|
|
1921
|
-
(e[8] = Math.abs(n[8])),
|
|
1922
|
-
e
|
|
1923
|
-
);
|
|
1924
|
-
};
|
|
1925
|
-
r.determinant = function (n) {
|
|
1926
|
-
c.typeOf.object("matrix", n);
|
|
1927
|
-
let e = n[0],
|
|
1928
|
-
o = n[3],
|
|
1929
|
-
t = n[6],
|
|
1930
|
-
i = n[1],
|
|
1931
|
-
p = n[4],
|
|
1932
|
-
d = n[7],
|
|
1933
|
-
m = n[2],
|
|
1934
|
-
s = n[5],
|
|
1935
|
-
h = n[8];
|
|
1936
|
-
return e * (p * h - s * d) + i * (s * t - o * h) + m * (o * d - p * t);
|
|
1937
|
-
};
|
|
1938
|
-
r.inverse = function (n, e) {
|
|
1939
|
-
(c.typeOf.object("matrix", n), c.typeOf.object("result", e));
|
|
1940
|
-
let o = n[0],
|
|
1941
|
-
t = n[1],
|
|
1942
|
-
i = n[2],
|
|
1943
|
-
p = n[3],
|
|
1944
|
-
d = n[4],
|
|
1945
|
-
m = n[5],
|
|
1946
|
-
s = n[6],
|
|
1947
|
-
h = n[7],
|
|
1948
|
-
j = n[8],
|
|
1949
|
-
z = r.determinant(n);
|
|
1950
|
-
if (Math.abs(z) <= w.EPSILON15) throw new S("matrix is not invertible");
|
|
1951
|
-
((e[0] = d * j - h * m),
|
|
1952
|
-
(e[1] = h * i - t * j),
|
|
1953
|
-
(e[2] = t * m - d * i),
|
|
1954
|
-
(e[3] = s * m - p * j),
|
|
1955
|
-
(e[4] = o * j - s * i),
|
|
1956
|
-
(e[5] = p * i - o * m),
|
|
1957
|
-
(e[6] = p * h - s * d),
|
|
1958
|
-
(e[7] = s * t - o * h),
|
|
1959
|
-
(e[8] = o * d - p * t));
|
|
1960
|
-
let M = 1 / z;
|
|
1961
|
-
return r.multiplyByScalar(e, M, e);
|
|
1962
|
-
};
|
|
1963
|
-
var be = new r();
|
|
1964
|
-
r.inverseTranspose = function (n, e) {
|
|
1965
|
-
return (
|
|
1966
|
-
c.typeOf.object("matrix", n),
|
|
1967
|
-
c.typeOf.object("result", e),
|
|
1968
|
-
r.inverse(r.transpose(n, be), e)
|
|
1969
|
-
);
|
|
1970
|
-
};
|
|
1971
|
-
r.equals = function (n, e) {
|
|
1972
|
-
return (
|
|
1973
|
-
n === e ||
|
|
1974
|
-
(u(n) &&
|
|
1975
|
-
u(e) &&
|
|
1976
|
-
n[0] === e[0] &&
|
|
1977
|
-
n[1] === e[1] &&
|
|
1978
|
-
n[2] === e[2] &&
|
|
1979
|
-
n[3] === e[3] &&
|
|
1980
|
-
n[4] === e[4] &&
|
|
1981
|
-
n[5] === e[5] &&
|
|
1982
|
-
n[6] === e[6] &&
|
|
1983
|
-
n[7] === e[7] &&
|
|
1984
|
-
n[8] === e[8])
|
|
1985
|
-
);
|
|
1986
|
-
};
|
|
1987
|
-
r.equalsEpsilon = function (n, e, o) {
|
|
1988
|
-
return (
|
|
1989
|
-
(o = O(o, 0)),
|
|
1990
|
-
n === e ||
|
|
1991
|
-
(u(n) &&
|
|
1992
|
-
u(e) &&
|
|
1993
|
-
Math.abs(n[0] - e[0]) <= o &&
|
|
1994
|
-
Math.abs(n[1] - e[1]) <= o &&
|
|
1995
|
-
Math.abs(n[2] - e[2]) <= o &&
|
|
1996
|
-
Math.abs(n[3] - e[3]) <= o &&
|
|
1997
|
-
Math.abs(n[4] - e[4]) <= o &&
|
|
1998
|
-
Math.abs(n[5] - e[5]) <= o &&
|
|
1999
|
-
Math.abs(n[6] - e[6]) <= o &&
|
|
2000
|
-
Math.abs(n[7] - e[7]) <= o &&
|
|
2001
|
-
Math.abs(n[8] - e[8]) <= o)
|
|
2002
|
-
);
|
|
2003
|
-
};
|
|
2004
|
-
r.IDENTITY = Object.freeze(new r(1, 0, 0, 0, 1, 0, 0, 0, 1));
|
|
2005
|
-
r.ZERO = Object.freeze(new r(0, 0, 0, 0, 0, 0, 0, 0, 0));
|
|
2006
|
-
r.COLUMN0ROW0 = 0;
|
|
2007
|
-
r.COLUMN0ROW1 = 1;
|
|
2008
|
-
r.COLUMN0ROW2 = 2;
|
|
2009
|
-
r.COLUMN1ROW0 = 3;
|
|
2010
|
-
r.COLUMN1ROW1 = 4;
|
|
2011
|
-
r.COLUMN1ROW2 = 5;
|
|
2012
|
-
r.COLUMN2ROW0 = 6;
|
|
2013
|
-
r.COLUMN2ROW1 = 7;
|
|
2014
|
-
r.COLUMN2ROW2 = 8;
|
|
2015
|
-
Object.defineProperties(r.prototype, {
|
|
2016
|
-
length: {
|
|
2017
|
-
get: function () {
|
|
2018
|
-
return r.packedLength;
|
|
2019
|
-
},
|
|
2020
|
-
},
|
|
2021
|
-
});
|
|
2022
|
-
r.prototype.clone = function (n) {
|
|
2023
|
-
return r.clone(this, n);
|
|
2024
|
-
};
|
|
2025
|
-
r.prototype.equals = function (n) {
|
|
2026
|
-
return r.equals(this, n);
|
|
2027
|
-
};
|
|
2028
|
-
r.equalsArray = function (n, e, o) {
|
|
2029
|
-
return (
|
|
2030
|
-
n[0] === e[o] &&
|
|
2031
|
-
n[1] === e[o + 1] &&
|
|
2032
|
-
n[2] === e[o + 2] &&
|
|
2033
|
-
n[3] === e[o + 3] &&
|
|
2034
|
-
n[4] === e[o + 4] &&
|
|
2035
|
-
n[5] === e[o + 5] &&
|
|
2036
|
-
n[6] === e[o + 6] &&
|
|
2037
|
-
n[7] === e[o + 7] &&
|
|
2038
|
-
n[8] === e[o + 8]
|
|
2039
|
-
);
|
|
2040
|
-
};
|
|
2041
|
-
r.prototype.equalsEpsilon = function (n, e) {
|
|
2042
|
-
return r.equalsEpsilon(this, n, e);
|
|
2043
|
-
};
|
|
2044
|
-
r.prototype.toString = function () {
|
|
2045
|
-
return `(${this[0]}, ${this[3]}, ${this[6]})
|
|
2046
|
-
(${this[1]}, ${this[4]}, ${this[7]})
|
|
2047
|
-
(${this[2]}, ${this[5]}, ${this[8]})`;
|
|
2048
|
-
};
|
|
2049
|
-
var Oo = r;
|
|
2050
|
-
var F,
|
|
2051
|
-
R = {
|
|
2052
|
-
requestFullscreen: void 0,
|
|
2053
|
-
exitFullscreen: void 0,
|
|
2054
|
-
fullscreenEnabled: void 0,
|
|
2055
|
-
fullscreenElement: void 0,
|
|
2056
|
-
fullscreenchange: void 0,
|
|
2057
|
-
fullscreenerror: void 0,
|
|
2058
|
-
},
|
|
2059
|
-
_ = {};
|
|
2060
|
-
Object.defineProperties(_, {
|
|
2061
|
-
element: {
|
|
2062
|
-
get: function () {
|
|
2063
|
-
if (_.supportsFullscreen()) return document[R.fullscreenElement];
|
|
2064
|
-
},
|
|
2065
|
-
},
|
|
2066
|
-
changeEventName: {
|
|
2067
|
-
get: function () {
|
|
2068
|
-
if (_.supportsFullscreen()) return R.fullscreenchange;
|
|
2069
|
-
},
|
|
2070
|
-
},
|
|
2071
|
-
errorEventName: {
|
|
2072
|
-
get: function () {
|
|
2073
|
-
if (_.supportsFullscreen()) return R.fullscreenerror;
|
|
2074
|
-
},
|
|
2075
|
-
},
|
|
2076
|
-
enabled: {
|
|
2077
|
-
get: function () {
|
|
2078
|
-
if (_.supportsFullscreen()) return document[R.fullscreenEnabled];
|
|
2079
|
-
},
|
|
2080
|
-
},
|
|
2081
|
-
fullscreen: {
|
|
2082
|
-
get: function () {
|
|
2083
|
-
if (_.supportsFullscreen()) return _.element !== null;
|
|
2084
|
-
},
|
|
2085
|
-
},
|
|
2086
|
-
});
|
|
2087
|
-
_.supportsFullscreen = function () {
|
|
2088
|
-
if (u(F)) return F;
|
|
2089
|
-
F = !1;
|
|
2090
|
-
let n = document.body;
|
|
2091
|
-
if (typeof n.requestFullscreen == "function")
|
|
2092
|
-
return (
|
|
2093
|
-
(R.requestFullscreen = "requestFullscreen"),
|
|
2094
|
-
(R.exitFullscreen = "exitFullscreen"),
|
|
2095
|
-
(R.fullscreenEnabled = "fullscreenEnabled"),
|
|
2096
|
-
(R.fullscreenElement = "fullscreenElement"),
|
|
2097
|
-
(R.fullscreenchange = "fullscreenchange"),
|
|
2098
|
-
(R.fullscreenerror = "fullscreenerror"),
|
|
2099
|
-
(F = !0),
|
|
2100
|
-
F
|
|
2101
|
-
);
|
|
2102
|
-
let e = ["webkit", "moz", "o", "ms", "khtml"],
|
|
2103
|
-
o;
|
|
2104
|
-
for (let t = 0, i = e.length; t < i; ++t) {
|
|
2105
|
-
let p = e[t];
|
|
2106
|
-
((o = `${p}RequestFullscreen`),
|
|
2107
|
-
typeof n[o] == "function"
|
|
2108
|
-
? ((R.requestFullscreen = o), (F = !0))
|
|
2109
|
-
: ((o = `${p}RequestFullScreen`),
|
|
2110
|
-
typeof n[o] == "function" && ((R.requestFullscreen = o), (F = !0))),
|
|
2111
|
-
(o = `${p}ExitFullscreen`),
|
|
2112
|
-
typeof document[o] == "function"
|
|
2113
|
-
? (R.exitFullscreen = o)
|
|
2114
|
-
: ((o = `${p}CancelFullScreen`),
|
|
2115
|
-
typeof document[o] == "function" && (R.exitFullscreen = o)),
|
|
2116
|
-
(o = `${p}FullscreenEnabled`),
|
|
2117
|
-
document[o] !== void 0
|
|
2118
|
-
? (R.fullscreenEnabled = o)
|
|
2119
|
-
: ((o = `${p}FullScreenEnabled`),
|
|
2120
|
-
document[o] !== void 0 && (R.fullscreenEnabled = o)),
|
|
2121
|
-
(o = `${p}FullscreenElement`),
|
|
2122
|
-
document[o] !== void 0
|
|
2123
|
-
? (R.fullscreenElement = o)
|
|
2124
|
-
: ((o = `${p}FullScreenElement`),
|
|
2125
|
-
document[o] !== void 0 && (R.fullscreenElement = o)),
|
|
2126
|
-
(o = `${p}fullscreenchange`),
|
|
2127
|
-
document[`on${o}`] !== void 0 &&
|
|
2128
|
-
(p === "ms" && (o = "MSFullscreenChange"), (R.fullscreenchange = o)),
|
|
2129
|
-
(o = `${p}fullscreenerror`),
|
|
2130
|
-
document[`on${o}`] !== void 0 &&
|
|
2131
|
-
(p === "ms" && (o = "MSFullscreenError"), (R.fullscreenerror = o)));
|
|
2132
|
-
}
|
|
2133
|
-
return F;
|
|
2134
|
-
};
|
|
2135
|
-
_.requestFullscreen = function (n, e) {
|
|
2136
|
-
_.supportsFullscreen() && n[R.requestFullscreen]({ vrDisplay: e });
|
|
2137
|
-
};
|
|
2138
|
-
_.exitFullscreen = function () {
|
|
2139
|
-
_.supportsFullscreen() && document[R.exitFullscreen]();
|
|
2140
|
-
};
|
|
2141
|
-
_._names = R;
|
|
2142
|
-
var Un = _;
|
|
2143
|
-
var A;
|
|
2144
|
-
typeof navigator < "u" ? (A = navigator) : (A = {});
|
|
2145
|
-
function B(n) {
|
|
2146
|
-
let e = n.split(".");
|
|
2147
|
-
for (let o = 0, t = e.length; o < t; ++o) e[o] = parseInt(e[o], 10);
|
|
2148
|
-
return e;
|
|
2149
|
-
}
|
|
2150
|
-
var J, In;
|
|
2151
|
-
function zn() {
|
|
2152
|
-
if (!u(J) && ((J = !1), !fn())) {
|
|
2153
|
-
let n = / Chrome\/([\.0-9]+)/.exec(A.userAgent);
|
|
2154
|
-
n !== null && ((J = !0), (In = B(n[1])));
|
|
2155
|
-
}
|
|
2156
|
-
return J;
|
|
2157
|
-
}
|
|
2158
|
-
function he() {
|
|
2159
|
-
return zn() && In;
|
|
2160
|
-
}
|
|
2161
|
-
var nn, Pn;
|
|
2162
|
-
function Ln() {
|
|
2163
|
-
if (
|
|
2164
|
-
!u(nn) &&
|
|
2165
|
-
((nn = !1), !zn() && !fn() && / Safari\/[\.0-9]+/.test(A.userAgent))
|
|
2166
|
-
) {
|
|
2167
|
-
let n = / Version\/([\.0-9]+)/.exec(A.userAgent);
|
|
2168
|
-
n !== null && ((nn = !0), (Pn = B(n[1])));
|
|
2169
|
-
}
|
|
2170
|
-
return nn;
|
|
2171
|
-
}
|
|
2172
|
-
function we() {
|
|
2173
|
-
return Ln() && Pn;
|
|
2174
|
-
}
|
|
2175
|
-
var en, gn;
|
|
2176
|
-
function Vn() {
|
|
2177
|
-
if (!u(en)) {
|
|
2178
|
-
en = !1;
|
|
2179
|
-
let n = / AppleWebKit\/([\.0-9]+)(\+?)/.exec(A.userAgent);
|
|
2180
|
-
n !== null && ((en = !0), (gn = B(n[1])), (gn.isNightly = !!n[2]));
|
|
2181
|
-
}
|
|
2182
|
-
return en;
|
|
2183
|
-
}
|
|
2184
|
-
function je() {
|
|
2185
|
-
return Vn() && gn;
|
|
2186
|
-
}
|
|
2187
|
-
var Z, Sn;
|
|
2188
|
-
function Wn() {
|
|
2189
|
-
if (!u(Z)) {
|
|
2190
|
-
Z = !1;
|
|
2191
|
-
let n;
|
|
2192
|
-
A.appName === "Microsoft Internet Explorer"
|
|
2193
|
-
? ((n = /MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(A.userAgent)),
|
|
2194
|
-
n !== null && ((Z = !0), (Sn = B(n[1]))))
|
|
2195
|
-
: A.appName === "Netscape" &&
|
|
2196
|
-
((n = /Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(A.userAgent)),
|
|
2197
|
-
n !== null && ((Z = !0), (Sn = B(n[1]))));
|
|
2198
|
-
}
|
|
2199
|
-
return Z;
|
|
2200
|
-
}
|
|
2201
|
-
function ge() {
|
|
2202
|
-
return Wn() && Sn;
|
|
2203
|
-
}
|
|
2204
|
-
var on, vn;
|
|
2205
|
-
function fn() {
|
|
2206
|
-
if (!u(on)) {
|
|
2207
|
-
on = !1;
|
|
2208
|
-
let n = / Edg\/([\.0-9]+)/.exec(A.userAgent);
|
|
2209
|
-
n !== null && ((on = !0), (vn = B(n[1])));
|
|
2210
|
-
}
|
|
2211
|
-
return on;
|
|
2212
|
-
}
|
|
2213
|
-
function Se() {
|
|
2214
|
-
return fn() && vn;
|
|
2215
|
-
}
|
|
2216
|
-
var tn, Rn;
|
|
2217
|
-
function rn() {
|
|
2218
|
-
if (!u(tn)) {
|
|
2219
|
-
tn = !1;
|
|
2220
|
-
let n = /Firefox\/([\.0-9]+)/.exec(A.userAgent);
|
|
2221
|
-
n !== null && ((tn = !0), (Rn = B(n[1])));
|
|
2222
|
-
}
|
|
2223
|
-
return tn;
|
|
2224
|
-
}
|
|
2225
|
-
var hn;
|
|
2226
|
-
function ze() {
|
|
2227
|
-
return (u(hn) || (hn = /Windows/i.test(A.appVersion)), hn);
|
|
2228
|
-
}
|
|
2229
|
-
var wn;
|
|
2230
|
-
function Re() {
|
|
2231
|
-
return (
|
|
2232
|
-
u(wn) ||
|
|
2233
|
-
(wn =
|
|
2234
|
-
navigator.platform === "iPhone" ||
|
|
2235
|
-
navigator.platform === "iPod" ||
|
|
2236
|
-
navigator.platform === "iPad"),
|
|
2237
|
-
wn
|
|
2238
|
-
);
|
|
2239
|
-
}
|
|
2240
|
-
function Me() {
|
|
2241
|
-
return rn() && Rn;
|
|
2242
|
-
}
|
|
2243
|
-
var jn;
|
|
2244
|
-
function qe() {
|
|
2245
|
-
return (
|
|
2246
|
-
u(jn) ||
|
|
2247
|
-
(jn =
|
|
2248
|
-
!rn() &&
|
|
2249
|
-
typeof PointerEvent < "u" &&
|
|
2250
|
-
(!u(A.pointerEnabled) || A.pointerEnabled)),
|
|
2251
|
-
jn
|
|
2252
|
-
);
|
|
2253
|
-
}
|
|
2254
|
-
var $n, cn;
|
|
2255
|
-
function Dn() {
|
|
2256
|
-
if (!u(cn)) {
|
|
2257
|
-
let n = document.createElement("canvas");
|
|
2258
|
-
n.setAttribute(
|
|
2259
|
-
"style",
|
|
2260
|
-
"image-rendering: -moz-crisp-edges;image-rendering: pixelated;",
|
|
2261
|
-
);
|
|
2262
|
-
let e = n.style.imageRendering;
|
|
2263
|
-
((cn = u(e) && e !== ""), cn && ($n = e));
|
|
2264
|
-
}
|
|
2265
|
-
return cn;
|
|
2266
|
-
}
|
|
2267
|
-
function Ee() {
|
|
2268
|
-
return Dn() ? $n : void 0;
|
|
2269
|
-
}
|
|
2270
|
-
function E() {
|
|
2271
|
-
if (!E.initialized)
|
|
2272
|
-
throw new S(
|
|
2273
|
-
"You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP",
|
|
2274
|
-
);
|
|
2275
|
-
return E._result;
|
|
2276
|
-
}
|
|
2277
|
-
E._promise = void 0;
|
|
2278
|
-
E._result = void 0;
|
|
2279
|
-
E.initialize = function () {
|
|
2280
|
-
return (
|
|
2281
|
-
u(E._promise) ||
|
|
2282
|
-
(E._promise = new Promise((n) => {
|
|
2283
|
-
let e = new Image();
|
|
2284
|
-
((e.onload = function () {
|
|
2285
|
-
((E._result = e.width > 0 && e.height > 0), n(E._result));
|
|
2286
|
-
}),
|
|
2287
|
-
(e.onerror = function () {
|
|
2288
|
-
((E._result = !1), n(E._result));
|
|
2289
|
-
}),
|
|
2290
|
-
(e.src =
|
|
2291
|
-
"data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"));
|
|
2292
|
-
})),
|
|
2293
|
-
E._promise
|
|
2294
|
-
);
|
|
2295
|
-
};
|
|
2296
|
-
Object.defineProperties(E, {
|
|
2297
|
-
initialized: {
|
|
2298
|
-
get: function () {
|
|
2299
|
-
return u(E._result);
|
|
2300
|
-
},
|
|
2301
|
-
},
|
|
2302
|
-
});
|
|
2303
|
-
var $ = [];
|
|
2304
|
-
typeof ArrayBuffer < "u" &&
|
|
2305
|
-
($.push(
|
|
2306
|
-
Int8Array,
|
|
2307
|
-
Uint8Array,
|
|
2308
|
-
Int16Array,
|
|
2309
|
-
Uint16Array,
|
|
2310
|
-
Int32Array,
|
|
2311
|
-
Uint32Array,
|
|
2312
|
-
Float32Array,
|
|
2313
|
-
Float64Array,
|
|
2314
|
-
),
|
|
2315
|
-
typeof Uint8ClampedArray < "u" && $.push(Uint8ClampedArray),
|
|
2316
|
-
typeof Uint8ClampedArray < "u" && $.push(Uint8ClampedArray),
|
|
2317
|
-
typeof BigInt64Array < "u" && $.push(BigInt64Array),
|
|
2318
|
-
typeof BigUint64Array < "u" && $.push(BigUint64Array));
|
|
2319
|
-
var T = {
|
|
2320
|
-
isChrome: zn,
|
|
2321
|
-
chromeVersion: he,
|
|
2322
|
-
isSafari: Ln,
|
|
2323
|
-
safariVersion: we,
|
|
2324
|
-
isWebkit: Vn,
|
|
2325
|
-
webkitVersion: je,
|
|
2326
|
-
isInternetExplorer: Wn,
|
|
2327
|
-
internetExplorerVersion: ge,
|
|
2328
|
-
isEdge: fn,
|
|
2329
|
-
edgeVersion: Se,
|
|
2330
|
-
isFirefox: rn,
|
|
2331
|
-
firefoxVersion: Me,
|
|
2332
|
-
isWindows: ze,
|
|
2333
|
-
isIPadOrIOS: Re,
|
|
2334
|
-
hardwareConcurrency: O(A.hardwareConcurrency, 3),
|
|
2335
|
-
supportsPointerEvents: qe,
|
|
2336
|
-
supportsImageRenderingPixelated: Dn,
|
|
2337
|
-
supportsWebP: E,
|
|
2338
|
-
imageRenderingValue: Ee,
|
|
2339
|
-
typedArrayTypes: $,
|
|
2340
|
-
};
|
|
2341
|
-
T.supportsBasis = function (n) {
|
|
2342
|
-
return T.supportsWebAssembly() && n.context.supportsBasis;
|
|
2343
|
-
};
|
|
2344
|
-
T.supportsFullscreen = function () {
|
|
2345
|
-
return Un.supportsFullscreen();
|
|
2346
|
-
};
|
|
2347
|
-
T.supportsTypedArrays = function () {
|
|
2348
|
-
return typeof ArrayBuffer < "u";
|
|
2349
|
-
};
|
|
2350
|
-
T.supportsBigInt64Array = function () {
|
|
2351
|
-
return typeof BigInt64Array < "u";
|
|
2352
|
-
};
|
|
2353
|
-
T.supportsBigUint64Array = function () {
|
|
2354
|
-
return typeof BigUint64Array < "u";
|
|
2355
|
-
};
|
|
2356
|
-
T.supportsBigInt = function () {
|
|
2357
|
-
return typeof BigInt < "u";
|
|
2358
|
-
};
|
|
2359
|
-
T.supportsWebWorkers = function () {
|
|
2360
|
-
return typeof Worker < "u";
|
|
2361
|
-
};
|
|
2362
|
-
T.supportsWebAssembly = function () {
|
|
2363
|
-
return typeof WebAssembly < "u";
|
|
2364
|
-
};
|
|
2365
|
-
T.supportsWebgl2 = function (n) {
|
|
2366
|
-
return (c.defined("scene", n), n.context.webgl2);
|
|
2367
|
-
};
|
|
2368
|
-
T.supportsEsmWebWorkers = function () {
|
|
2369
|
-
return !rn() || parseInt(Rn) >= 114;
|
|
2370
|
-
};
|
|
2371
|
-
var Mo = T;
|
|
2372
|
-
export { y as a, D as b, mn as c, fo as d, Oo as e, Mo as f };
|