@vcmap/ui 5.0.0-rc.30 → 5.0.0-rc.31
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/build/buildHelpers.js +4 -3
- package/config/base.config.json +5 -4
- package/config/dev.config.json +4 -0
- package/config/graphFeatureInfo.config.json +1 -1
- package/config/projects.config.json +2 -2
- package/dist/assets/cesium/ThirdParty/Workers/basis_transcoder.js +1 -1
- package/dist/assets/cesium/Workers/chunk-227AJNOA.js +59 -0
- package/dist/assets/cesium/Workers/chunk-2R5O53JW.js +157 -0
- package/dist/assets/cesium/Workers/chunk-34YUDLRP.js +781 -0
- package/dist/assets/cesium/Workers/chunk-3W63OHNJ.js +100 -0
- package/dist/assets/cesium/Workers/chunk-4MFFIWUA.js +163 -0
- package/dist/assets/cesium/Workers/chunk-66QLLS45.js +218 -0
- package/dist/assets/cesium/Workers/chunk-6BTKZDRG.js +77 -0
- package/dist/assets/cesium/Workers/chunk-A4JVFBQ3.js +101 -0
- package/dist/assets/cesium/Workers/chunk-ABADGKYE.js +58 -0
- package/dist/assets/cesium/Workers/chunk-AFFLIKOH.js +353 -0
- package/dist/assets/cesium/Workers/chunk-AHKEZ2OE.js +629 -0
- package/dist/assets/cesium/Workers/chunk-C3SXRKRW.js +476 -0
- package/dist/assets/cesium/Workers/chunk-CCFQRR6D.js +55 -0
- package/dist/assets/cesium/Workers/chunk-CHHNOC2C.js +1860 -0
- package/dist/assets/cesium/Workers/chunk-CTELOFLA.js +196 -0
- package/dist/assets/cesium/Workers/chunk-DUHWWBQQ.js +3273 -0
- package/dist/assets/cesium/Workers/chunk-EW2GWJYB.js +44 -0
- package/dist/assets/cesium/Workers/chunk-GLZBE3ML.js +421 -0
- package/dist/assets/cesium/Workers/chunk-HARLBUOL.js +236 -0
- package/dist/assets/cesium/Workers/chunk-HQF437NJ.js +117 -0
- package/dist/assets/cesium/Workers/chunk-IPA4EACJ.js +368 -0
- package/dist/assets/cesium/Workers/chunk-J3JY6I2C.js +1009 -0
- package/dist/assets/cesium/Workers/chunk-JB2LWGH4.js +390 -0
- package/dist/assets/cesium/Workers/chunk-JS3AW5BK.js +634 -0
- package/dist/assets/cesium/Workers/chunk-K36FEYS7.js +452 -0
- package/dist/assets/cesium/Workers/chunk-KD4Y7CZL.js +400 -0
- package/dist/assets/cesium/Workers/chunk-KTJSNCK4.js +842 -0
- package/dist/assets/cesium/Workers/chunk-LLUNNUJV.js +258 -0
- package/dist/assets/cesium/Workers/{package.js → chunk-MPAZH4BF.js} +13 -2
- package/dist/assets/cesium/Workers/chunk-MYZB7C4T.js +1258 -0
- package/dist/assets/cesium/Workers/chunk-N3JIFFX2.js +501 -0
- package/dist/assets/cesium/Workers/chunk-O5AMBQ36.js +430 -0
- package/dist/assets/cesium/Workers/chunk-OAVNIRB4.js +124 -0
- package/dist/assets/cesium/Workers/chunk-OYFCF4PL.js +171 -0
- package/dist/assets/cesium/Workers/chunk-OZJDGN5F.js +1477 -0
- package/dist/assets/cesium/Workers/chunk-PCJWUS4M.js +2041 -0
- package/dist/assets/cesium/Workers/chunk-PFQBCKBM.js +8644 -0
- package/dist/assets/cesium/Workers/chunk-QIKODV5G.js +305 -0
- package/dist/assets/cesium/Workers/chunk-QJ3DFBH3.js +73 -0
- package/dist/assets/cesium/Workers/chunk-QMEMZIJI.js +138 -0
- package/dist/assets/cesium/Workers/chunk-QT3MPEMI.js +102 -0
- package/dist/assets/cesium/Workers/chunk-RP2A7BR5.js +289 -0
- package/dist/assets/cesium/Workers/chunk-RW6LU2CJ.js +138 -0
- package/dist/assets/cesium/Workers/chunk-TFC6TZ3S.js +757 -0
- package/dist/assets/cesium/Workers/chunk-V3NGATMV.js +693 -0
- package/dist/assets/cesium/Workers/chunk-VLGOATD6.js +1075 -0
- package/dist/assets/cesium/Workers/chunk-WXTV4ATB.js +39 -0
- package/dist/assets/cesium/Workers/chunk-X4SU25DT.js +302 -0
- package/dist/assets/cesium/Workers/chunk-XTY7B2N6.js +2716 -0
- package/dist/assets/cesium/Workers/chunk-XY7MGBKC.js +513 -0
- package/dist/assets/cesium/Workers/chunk-Z24VKNDO.js +834 -0
- package/dist/assets/cesium/Workers/chunk-ZA25DG4Y.js +684 -0
- package/dist/assets/cesium/Workers/chunk-ZFOBYDGF.js +73 -0
- package/dist/assets/cesium/Workers/combineGeometry.js +65 -15
- package/dist/assets/cesium/Workers/createBoxGeometry.js +55 -10
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +231 -310
- package/dist/assets/cesium/Workers/createCircleGeometry.js +185 -202
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +141 -155
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +477 -557
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +218 -230
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +1162 -1307
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +533 -569
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +57 -10
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +224 -258
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +68 -12
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +61 -12
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +56 -10
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +58 -13
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +55 -10
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +226 -243
- package/dist/assets/cesium/Workers/createGeometry.js +143 -48
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1484 -2011
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +216 -243
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +121 -113
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +1041 -1327
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +516 -657
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +471 -547
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +352 -384
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +271 -295
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +1128 -1331
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +445 -500
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +381 -440
- package/dist/assets/cesium/Workers/createSphereGeometry.js +112 -118
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +112 -121
- package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +32 -127
- package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +462 -505
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +377 -436
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +110 -77
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +369 -391
- package/dist/assets/cesium/Workers/createVectorTilePolylines.js +252 -244
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +543 -615
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +2244 -2677
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +682 -926
- package/dist/assets/cesium/Workers/createWallGeometry.js +459 -593
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +324 -419
- package/dist/assets/cesium/Workers/decodeDraco.js +327 -347
- package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +2530 -3567
- package/dist/assets/cesium/Workers/decodeI3S.js +765 -970
- package/dist/assets/cesium/Workers/transcodeKTX2.js +3353 -1464
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +3 -4
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +748 -953
- package/dist/assets/{cesium.eaf7cc.js → cesium.77d0f7.js} +8915 -13165
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.b16511.js → core.720589.js} +3421 -3365
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-dd539204.js +1 -0
- package/dist/assets/{ol.4bbf0f.js → ol.e48649.js} +4 -4
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.ab815e.css → ui.50452a.css} +1 -1
- package/dist/assets/{ui.ab815e.js → ui.50452a.js} +4270 -4355
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.ea3fa8.js → vuetify.f0a769.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +27 -23
- package/index.html +23 -22
- package/package.json +5 -5
- package/plugins/@vcmap-show-case/plugin-editors/PluginEditors.vue +119 -0
- package/plugins/@vcmap-show-case/plugin-editors/index.js +41 -0
- package/plugins/@vcmap-show-case/plugin-editors/package.json +5 -0
- package/plugins/{@vcmap → @vcmap-show-case}/project-selector/ProjectSelectorComponent.vue +1 -1
- package/plugins/{@vcmap → @vcmap-show-case}/project-selector/config.json +2 -2
- package/plugins/{@vcmap → @vcmap-show-case}/project-selector/package.json +1 -1
- package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/package.json +1 -1
- package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +1 -1
- package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/ThemeChangerComponent.vue +1 -1
- package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/config.json +2 -2
- package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/package.json +1 -1
- package/plugins/@vcmap-show-case/vector-properties-example/vectorPropertiesExample.vue +20 -1
- package/plugins/package.json +6 -2
- package/src/application/VcsAttributions.vue +27 -20
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +22 -14
- package/src/components/form-inputs-controls/VcsSlider.vue +1 -0
- package/src/components/icons/2DAreaIcon.vue +2 -17
- package/src/components/icons/2DDistanceIcon.vue +0 -3
- package/src/components/icons/3DAreaIcon.vue +2 -17
- package/src/components/icons/3DDistanceIcon.vue +0 -3
- package/src/components/icons/3DHeightIcon.vue +0 -3
- package/src/components/icons/AngleIcon.vue +0 -1
- package/src/components/icons/AssociationsIcon.vue +1 -3
- package/src/components/icons/AxisIcon.vue +0 -4
- package/src/components/icons/BoundingBoxIcon.vue +1 -4
- package/src/components/icons/CheckboxIcon.vue +0 -2
- package/src/components/icons/CheckboxIndeterminateIcon.vue +1 -5
- package/src/components/icons/CircleIcon.vue +1 -6
- package/src/components/icons/ClippingHorizontalIcon.vue +0 -1
- package/src/components/icons/ClippingIcon.vue +0 -1
- package/src/components/icons/ClippingVerticalIcon.vue +0 -1
- package/src/components/icons/ColorPickerIcon.vue +0 -1
- package/src/components/icons/ColorSwatchIcon.vue +0 -2
- package/src/components/icons/CommentIcon.vue +0 -1
- package/src/components/icons/CompassIcon.vue +0 -2
- package/src/components/icons/ComponentsIcon.vue +0 -1
- package/src/components/icons/ConeIcon.vue +1 -4
- package/src/components/icons/DimensionsHouseIcon.vue +0 -2
- package/src/components/icons/EditIcon.vue +0 -1
- package/src/components/icons/EditVerticesIcon.vue +0 -4
- package/src/components/icons/ElevationProfileIcon.vue +1 -13
- package/src/components/icons/ExportAreaIcon.vue +0 -1
- package/src/components/icons/ExportFlightIcon.vue +0 -1
- package/src/components/icons/ExportIcon.vue +12 -8
- package/src/components/icons/ExternalLinkIcon.vue +0 -2
- package/src/components/icons/FastForwardIcon.vue +0 -1
- package/src/components/icons/FilterIcon.vue +0 -1
- package/src/components/icons/GlobeNatureIcon.vue +0 -3
- package/src/components/icons/GroundIcon.vue +0 -1
- package/src/components/icons/HealthCareIndustriesIcon.vue +1 -11
- package/src/components/icons/HideIcon.vue +0 -1
- package/src/components/icons/HomePointIcon.vue +0 -1
- package/src/components/icons/HospitalsIcon.vue +1 -20
- package/src/components/icons/HouseIcon.vue +3 -13
- package/src/components/icons/ImportIcon.vue +6 -14
- package/src/components/icons/InfoIcon.vue +0 -2
- package/src/components/icons/KebabIcon.vue +1 -9
- package/src/components/icons/LabelIcon.vue +0 -2
- package/src/components/icons/LayersIcon.vue +1 -9
- package/src/components/icons/LegendIcon.vue +0 -1
- package/src/components/icons/LineIcon.vue +0 -2
- package/src/components/icons/LinkIcon.vue +0 -1
- package/src/components/icons/LogoutIcon.vue +0 -1
- package/src/components/icons/MapIcon.vue +0 -2
- package/src/components/icons/MenuIcon.vue +1 -5
- package/src/components/icons/MinusIcon.vue +0 -2
- package/src/components/icons/ObjectSelectIcon.vue +0 -2
- package/src/components/icons/ObliqueViewIcon.vue +0 -1
- package/src/components/icons/PdfIcon.vue +0 -1
- package/src/components/icons/PedestrianIcon.vue +0 -1
- package/src/components/icons/PenIcon.vue +0 -1
- package/src/components/icons/PlayCircleIcon.vue +1 -8
- package/src/components/icons/PlusIcon.vue +0 -2
- package/src/components/icons/PoiIcon.vue +0 -1
- package/src/components/icons/PointIcon.vue +2 -6
- package/src/components/icons/PointSelectIcon.vue +0 -1
- package/src/components/icons/PresentationModeIcon.vue +0 -1
- package/src/components/icons/ProgressIcon.vue +1 -1
- package/src/components/icons/QueryIcon.vue +0 -1
- package/src/components/icons/RectangleIcon.vue +1 -6
- package/src/components/icons/ReturnIcon.vue +0 -1
- package/src/components/icons/RewindIcon.vue +0 -1
- package/src/components/icons/RotateLeftIcon.vue +0 -1
- package/src/components/icons/RotateRightIcon.vue +0 -1
- package/src/components/icons/ScreenshotIcon.vue +1 -6
- package/src/components/icons/SearchIcon.vue +0 -1
- package/src/components/icons/ShadowIcon.vue +0 -2
- package/src/components/icons/ShapesIcon.vue +1 -4
- package/src/components/icons/ShareIcon.vue +0 -1
- package/src/components/icons/SimpleCircleFilledIcon.vue +0 -1
- package/src/components/icons/SimpleCircleHalfFilledIcon.vue +0 -1
- package/src/components/icons/SimpleCircleOutlinedIcon.vue +1 -7
- package/src/components/icons/SkipPreviousIcon.vue +1 -6
- package/src/components/icons/SplitViewIcon.vue +0 -1
- package/src/components/icons/TextStyleIcon.vue +0 -3
- package/src/components/icons/ThreeDimensionsIcon.vue +0 -1
- package/src/components/icons/ToolsIcon.vue +0 -1
- package/src/components/icons/TouchIcon.vue +0 -1
- package/src/components/icons/TriangleIcon.vue +0 -3
- package/src/components/icons/TwoDimensionsIcon.vue +0 -2
- package/src/components/icons/UploadIcon.vue +0 -1
- package/src/components/icons/UserProfileIcon.vue +0 -1
- package/src/components/icons/UserShareIcon.vue +0 -1
- package/src/components/icons/ViewpointFlightIcon.vue +0 -1
- package/src/components/icons/ViewpointIcon.vue +0 -1
- package/src/components/icons/Viewshed360Icon.vue +0 -1
- package/src/components/icons/ViewshedConeIcon.vue +0 -1
- package/src/components/icons/ViewshedIcon.vue +0 -1
- package/src/components/icons/WalkingIcon.vue +0 -1
- package/src/components/icons/WallIcon.vue +1 -4
- package/src/components/icons/WandIcon.vue +22 -70
- package/src/components/lists/VcsList.vue +18 -12
- package/src/components/plugins/AbstractConfigEditor.vue +2 -2
- package/src/components/tables/VcsDataTable.vue +1 -1
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +57 -14
- package/src/contentTree/contentTreeCollection.js +30 -9
- package/src/i18n/de.js +8 -5
- package/src/i18n/en.js +8 -5
- package/src/i18n/i18nCollection.js +19 -65
- package/src/manager/buttonManager.js +4 -0
- package/src/manager/contextMenu/contextMenuManager.js +2 -0
- package/src/pluginHelper.js +2 -2
- package/src/vcsUiApp.js +9 -4
- package/src/vuePlugins/i18n.js +0 -8
- package/dist/assets/cesium/ThirdParty/Workers/draco_decoder_nodejs.js +0 -117
- package/dist/assets/cesium/Workers/ArcType-2d9abbbc.js +0 -37
- package/dist/assets/cesium/Workers/AttributeCompression-f9f6c717.js +0 -716
- package/dist/assets/cesium/Workers/AxisAlignedBoundingBox-4140c51f.js +0 -258
- package/dist/assets/cesium/Workers/BoundingRectangle-c714b156.js +0 -369
- package/dist/assets/cesium/Workers/BoxGeometry-6f3da43d.js +0 -884
- package/dist/assets/cesium/Workers/Check-6ede7e26.js +0 -290
- package/dist/assets/cesium/Workers/Color-8a565ff2.js +0 -2262
- package/dist/assets/cesium/Workers/ComponentDatatype-cf1fa08e.js +0 -341
- package/dist/assets/cesium/Workers/CoplanarPolygonGeometryLibrary-4b4d4096.js +0 -132
- package/dist/assets/cesium/Workers/CorridorGeometryLibrary-7b94502b.js +0 -498
- package/dist/assets/cesium/Workers/CylinderGeometry-ca070b87.js +0 -467
- package/dist/assets/cesium/Workers/CylinderGeometryLibrary-7bf291b4.js +0 -63
- package/dist/assets/cesium/Workers/EllipseGeometry-122e51fa.js +0 -1304
- package/dist/assets/cesium/Workers/EllipseGeometryLibrary-4d326efc.js +0 -366
- package/dist/assets/cesium/Workers/EllipseOutlineGeometry-16cc2bd7.js +0 -443
- package/dist/assets/cesium/Workers/EllipsoidGeodesic-5b3623dc.js +0 -520
- package/dist/assets/cesium/Workers/EllipsoidGeometry-cb148ca2.js +0 -637
- package/dist/assets/cesium/Workers/EllipsoidOutlineGeometry-0fa10c79.js +0 -454
- package/dist/assets/cesium/Workers/EllipsoidRhumbLine-ef872433.js +0 -741
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-6dd1b7af.js +0 -373
- package/dist/assets/cesium/Workers/EncodedCartesian3-57415c8a.js +0 -171
- package/dist/assets/cesium/Workers/FrustumGeometry-ee73037c.js +0 -2540
- package/dist/assets/cesium/Workers/GeometryAttribute-ff5b4fb1.js +0 -619
- package/dist/assets/cesium/Workers/GeometryAttributes-ad136444.js +0 -91
- package/dist/assets/cesium/Workers/GeometryInstance-34d9e21e.js +0 -121
- package/dist/assets/cesium/Workers/GeometryOffsetAttribute-9ad0019c.js +0 -16
- package/dist/assets/cesium/Workers/GeometryPipeline-1f8fbf05.js +0 -3690
- package/dist/assets/cesium/Workers/IndexDatatype-2643aa47.js +0 -200
- package/dist/assets/cesium/Workers/IntersectionTests-70d39ba9.js +0 -1836
- package/dist/assets/cesium/Workers/Math-0a2ac845.js +0 -1340
- package/dist/assets/cesium/Workers/Matrix2-e1298525.js +0 -7086
- package/dist/assets/cesium/Workers/Matrix3-41c58dde.js +0 -4283
- package/dist/assets/cesium/Workers/OrientedBoundingBox-159cf1d6.js +0 -1259
- package/dist/assets/cesium/Workers/Plane-4c3d403b.js +0 -309
- package/dist/assets/cesium/Workers/PolygonGeometryLibrary-076a5d25.js +0 -1074
- package/dist/assets/cesium/Workers/PolygonPipeline-b9f2810a.js +0 -1344
- package/dist/assets/cesium/Workers/PolylinePipeline-639192e0.js +0 -573
- package/dist/assets/cesium/Workers/PolylineVolumeGeometryLibrary-b73549fb.js +0 -781
- package/dist/assets/cesium/Workers/PrimitivePipeline-10ede1b6.js +0 -966
- package/dist/assets/cesium/Workers/RectangleGeometryLibrary-c35a7356.js +0 -280
- package/dist/assets/cesium/Workers/RuntimeError-ef395448.js +0 -68
- package/dist/assets/cesium/Workers/TerrainEncoding-668d242f.js +0 -1227
- package/dist/assets/cesium/Workers/Transforms-a2a85221.js +0 -14712
- package/dist/assets/cesium/Workers/VertexFormat-030f11ff.js +0 -312
- package/dist/assets/cesium/Workers/WallGeometryLibrary-1938bf0d.js +0 -211
- package/dist/assets/cesium/Workers/WebGLConstants-0b1ce7ba.js +0 -620
- package/dist/assets/cesium/Workers/WebMercatorProjection-13ed1a6e.js +0 -151
- package/dist/assets/cesium/Workers/arrayRemoveDuplicates-d2061e85.js +0 -129
- package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +0 -1363
- package/dist/assets/cesium/Workers/combine-d9581036.js +0 -82
- package/dist/assets/cesium/Workers/defaultValue-fe22d8c0.js +0 -51
- package/dist/assets/index-c115e3a1.js +0 -1
- package/plugins/@vcmap/create-link/fallbackCreateLink.vue +0 -76
- package/plugins/@vcmap/create-link/index.js +0 -95
- package/plugins/@vcmap/create-link/package.json +0 -6
- package/plugins/@vcmap/search-nominatim/LICENSE.md +0 -13
- package/plugins/@vcmap/search-nominatim/README.md +0 -3
- package/plugins/@vcmap/search-nominatim/SearchNominatimEditor.vue +0 -90
- package/plugins/@vcmap/search-nominatim/config.json +0 -3
- package/plugins/@vcmap/search-nominatim/index.js +0 -66
- package/plugins/@vcmap/search-nominatim/nominatim.js +0 -175
- package/plugins/@vcmap/search-nominatim/package.json +0 -9
- /package/dist/assets/{vue.67e80f.js → vue.5d696e.js} +0 -0
- /package/dist/assets/{vuetify.ea3fa8.css → vuetify.f0a769.css} +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/ModulesListComponent.vue +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/README.md +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/de.json +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/en.json +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/index.js +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/README.md +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/SimpleGraphComponent.vue +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/index.js +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/simpleGraphView.js +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/README.md +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/index.js +0 -0
@@ -1,989 +1,745 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
4
|
+
* Version 1.109.3
|
5
|
+
*
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
7
|
+
*
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
* you may not use this file except in compliance with the License.
|
10
|
+
* You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
* See the License for the specific language governing permissions and
|
18
|
+
* limitations under the License.
|
19
|
+
*
|
20
|
+
* Columbus View (Pat. Pend.)
|
21
|
+
*
|
22
|
+
* Portions licensed separately.
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
24
|
+
*/
|
25
|
+
|
26
|
+
import {
|
27
|
+
EllipsoidalOccluder_default,
|
28
|
+
TerrainEncoding_default
|
29
|
+
} from "./chunk-TFC6TZ3S.js";
|
30
|
+
import {
|
31
|
+
createTaskProcessorWorker_default
|
32
|
+
} from "./chunk-A4JVFBQ3.js";
|
33
|
+
import {
|
34
|
+
WebMercatorProjection_default
|
35
|
+
} from "./chunk-HQF437NJ.js";
|
36
|
+
import "./chunk-O5AMBQ36.js";
|
37
|
+
import {
|
38
|
+
AxisAlignedBoundingBox_default
|
39
|
+
} from "./chunk-2R5O53JW.js";
|
40
|
+
import {
|
41
|
+
IndexDatatype_default
|
42
|
+
} from "./chunk-RW6LU2CJ.js";
|
43
|
+
import {
|
44
|
+
Transforms_default
|
45
|
+
} from "./chunk-PFQBCKBM.js";
|
46
|
+
import "./chunk-QJ3DFBH3.js";
|
47
|
+
import {
|
48
|
+
Cartesian2_default,
|
49
|
+
Matrix4_default,
|
50
|
+
Rectangle_default
|
51
|
+
} from "./chunk-DUHWWBQQ.js";
|
52
|
+
import "./chunk-LLUNNUJV.js";
|
53
|
+
import {
|
54
|
+
Cartesian3_default,
|
55
|
+
Cartographic_default,
|
56
|
+
Ellipsoid_default
|
57
|
+
} from "./chunk-PCJWUS4M.js";
|
58
|
+
import {
|
59
|
+
Math_default
|
60
|
+
} from "./chunk-N3JIFFX2.js";
|
61
|
+
import "./chunk-AHKEZ2OE.js";
|
62
|
+
import "./chunk-ABADGKYE.js";
|
63
|
+
import "./chunk-WXTV4ATB.js";
|
64
|
+
import {
|
65
|
+
DeveloperError_default
|
66
|
+
} from "./chunk-4MFFIWUA.js";
|
67
|
+
import {
|
68
|
+
defined_default
|
69
|
+
} from "./chunk-6BTKZDRG.js";
|
70
|
+
|
71
|
+
// packages/engine/Source/Core/TerrainProvider.js
|
72
|
+
function TerrainProvider() {
|
73
|
+
DeveloperError_default.throwInstantiationError();
|
74
|
+
}
|
75
|
+
Object.defineProperties(TerrainProvider.prototype, {
|
3
76
|
/**
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* @
|
9
|
-
* @
|
10
|
-
*
|
11
|
-
* @see EllipsoidTerrainProvider
|
12
|
-
* @see CesiumTerrainProvider
|
13
|
-
* @see VRTheWorldTerrainProvider
|
14
|
-
* @see GoogleEarthEnterpriseTerrainProvider
|
77
|
+
* Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
|
78
|
+
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
79
|
+
* are passed an instance of {@link TileProviderError}.
|
80
|
+
* @memberof TerrainProvider.prototype
|
81
|
+
* @type {Event<TerrainProvider.ErrorEvent>}
|
82
|
+
* @readonly
|
15
83
|
*/
|
16
|
-
|
17
|
-
|
18
|
-
}
|
19
|
-
|
20
|
-
Object.defineProperties(TerrainProvider.prototype, {
|
21
|
-
/**
|
22
|
-
* Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
|
23
|
-
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
24
|
-
* are passed an instance of {@link TileProviderError}.
|
25
|
-
* @memberof TerrainProvider.prototype
|
26
|
-
* @type {Event<TerrainProvider.ErrorEvent>}
|
27
|
-
* @readonly
|
28
|
-
*/
|
29
|
-
errorEvent: {
|
30
|
-
get: Check.DeveloperError.throwInstantiationError,
|
31
|
-
},
|
32
|
-
|
33
|
-
/**
|
34
|
-
* Gets the credit to display when this terrain provider is active. Typically this is used to credit
|
35
|
-
* the source of the terrain.
|
36
|
-
* @memberof TerrainProvider.prototype
|
37
|
-
* @type {Credit}
|
38
|
-
* @readonly
|
39
|
-
*/
|
40
|
-
credit: {
|
41
|
-
get: Check.DeveloperError.throwInstantiationError,
|
42
|
-
},
|
43
|
-
|
44
|
-
/**
|
45
|
-
* Gets the tiling scheme used by the provider.
|
46
|
-
* @memberof TerrainProvider.prototype
|
47
|
-
* @type {TilingScheme}
|
48
|
-
* @readonly
|
49
|
-
*/
|
50
|
-
tilingScheme: {
|
51
|
-
get: Check.DeveloperError.throwInstantiationError,
|
52
|
-
},
|
53
|
-
|
54
|
-
/**
|
55
|
-
* Gets a value indicating whether or not the provider is ready for use.
|
56
|
-
* @memberof TerrainProvider.prototype
|
57
|
-
* @type {boolean}
|
58
|
-
* @readonly
|
59
|
-
* @deprecated
|
60
|
-
*/
|
61
|
-
ready: {
|
62
|
-
get: Check.DeveloperError.throwInstantiationError,
|
63
|
-
},
|
64
|
-
|
65
|
-
/**
|
66
|
-
* Gets a promise that resolves to true when the provider is ready for use.
|
67
|
-
* @memberof TerrainProvider.prototype
|
68
|
-
* @type {Promise<boolean>}
|
69
|
-
* @readonly
|
70
|
-
* @deprecated
|
71
|
-
*/
|
72
|
-
readyPromise: {
|
73
|
-
get: Check.DeveloperError.throwInstantiationError,
|
74
|
-
},
|
75
|
-
|
76
|
-
/**
|
77
|
-
* Gets a value indicating whether or not the provider includes a water mask. The water mask
|
78
|
-
* indicates which areas of the globe are water rather than land, so they can be rendered
|
79
|
-
* as a reflective surface with animated waves.
|
80
|
-
* @memberof TerrainProvider.prototype
|
81
|
-
* @type {boolean}
|
82
|
-
* @readonly
|
83
|
-
*/
|
84
|
-
hasWaterMask: {
|
85
|
-
get: Check.DeveloperError.throwInstantiationError,
|
86
|
-
},
|
87
|
-
|
88
|
-
/**
|
89
|
-
* Gets a value indicating whether or not the requested tiles include vertex normals.
|
90
|
-
* @memberof TerrainProvider.prototype
|
91
|
-
* @type {boolean}
|
92
|
-
* @readonly
|
93
|
-
*/
|
94
|
-
hasVertexNormals: {
|
95
|
-
get: Check.DeveloperError.throwInstantiationError,
|
96
|
-
},
|
97
|
-
|
98
|
-
/**
|
99
|
-
* Gets an object that can be used to determine availability of terrain from this provider, such as
|
100
|
-
* at points and in rectangles. This property may be undefined if availability
|
101
|
-
* information is not available.
|
102
|
-
* @memberof TerrainProvider.prototype
|
103
|
-
* @type {TileAvailability}
|
104
|
-
* @readonly
|
105
|
-
*/
|
106
|
-
availability: {
|
107
|
-
get: Check.DeveloperError.throwInstantiationError,
|
108
|
-
},
|
109
|
-
});
|
110
|
-
|
111
|
-
const regularGridIndicesCache = [];
|
112
|
-
|
84
|
+
errorEvent: {
|
85
|
+
get: DeveloperError_default.throwInstantiationError
|
86
|
+
},
|
113
87
|
/**
|
114
|
-
* Gets
|
115
|
-
*
|
116
|
-
*
|
117
|
-
*
|
118
|
-
*
|
119
|
-
* @param {number} width The number of vertices in the regular grid in the horizontal direction.
|
120
|
-
* @param {number} height The number of vertices in the regular grid in the vertical direction.
|
121
|
-
* @returns {Uint16Array|Uint32Array} The list of indices. Uint16Array gets returned for 64KB or less and Uint32Array for 4GB or less.
|
88
|
+
* Gets the credit to display when this terrain provider is active. Typically this is used to credit
|
89
|
+
* the source of the terrain.
|
90
|
+
* @memberof TerrainProvider.prototype
|
91
|
+
* @type {Credit}
|
92
|
+
* @readonly
|
122
93
|
*/
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
throw new Check.DeveloperError(
|
127
|
-
"The total number of vertices (width * height) must be less than 4,294,967,296."
|
128
|
-
);
|
129
|
-
}
|
130
|
-
//>>includeEnd('debug');
|
131
|
-
|
132
|
-
let byWidth = regularGridIndicesCache[width];
|
133
|
-
if (!defaultValue.defined(byWidth)) {
|
134
|
-
regularGridIndicesCache[width] = byWidth = [];
|
135
|
-
}
|
136
|
-
|
137
|
-
let indices = byWidth[height];
|
138
|
-
if (!defaultValue.defined(indices)) {
|
139
|
-
if (width * height < Math$1.CesiumMath.SIXTY_FOUR_KILOBYTES) {
|
140
|
-
indices = byWidth[height] = new Uint16Array(
|
141
|
-
(width - 1) * (height - 1) * 6
|
142
|
-
);
|
143
|
-
} else {
|
144
|
-
indices = byWidth[height] = new Uint32Array(
|
145
|
-
(width - 1) * (height - 1) * 6
|
146
|
-
);
|
147
|
-
}
|
148
|
-
addRegularGridIndices(width, height, indices, 0);
|
149
|
-
}
|
150
|
-
|
151
|
-
return indices;
|
152
|
-
};
|
153
|
-
|
154
|
-
const regularGridAndEdgeIndicesCache = [];
|
155
|
-
|
94
|
+
credit: {
|
95
|
+
get: DeveloperError_default.throwInstantiationError
|
96
|
+
},
|
156
97
|
/**
|
157
|
-
*
|
98
|
+
* Gets the tiling scheme used by the provider.
|
99
|
+
* @memberof TerrainProvider.prototype
|
100
|
+
* @type {TilingScheme}
|
101
|
+
* @readonly
|
158
102
|
*/
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
let indicesAndEdges = byWidth[height];
|
174
|
-
if (!defaultValue.defined(indicesAndEdges)) {
|
175
|
-
const indices = TerrainProvider.getRegularGridIndices(width, height);
|
176
|
-
|
177
|
-
const edgeIndices = getEdgeIndices(width, height);
|
178
|
-
const westIndicesSouthToNorth = edgeIndices.westIndicesSouthToNorth;
|
179
|
-
const southIndicesEastToWest = edgeIndices.southIndicesEastToWest;
|
180
|
-
const eastIndicesNorthToSouth = edgeIndices.eastIndicesNorthToSouth;
|
181
|
-
const northIndicesWestToEast = edgeIndices.northIndicesWestToEast;
|
182
|
-
|
183
|
-
indicesAndEdges = byWidth[height] = {
|
184
|
-
indices: indices,
|
185
|
-
westIndicesSouthToNorth: westIndicesSouthToNorth,
|
186
|
-
southIndicesEastToWest: southIndicesEastToWest,
|
187
|
-
eastIndicesNorthToSouth: eastIndicesNorthToSouth,
|
188
|
-
northIndicesWestToEast: northIndicesWestToEast,
|
189
|
-
};
|
190
|
-
}
|
191
|
-
|
192
|
-
return indicesAndEdges;
|
193
|
-
};
|
194
|
-
|
195
|
-
const regularGridAndSkirtAndEdgeIndicesCache = [];
|
196
|
-
|
103
|
+
tilingScheme: {
|
104
|
+
get: DeveloperError_default.throwInstantiationError
|
105
|
+
},
|
106
|
+
/**
|
107
|
+
* Gets a value indicating whether or not the provider includes a water mask. The water mask
|
108
|
+
* indicates which areas of the globe are water rather than land, so they can be rendered
|
109
|
+
* as a reflective surface with animated waves.
|
110
|
+
* @memberof TerrainProvider.prototype
|
111
|
+
* @type {boolean}
|
112
|
+
* @readonly
|
113
|
+
*/
|
114
|
+
hasWaterMask: {
|
115
|
+
get: DeveloperError_default.throwInstantiationError
|
116
|
+
},
|
197
117
|
/**
|
198
|
-
*
|
118
|
+
* Gets a value indicating whether or not the requested tiles include vertex normals.
|
119
|
+
* @memberof TerrainProvider.prototype
|
120
|
+
* @type {boolean}
|
121
|
+
* @readonly
|
199
122
|
*/
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
123
|
+
hasVertexNormals: {
|
124
|
+
get: DeveloperError_default.throwInstantiationError
|
125
|
+
},
|
126
|
+
/**
|
127
|
+
* Gets an object that can be used to determine availability of terrain from this provider, such as
|
128
|
+
* at points and in rectangles. This property may be undefined if availability
|
129
|
+
* information is not available.
|
130
|
+
* @memberof TerrainProvider.prototype
|
131
|
+
* @type {TileAvailability}
|
132
|
+
* @readonly
|
133
|
+
*/
|
134
|
+
availability: {
|
135
|
+
get: DeveloperError_default.throwInstantiationError
|
136
|
+
}
|
137
|
+
});
|
138
|
+
var regularGridIndicesCache = [];
|
139
|
+
TerrainProvider.getRegularGridIndices = function(width, height) {
|
140
|
+
if (width * height >= Math_default.FOUR_GIGABYTES) {
|
141
|
+
throw new DeveloperError_default(
|
142
|
+
"The total number of vertices (width * height) must be less than 4,294,967,296."
|
143
|
+
);
|
144
|
+
}
|
145
|
+
let byWidth = regularGridIndicesCache[width];
|
146
|
+
if (!defined_default(byWidth)) {
|
147
|
+
regularGridIndicesCache[width] = byWidth = [];
|
148
|
+
}
|
149
|
+
let indices = byWidth[height];
|
150
|
+
if (!defined_default(indices)) {
|
151
|
+
if (width * height < Math_default.SIXTY_FOUR_KILOBYTES) {
|
152
|
+
indices = byWidth[height] = new Uint16Array(
|
153
|
+
(width - 1) * (height - 1) * 6
|
208
154
|
);
|
209
|
-
}
|
210
|
-
|
211
|
-
|
212
|
-
let byWidth = regularGridAndSkirtAndEdgeIndicesCache[width];
|
213
|
-
if (!defaultValue.defined(byWidth)) {
|
214
|
-
regularGridAndSkirtAndEdgeIndicesCache[width] = byWidth = [];
|
215
|
-
}
|
216
|
-
|
217
|
-
let indicesAndEdges = byWidth[height];
|
218
|
-
if (!defaultValue.defined(indicesAndEdges)) {
|
219
|
-
const gridVertexCount = width * height;
|
220
|
-
const gridIndexCount = (width - 1) * (height - 1) * 6;
|
221
|
-
const edgeVertexCount = width * 2 + height * 2;
|
222
|
-
const edgeIndexCount = Math.max(0, edgeVertexCount - 4) * 6;
|
223
|
-
const vertexCount = gridVertexCount + edgeVertexCount;
|
224
|
-
const indexCount = gridIndexCount + edgeIndexCount;
|
225
|
-
|
226
|
-
const edgeIndices = getEdgeIndices(width, height);
|
227
|
-
const westIndicesSouthToNorth = edgeIndices.westIndicesSouthToNorth;
|
228
|
-
const southIndicesEastToWest = edgeIndices.southIndicesEastToWest;
|
229
|
-
const eastIndicesNorthToSouth = edgeIndices.eastIndicesNorthToSouth;
|
230
|
-
const northIndicesWestToEast = edgeIndices.northIndicesWestToEast;
|
231
|
-
|
232
|
-
const indices = IndexDatatype.IndexDatatype.createTypedArray(vertexCount, indexCount);
|
233
|
-
addRegularGridIndices(width, height, indices, 0);
|
234
|
-
TerrainProvider.addSkirtIndices(
|
235
|
-
westIndicesSouthToNorth,
|
236
|
-
southIndicesEastToWest,
|
237
|
-
eastIndicesNorthToSouth,
|
238
|
-
northIndicesWestToEast,
|
239
|
-
gridVertexCount,
|
240
|
-
indices,
|
241
|
-
gridIndexCount
|
155
|
+
} else {
|
156
|
+
indices = byWidth[height] = new Uint32Array(
|
157
|
+
(width - 1) * (height - 1) * 6
|
242
158
|
);
|
243
|
-
|
244
|
-
indicesAndEdges = byWidth[height] = {
|
245
|
-
indices: indices,
|
246
|
-
westIndicesSouthToNorth: westIndicesSouthToNorth,
|
247
|
-
southIndicesEastToWest: southIndicesEastToWest,
|
248
|
-
eastIndicesNorthToSouth: eastIndicesNorthToSouth,
|
249
|
-
northIndicesWestToEast: northIndicesWestToEast,
|
250
|
-
indexCountWithoutSkirts: gridIndexCount,
|
251
|
-
};
|
252
159
|
}
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
southIndicesEastToWest,
|
263
|
-
eastIndicesNorthToSouth,
|
264
|
-
northIndicesWestToEast,
|
265
|
-
vertexCount,
|
266
|
-
indices,
|
267
|
-
offset
|
268
|
-
) {
|
269
|
-
let vertexIndex = vertexCount;
|
270
|
-
offset = addSkirtIndices(
|
271
|
-
westIndicesSouthToNorth,
|
272
|
-
vertexIndex,
|
273
|
-
indices,
|
274
|
-
offset
|
160
|
+
addRegularGridIndices(width, height, indices, 0);
|
161
|
+
}
|
162
|
+
return indices;
|
163
|
+
};
|
164
|
+
var regularGridAndEdgeIndicesCache = [];
|
165
|
+
TerrainProvider.getRegularGridIndicesAndEdgeIndices = function(width, height) {
|
166
|
+
if (width * height >= Math_default.FOUR_GIGABYTES) {
|
167
|
+
throw new DeveloperError_default(
|
168
|
+
"The total number of vertices (width * height) must be less than 4,294,967,296."
|
275
169
|
);
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
170
|
+
}
|
171
|
+
let byWidth = regularGridAndEdgeIndicesCache[width];
|
172
|
+
if (!defined_default(byWidth)) {
|
173
|
+
regularGridAndEdgeIndicesCache[width] = byWidth = [];
|
174
|
+
}
|
175
|
+
let indicesAndEdges = byWidth[height];
|
176
|
+
if (!defined_default(indicesAndEdges)) {
|
177
|
+
const indices = TerrainProvider.getRegularGridIndices(width, height);
|
178
|
+
const edgeIndices = getEdgeIndices(width, height);
|
179
|
+
const westIndicesSouthToNorth = edgeIndices.westIndicesSouthToNorth;
|
180
|
+
const southIndicesEastToWest = edgeIndices.southIndicesEastToWest;
|
181
|
+
const eastIndicesNorthToSouth = edgeIndices.eastIndicesNorthToSouth;
|
182
|
+
const northIndicesWestToEast = edgeIndices.northIndicesWestToEast;
|
183
|
+
indicesAndEdges = byWidth[height] = {
|
280
184
|
indices,
|
281
|
-
|
185
|
+
westIndicesSouthToNorth,
|
186
|
+
southIndicesEastToWest,
|
187
|
+
eastIndicesNorthToSouth,
|
188
|
+
northIndicesWestToEast
|
189
|
+
};
|
190
|
+
}
|
191
|
+
return indicesAndEdges;
|
192
|
+
};
|
193
|
+
var regularGridAndSkirtAndEdgeIndicesCache = [];
|
194
|
+
TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices = function(width, height) {
|
195
|
+
if (width * height >= Math_default.FOUR_GIGABYTES) {
|
196
|
+
throw new DeveloperError_default(
|
197
|
+
"The total number of vertices (width * height) must be less than 4,294,967,296."
|
282
198
|
);
|
283
|
-
|
284
|
-
|
199
|
+
}
|
200
|
+
let byWidth = regularGridAndSkirtAndEdgeIndicesCache[width];
|
201
|
+
if (!defined_default(byWidth)) {
|
202
|
+
regularGridAndSkirtAndEdgeIndicesCache[width] = byWidth = [];
|
203
|
+
}
|
204
|
+
let indicesAndEdges = byWidth[height];
|
205
|
+
if (!defined_default(indicesAndEdges)) {
|
206
|
+
const gridVertexCount = width * height;
|
207
|
+
const gridIndexCount = (width - 1) * (height - 1) * 6;
|
208
|
+
const edgeVertexCount = width * 2 + height * 2;
|
209
|
+
const edgeIndexCount = Math.max(0, edgeVertexCount - 4) * 6;
|
210
|
+
const vertexCount = gridVertexCount + edgeVertexCount;
|
211
|
+
const indexCount = gridIndexCount + edgeIndexCount;
|
212
|
+
const edgeIndices = getEdgeIndices(width, height);
|
213
|
+
const westIndicesSouthToNorth = edgeIndices.westIndicesSouthToNorth;
|
214
|
+
const southIndicesEastToWest = edgeIndices.southIndicesEastToWest;
|
215
|
+
const eastIndicesNorthToSouth = edgeIndices.eastIndicesNorthToSouth;
|
216
|
+
const northIndicesWestToEast = edgeIndices.northIndicesWestToEast;
|
217
|
+
const indices = IndexDatatype_default.createTypedArray(vertexCount, indexCount);
|
218
|
+
addRegularGridIndices(width, height, indices, 0);
|
219
|
+
TerrainProvider.addSkirtIndices(
|
220
|
+
westIndicesSouthToNorth,
|
221
|
+
southIndicesEastToWest,
|
285
222
|
eastIndicesNorthToSouth,
|
286
|
-
|
223
|
+
northIndicesWestToEast,
|
224
|
+
gridVertexCount,
|
287
225
|
indices,
|
288
|
-
|
226
|
+
gridIndexCount
|
289
227
|
);
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
const eastIndicesNorthToSouth = new Array(height);
|
298
|
-
const northIndicesWestToEast = new Array(width);
|
299
|
-
|
300
|
-
let i;
|
301
|
-
for (i = 0; i < width; ++i) {
|
302
|
-
northIndicesWestToEast[i] = i;
|
303
|
-
southIndicesEastToWest[i] = width * height - 1 - i;
|
304
|
-
}
|
305
|
-
|
306
|
-
for (i = 0; i < height; ++i) {
|
307
|
-
eastIndicesNorthToSouth[i] = (i + 1) * width - 1;
|
308
|
-
westIndicesSouthToNorth[i] = (height - i - 1) * width;
|
309
|
-
}
|
310
|
-
|
311
|
-
return {
|
312
|
-
westIndicesSouthToNorth: westIndicesSouthToNorth,
|
313
|
-
southIndicesEastToWest: southIndicesEastToWest,
|
314
|
-
eastIndicesNorthToSouth: eastIndicesNorthToSouth,
|
315
|
-
northIndicesWestToEast: northIndicesWestToEast,
|
228
|
+
indicesAndEdges = byWidth[height] = {
|
229
|
+
indices,
|
230
|
+
westIndicesSouthToNorth,
|
231
|
+
southIndicesEastToWest,
|
232
|
+
eastIndicesNorthToSouth,
|
233
|
+
northIndicesWestToEast,
|
234
|
+
indexCountWithoutSkirts: gridIndexCount
|
316
235
|
};
|
317
236
|
}
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
237
|
+
return indicesAndEdges;
|
238
|
+
};
|
239
|
+
TerrainProvider.addSkirtIndices = function(westIndicesSouthToNorth, southIndicesEastToWest, eastIndicesNorthToSouth, northIndicesWestToEast, vertexCount, indices, offset) {
|
240
|
+
let vertexIndex = vertexCount;
|
241
|
+
offset = addSkirtIndices(
|
242
|
+
westIndicesSouthToNorth,
|
243
|
+
vertexIndex,
|
244
|
+
indices,
|
245
|
+
offset
|
246
|
+
);
|
247
|
+
vertexIndex += westIndicesSouthToNorth.length;
|
248
|
+
offset = addSkirtIndices(
|
249
|
+
southIndicesEastToWest,
|
250
|
+
vertexIndex,
|
251
|
+
indices,
|
252
|
+
offset
|
253
|
+
);
|
254
|
+
vertexIndex += southIndicesEastToWest.length;
|
255
|
+
offset = addSkirtIndices(
|
256
|
+
eastIndicesNorthToSouth,
|
257
|
+
vertexIndex,
|
258
|
+
indices,
|
259
|
+
offset
|
260
|
+
);
|
261
|
+
vertexIndex += eastIndicesNorthToSouth.length;
|
262
|
+
addSkirtIndices(northIndicesWestToEast, vertexIndex, indices, offset);
|
263
|
+
};
|
264
|
+
function getEdgeIndices(width, height) {
|
265
|
+
const westIndicesSouthToNorth = new Array(height);
|
266
|
+
const southIndicesEastToWest = new Array(width);
|
267
|
+
const eastIndicesNorthToSouth = new Array(height);
|
268
|
+
const northIndicesWestToEast = new Array(width);
|
269
|
+
let i;
|
270
|
+
for (i = 0; i < width; ++i) {
|
271
|
+
northIndicesWestToEast[i] = i;
|
272
|
+
southIndicesEastToWest[i] = width * height - 1 - i;
|
339
273
|
}
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
const length = edgeIndices.length;
|
345
|
-
for (let i = 1; i < length; ++i) {
|
346
|
-
const index = edgeIndices[i];
|
347
|
-
|
348
|
-
indices[offset++] = previousIndex;
|
349
|
-
indices[offset++] = index;
|
350
|
-
indices[offset++] = vertexIndex;
|
351
|
-
|
352
|
-
indices[offset++] = vertexIndex;
|
353
|
-
indices[offset++] = index;
|
354
|
-
indices[offset++] = vertexIndex + 1;
|
355
|
-
|
356
|
-
previousIndex = index;
|
357
|
-
++vertexIndex;
|
358
|
-
}
|
359
|
-
|
360
|
-
return offset;
|
274
|
+
for (i = 0; i < height; ++i) {
|
275
|
+
eastIndicesNorthToSouth[i] = (i + 1) * width - 1;
|
276
|
+
westIndicesSouthToNorth[i] = (height - i - 1) * width;
|
361
277
|
}
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
* A value of 0.5 will cut the estimated level zero geometric error in half, allowing twice the
|
368
|
-
* screen pixels between adjacent heightmap vertices and thus rendering more quickly.
|
369
|
-
* @type {number}
|
370
|
-
*/
|
371
|
-
TerrainProvider.heightmapTerrainQuality = 0.25;
|
372
|
-
|
373
|
-
/**
|
374
|
-
* Determines an appropriate geometric error estimate when the geometry comes from a heightmap.
|
375
|
-
*
|
376
|
-
* @param {Ellipsoid} ellipsoid The ellipsoid to which the terrain is attached.
|
377
|
-
* @param {number} tileImageWidth The width, in pixels, of the heightmap associated with a single tile.
|
378
|
-
* @param {number} numberOfTilesAtLevelZero The number of tiles in the horizontal direction at tile level zero.
|
379
|
-
* @returns {number} An estimated geometric error.
|
380
|
-
*/
|
381
|
-
TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap = function (
|
382
|
-
ellipsoid,
|
383
|
-
tileImageWidth,
|
384
|
-
numberOfTilesAtLevelZero
|
385
|
-
) {
|
386
|
-
return (
|
387
|
-
(ellipsoid.maximumRadius *
|
388
|
-
2 *
|
389
|
-
Math.PI *
|
390
|
-
TerrainProvider.heightmapTerrainQuality) /
|
391
|
-
(tileImageWidth * numberOfTilesAtLevelZero)
|
392
|
-
);
|
278
|
+
return {
|
279
|
+
westIndicesSouthToNorth,
|
280
|
+
southIndicesEastToWest,
|
281
|
+
eastIndicesNorthToSouth,
|
282
|
+
northIndicesWestToEast
|
393
283
|
};
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
Check.DeveloperError.throwInstantiationError;
|
411
|
-
|
412
|
-
/**
|
413
|
-
* Gets the maximum geometric error allowed in a tile at a given level.
|
414
|
-
* @function
|
415
|
-
*
|
416
|
-
* @param {number} level The tile level for which to get the maximum geometric error.
|
417
|
-
* @returns {number} The maximum geometric error.
|
418
|
-
*/
|
419
|
-
TerrainProvider.prototype.getLevelMaximumGeometricError =
|
420
|
-
Check.DeveloperError.throwInstantiationError;
|
421
|
-
|
422
|
-
/**
|
423
|
-
* Determines whether data for a tile is available to be loaded.
|
424
|
-
* @function
|
425
|
-
*
|
426
|
-
* @param {number} x The X coordinate of the tile for which to request geometry.
|
427
|
-
* @param {number} y The Y coordinate of the tile for which to request geometry.
|
428
|
-
* @param {number} level The level of the tile for which to request geometry.
|
429
|
-
* @returns {boolean|undefined} Undefined if not supported by the terrain provider, otherwise true or false.
|
430
|
-
*/
|
431
|
-
TerrainProvider.prototype.getTileDataAvailable =
|
432
|
-
Check.DeveloperError.throwInstantiationError;
|
433
|
-
|
434
|
-
/**
|
435
|
-
* Makes sure we load availability data for a tile
|
436
|
-
* @function
|
437
|
-
*
|
438
|
-
* @param {number} x The X coordinate of the tile for which to request geometry.
|
439
|
-
* @param {number} y The Y coordinate of the tile for which to request geometry.
|
440
|
-
* @param {number} level The level of the tile for which to request geometry.
|
441
|
-
* @returns {undefined|Promise<void>} Undefined if nothing need to be loaded or a Promise that resolves when all required tiles are loaded
|
442
|
-
*/
|
443
|
-
TerrainProvider.prototype.loadTileDataAvailability =
|
444
|
-
Check.DeveloperError.throwInstantiationError;
|
445
|
-
|
446
|
-
/**
|
447
|
-
* A function that is called when an error occurs.
|
448
|
-
* @callback TerrainProvider.ErrorEvent
|
449
|
-
*
|
450
|
-
* @this TerrainProvider
|
451
|
-
* @param {TileProviderError} err An object holding details about the error that occurred.
|
452
|
-
*/
|
453
|
-
|
454
|
-
const maxShort = 32767;
|
455
|
-
|
456
|
-
const cartesian3Scratch = new Matrix3.Cartesian3();
|
457
|
-
const scratchMinimum = new Matrix3.Cartesian3();
|
458
|
-
const scratchMaximum = new Matrix3.Cartesian3();
|
459
|
-
const cartographicScratch = new Matrix3.Cartographic();
|
460
|
-
const toPack = new Matrix2.Cartesian2();
|
461
|
-
|
462
|
-
function createVerticesFromQuantizedTerrainMesh(
|
463
|
-
parameters,
|
464
|
-
transferableObjects
|
465
|
-
) {
|
466
|
-
const quantizedVertices = parameters.quantizedVertices;
|
467
|
-
const quantizedVertexCount = quantizedVertices.length / 3;
|
468
|
-
const octEncodedNormals = parameters.octEncodedNormals;
|
469
|
-
const edgeVertexCount =
|
470
|
-
parameters.westIndices.length +
|
471
|
-
parameters.eastIndices.length +
|
472
|
-
parameters.southIndices.length +
|
473
|
-
parameters.northIndices.length;
|
474
|
-
const includeWebMercatorT = parameters.includeWebMercatorT;
|
475
|
-
|
476
|
-
const exaggeration = parameters.exaggeration;
|
477
|
-
const exaggerationRelativeHeight = parameters.exaggerationRelativeHeight;
|
478
|
-
const hasExaggeration = exaggeration !== 1.0;
|
479
|
-
const includeGeodeticSurfaceNormals = hasExaggeration;
|
480
|
-
|
481
|
-
const rectangle = Matrix2.Rectangle.clone(parameters.rectangle);
|
482
|
-
const west = rectangle.west;
|
483
|
-
const south = rectangle.south;
|
484
|
-
const east = rectangle.east;
|
485
|
-
const north = rectangle.north;
|
486
|
-
|
487
|
-
const ellipsoid = Matrix3.Ellipsoid.clone(parameters.ellipsoid);
|
488
|
-
|
489
|
-
const minimumHeight = parameters.minimumHeight;
|
490
|
-
const maximumHeight = parameters.maximumHeight;
|
491
|
-
|
492
|
-
const center = parameters.relativeToCenter;
|
493
|
-
const fromENU = Transforms.Transforms.eastNorthUpToFixedFrame(center, ellipsoid);
|
494
|
-
const toENU = Matrix2.Matrix4.inverseTransformation(fromENU, new Matrix2.Matrix4());
|
495
|
-
|
496
|
-
let southMercatorY;
|
497
|
-
let oneOverMercatorHeight;
|
498
|
-
if (includeWebMercatorT) {
|
499
|
-
southMercatorY = WebMercatorProjection.WebMercatorProjection.geodeticLatitudeToMercatorAngle(
|
500
|
-
south
|
501
|
-
);
|
502
|
-
oneOverMercatorHeight =
|
503
|
-
1.0 /
|
504
|
-
(WebMercatorProjection.WebMercatorProjection.geodeticLatitudeToMercatorAngle(north) -
|
505
|
-
southMercatorY);
|
284
|
+
}
|
285
|
+
function addRegularGridIndices(width, height, indices, offset) {
|
286
|
+
let index = 0;
|
287
|
+
for (let j = 0; j < height - 1; ++j) {
|
288
|
+
for (let i = 0; i < width - 1; ++i) {
|
289
|
+
const upperLeft = index;
|
290
|
+
const lowerLeft = upperLeft + width;
|
291
|
+
const lowerRight = lowerLeft + 1;
|
292
|
+
const upperRight = upperLeft + 1;
|
293
|
+
indices[offset++] = upperLeft;
|
294
|
+
indices[offset++] = lowerLeft;
|
295
|
+
indices[offset++] = upperRight;
|
296
|
+
indices[offset++] = upperRight;
|
297
|
+
indices[offset++] = lowerLeft;
|
298
|
+
indices[offset++] = lowerRight;
|
299
|
+
++index;
|
506
300
|
}
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
301
|
+
++index;
|
302
|
+
}
|
303
|
+
}
|
304
|
+
function addSkirtIndices(edgeIndices, vertexIndex, indices, offset) {
|
305
|
+
let previousIndex = edgeIndices[0];
|
306
|
+
const length = edgeIndices.length;
|
307
|
+
for (let i = 1; i < length; ++i) {
|
308
|
+
const index = edgeIndices[i];
|
309
|
+
indices[offset++] = previousIndex;
|
310
|
+
indices[offset++] = index;
|
311
|
+
indices[offset++] = vertexIndex;
|
312
|
+
indices[offset++] = vertexIndex;
|
313
|
+
indices[offset++] = index;
|
314
|
+
indices[offset++] = vertexIndex + 1;
|
315
|
+
previousIndex = index;
|
316
|
+
++vertexIndex;
|
317
|
+
}
|
318
|
+
return offset;
|
319
|
+
}
|
320
|
+
TerrainProvider.heightmapTerrainQuality = 0.25;
|
321
|
+
TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap = function(ellipsoid, tileImageWidth, numberOfTilesAtLevelZero) {
|
322
|
+
return ellipsoid.maximumRadius * 2 * Math.PI * TerrainProvider.heightmapTerrainQuality / (tileImageWidth * numberOfTilesAtLevelZero);
|
323
|
+
};
|
324
|
+
TerrainProvider.prototype.requestTileGeometry = DeveloperError_default.throwInstantiationError;
|
325
|
+
TerrainProvider.prototype.getLevelMaximumGeometricError = DeveloperError_default.throwInstantiationError;
|
326
|
+
TerrainProvider.prototype.getTileDataAvailable = DeveloperError_default.throwInstantiationError;
|
327
|
+
TerrainProvider.prototype.loadTileDataAvailability = DeveloperError_default.throwInstantiationError;
|
328
|
+
var TerrainProvider_default = TerrainProvider;
|
329
|
+
|
330
|
+
// packages/engine/Source/Workers/createVerticesFromQuantizedTerrainMesh.js
|
331
|
+
var maxShort = 32767;
|
332
|
+
var cartesian3Scratch = new Cartesian3_default();
|
333
|
+
var scratchMinimum = new Cartesian3_default();
|
334
|
+
var scratchMaximum = new Cartesian3_default();
|
335
|
+
var cartographicScratch = new Cartographic_default();
|
336
|
+
var toPack = new Cartesian2_default();
|
337
|
+
function createVerticesFromQuantizedTerrainMesh(parameters, transferableObjects) {
|
338
|
+
const quantizedVertices = parameters.quantizedVertices;
|
339
|
+
const quantizedVertexCount = quantizedVertices.length / 3;
|
340
|
+
const octEncodedNormals = parameters.octEncodedNormals;
|
341
|
+
const edgeVertexCount = parameters.westIndices.length + parameters.eastIndices.length + parameters.southIndices.length + parameters.northIndices.length;
|
342
|
+
const includeWebMercatorT = parameters.includeWebMercatorT;
|
343
|
+
const exaggeration = parameters.exaggeration;
|
344
|
+
const exaggerationRelativeHeight = parameters.exaggerationRelativeHeight;
|
345
|
+
const hasExaggeration = exaggeration !== 1;
|
346
|
+
const includeGeodeticSurfaceNormals = hasExaggeration;
|
347
|
+
const rectangle = Rectangle_default.clone(parameters.rectangle);
|
348
|
+
const west = rectangle.west;
|
349
|
+
const south = rectangle.south;
|
350
|
+
const east = rectangle.east;
|
351
|
+
const north = rectangle.north;
|
352
|
+
const ellipsoid = Ellipsoid_default.clone(parameters.ellipsoid);
|
353
|
+
const minimumHeight = parameters.minimumHeight;
|
354
|
+
const maximumHeight = parameters.maximumHeight;
|
355
|
+
const center = parameters.relativeToCenter;
|
356
|
+
const fromENU = Transforms_default.eastNorthUpToFixedFrame(center, ellipsoid);
|
357
|
+
const toENU = Matrix4_default.inverseTransformation(fromENU, new Matrix4_default());
|
358
|
+
let southMercatorY;
|
359
|
+
let oneOverMercatorHeight;
|
360
|
+
if (includeWebMercatorT) {
|
361
|
+
southMercatorY = WebMercatorProjection_default.geodeticLatitudeToMercatorAngle(
|
362
|
+
south
|
512
363
|
);
|
513
|
-
|
514
|
-
|
515
|
-
|
364
|
+
oneOverMercatorHeight = 1 / (WebMercatorProjection_default.geodeticLatitudeToMercatorAngle(north) - southMercatorY);
|
365
|
+
}
|
366
|
+
const uBuffer = quantizedVertices.subarray(0, quantizedVertexCount);
|
367
|
+
const vBuffer = quantizedVertices.subarray(
|
368
|
+
quantizedVertexCount,
|
369
|
+
2 * quantizedVertexCount
|
370
|
+
);
|
371
|
+
const heightBuffer = quantizedVertices.subarray(
|
372
|
+
quantizedVertexCount * 2,
|
373
|
+
3 * quantizedVertexCount
|
374
|
+
);
|
375
|
+
const hasVertexNormals = defined_default(octEncodedNormals);
|
376
|
+
const uvs = new Array(quantizedVertexCount);
|
377
|
+
const heights = new Array(quantizedVertexCount);
|
378
|
+
const positions = new Array(quantizedVertexCount);
|
379
|
+
const webMercatorTs = includeWebMercatorT ? new Array(quantizedVertexCount) : [];
|
380
|
+
const geodeticSurfaceNormals = includeGeodeticSurfaceNormals ? new Array(quantizedVertexCount) : [];
|
381
|
+
const minimum = scratchMinimum;
|
382
|
+
minimum.x = Number.POSITIVE_INFINITY;
|
383
|
+
minimum.y = Number.POSITIVE_INFINITY;
|
384
|
+
minimum.z = Number.POSITIVE_INFINITY;
|
385
|
+
const maximum = scratchMaximum;
|
386
|
+
maximum.x = Number.NEGATIVE_INFINITY;
|
387
|
+
maximum.y = Number.NEGATIVE_INFINITY;
|
388
|
+
maximum.z = Number.NEGATIVE_INFINITY;
|
389
|
+
let minLongitude = Number.POSITIVE_INFINITY;
|
390
|
+
let maxLongitude = Number.NEGATIVE_INFINITY;
|
391
|
+
let minLatitude = Number.POSITIVE_INFINITY;
|
392
|
+
let maxLatitude = Number.NEGATIVE_INFINITY;
|
393
|
+
for (let i = 0; i < quantizedVertexCount; ++i) {
|
394
|
+
const rawU = uBuffer[i];
|
395
|
+
const rawV = vBuffer[i];
|
396
|
+
const u = rawU / maxShort;
|
397
|
+
const v = rawV / maxShort;
|
398
|
+
const height = Math_default.lerp(
|
399
|
+
minimumHeight,
|
400
|
+
maximumHeight,
|
401
|
+
heightBuffer[i] / maxShort
|
516
402
|
);
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
minimum.z = Number.POSITIVE_INFINITY;
|
533
|
-
|
534
|
-
const maximum = scratchMaximum;
|
535
|
-
maximum.x = Number.NEGATIVE_INFINITY;
|
536
|
-
maximum.y = Number.NEGATIVE_INFINITY;
|
537
|
-
maximum.z = Number.NEGATIVE_INFINITY;
|
538
|
-
|
539
|
-
let minLongitude = Number.POSITIVE_INFINITY;
|
540
|
-
let maxLongitude = Number.NEGATIVE_INFINITY;
|
541
|
-
let minLatitude = Number.POSITIVE_INFINITY;
|
542
|
-
let maxLatitude = Number.NEGATIVE_INFINITY;
|
543
|
-
|
544
|
-
for (let i = 0; i < quantizedVertexCount; ++i) {
|
545
|
-
const rawU = uBuffer[i];
|
546
|
-
const rawV = vBuffer[i];
|
547
|
-
|
548
|
-
const u = rawU / maxShort;
|
549
|
-
const v = rawV / maxShort;
|
550
|
-
const height = Math$1.CesiumMath.lerp(
|
551
|
-
minimumHeight,
|
552
|
-
maximumHeight,
|
553
|
-
heightBuffer[i] / maxShort
|
554
|
-
);
|
555
|
-
|
556
|
-
cartographicScratch.longitude = Math$1.CesiumMath.lerp(west, east, u);
|
557
|
-
cartographicScratch.latitude = Math$1.CesiumMath.lerp(south, north, v);
|
558
|
-
cartographicScratch.height = height;
|
559
|
-
|
560
|
-
minLongitude = Math.min(cartographicScratch.longitude, minLongitude);
|
561
|
-
maxLongitude = Math.max(cartographicScratch.longitude, maxLongitude);
|
562
|
-
minLatitude = Math.min(cartographicScratch.latitude, minLatitude);
|
563
|
-
maxLatitude = Math.max(cartographicScratch.latitude, maxLatitude);
|
564
|
-
|
565
|
-
const position = ellipsoid.cartographicToCartesian(cartographicScratch);
|
566
|
-
|
567
|
-
uvs[i] = new Matrix2.Cartesian2(u, v);
|
568
|
-
heights[i] = height;
|
569
|
-
positions[i] = position;
|
570
|
-
|
571
|
-
if (includeWebMercatorT) {
|
572
|
-
webMercatorTs[i] =
|
573
|
-
(WebMercatorProjection.WebMercatorProjection.geodeticLatitudeToMercatorAngle(
|
574
|
-
cartographicScratch.latitude
|
575
|
-
) -
|
576
|
-
southMercatorY) *
|
577
|
-
oneOverMercatorHeight;
|
578
|
-
}
|
579
|
-
|
580
|
-
if (includeGeodeticSurfaceNormals) {
|
581
|
-
geodeticSurfaceNormals[i] = ellipsoid.geodeticSurfaceNormal(position);
|
582
|
-
}
|
583
|
-
|
584
|
-
Matrix2.Matrix4.multiplyByPoint(toENU, position, cartesian3Scratch);
|
585
|
-
|
586
|
-
Matrix3.Cartesian3.minimumByComponent(cartesian3Scratch, minimum, minimum);
|
587
|
-
Matrix3.Cartesian3.maximumByComponent(cartesian3Scratch, maximum, maximum);
|
403
|
+
cartographicScratch.longitude = Math_default.lerp(west, east, u);
|
404
|
+
cartographicScratch.latitude = Math_default.lerp(south, north, v);
|
405
|
+
cartographicScratch.height = height;
|
406
|
+
minLongitude = Math.min(cartographicScratch.longitude, minLongitude);
|
407
|
+
maxLongitude = Math.max(cartographicScratch.longitude, maxLongitude);
|
408
|
+
minLatitude = Math.min(cartographicScratch.latitude, minLatitude);
|
409
|
+
maxLatitude = Math.max(cartographicScratch.latitude, maxLatitude);
|
410
|
+
const position = ellipsoid.cartographicToCartesian(cartographicScratch);
|
411
|
+
uvs[i] = new Cartesian2_default(u, v);
|
412
|
+
heights[i] = height;
|
413
|
+
positions[i] = position;
|
414
|
+
if (includeWebMercatorT) {
|
415
|
+
webMercatorTs[i] = (WebMercatorProjection_default.geodeticLatitudeToMercatorAngle(
|
416
|
+
cartographicScratch.latitude
|
417
|
+
) - southMercatorY) * oneOverMercatorHeight;
|
588
418
|
}
|
589
|
-
|
590
|
-
|
591
|
-
a,
|
592
|
-
b
|
593
|
-
) {
|
594
|
-
return uvs[a].y - uvs[b].y;
|
595
|
-
});
|
596
|
-
const eastIndicesNorthToSouth = copyAndSort(parameters.eastIndices, function (
|
597
|
-
a,
|
598
|
-
b
|
599
|
-
) {
|
600
|
-
return uvs[b].y - uvs[a].y;
|
601
|
-
});
|
602
|
-
const southIndicesEastToWest = copyAndSort(parameters.southIndices, function (
|
603
|
-
a,
|
604
|
-
b
|
605
|
-
) {
|
606
|
-
return uvs[b].x - uvs[a].x;
|
607
|
-
});
|
608
|
-
const northIndicesWestToEast = copyAndSort(parameters.northIndices, function (
|
609
|
-
a,
|
610
|
-
b
|
611
|
-
) {
|
612
|
-
return uvs[a].x - uvs[b].x;
|
613
|
-
});
|
614
|
-
|
615
|
-
let occludeePointInScaledSpace;
|
616
|
-
if (minimumHeight < 0.0) {
|
617
|
-
// Horizon culling point needs to be recomputed since the tile is at least partly under the ellipsoid.
|
618
|
-
const occluder = new TerrainEncoding.EllipsoidalOccluder(ellipsoid);
|
619
|
-
occludeePointInScaledSpace = occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
|
620
|
-
center,
|
621
|
-
positions,
|
622
|
-
minimumHeight
|
623
|
-
);
|
419
|
+
if (includeGeodeticSurfaceNormals) {
|
420
|
+
geodeticSurfaceNormals[i] = ellipsoid.geodeticSurfaceNormal(position);
|
624
421
|
}
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
parameters.southSkirtHeight,
|
646
|
-
heights,
|
647
|
-
uvs,
|
648
|
-
rectangle,
|
649
|
-
ellipsoid,
|
650
|
-
toENU,
|
651
|
-
minimum,
|
652
|
-
maximum
|
653
|
-
)
|
654
|
-
);
|
655
|
-
hMin = Math.min(
|
656
|
-
hMin,
|
657
|
-
findMinMaxSkirts(
|
658
|
-
parameters.eastIndices,
|
659
|
-
parameters.eastSkirtHeight,
|
660
|
-
heights,
|
661
|
-
uvs,
|
662
|
-
rectangle,
|
663
|
-
ellipsoid,
|
664
|
-
toENU,
|
665
|
-
minimum,
|
666
|
-
maximum
|
667
|
-
)
|
668
|
-
);
|
669
|
-
hMin = Math.min(
|
670
|
-
hMin,
|
671
|
-
findMinMaxSkirts(
|
672
|
-
parameters.northIndices,
|
673
|
-
parameters.northSkirtHeight,
|
674
|
-
heights,
|
675
|
-
uvs,
|
676
|
-
rectangle,
|
677
|
-
ellipsoid,
|
678
|
-
toENU,
|
679
|
-
minimum,
|
680
|
-
maximum
|
681
|
-
)
|
682
|
-
);
|
683
|
-
|
684
|
-
const aaBox = new AxisAlignedBoundingBox.AxisAlignedBoundingBox(minimum, maximum, center);
|
685
|
-
const encoding = new TerrainEncoding.TerrainEncoding(
|
422
|
+
Matrix4_default.multiplyByPoint(toENU, position, cartesian3Scratch);
|
423
|
+
Cartesian3_default.minimumByComponent(cartesian3Scratch, minimum, minimum);
|
424
|
+
Cartesian3_default.maximumByComponent(cartesian3Scratch, maximum, maximum);
|
425
|
+
}
|
426
|
+
const westIndicesSouthToNorth = copyAndSort(parameters.westIndices, function(a, b) {
|
427
|
+
return uvs[a].y - uvs[b].y;
|
428
|
+
});
|
429
|
+
const eastIndicesNorthToSouth = copyAndSort(parameters.eastIndices, function(a, b) {
|
430
|
+
return uvs[b].y - uvs[a].y;
|
431
|
+
});
|
432
|
+
const southIndicesEastToWest = copyAndSort(parameters.southIndices, function(a, b) {
|
433
|
+
return uvs[b].x - uvs[a].x;
|
434
|
+
});
|
435
|
+
const northIndicesWestToEast = copyAndSort(parameters.northIndices, function(a, b) {
|
436
|
+
return uvs[a].x - uvs[b].x;
|
437
|
+
});
|
438
|
+
let occludeePointInScaledSpace;
|
439
|
+
if (minimumHeight < 0) {
|
440
|
+
const occluder = new EllipsoidalOccluder_default(ellipsoid);
|
441
|
+
occludeePointInScaledSpace = occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
|
686
442
|
center,
|
687
|
-
|
688
|
-
|
689
|
-
maximumHeight,
|
690
|
-
fromENU,
|
691
|
-
hasVertexNormals,
|
692
|
-
includeWebMercatorT,
|
693
|
-
includeGeodeticSurfaceNormals,
|
694
|
-
exaggeration,
|
695
|
-
exaggerationRelativeHeight
|
443
|
+
positions,
|
444
|
+
minimumHeight
|
696
445
|
);
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
for (let j = 0; j < quantizedVertexCount; ++j) {
|
704
|
-
if (hasVertexNormals) {
|
705
|
-
const n = j * 2.0;
|
706
|
-
toPack.x = octEncodedNormals[n];
|
707
|
-
toPack.y = octEncodedNormals[n + 1];
|
708
|
-
}
|
709
|
-
|
710
|
-
bufferIndex = encoding.encode(
|
711
|
-
vertexBuffer,
|
712
|
-
bufferIndex,
|
713
|
-
positions[j],
|
714
|
-
uvs[j],
|
715
|
-
heights[j],
|
716
|
-
toPack,
|
717
|
-
webMercatorTs[j],
|
718
|
-
geodeticSurfaceNormals[j]
|
719
|
-
);
|
720
|
-
}
|
721
|
-
|
722
|
-
const edgeTriangleCount = Math.max(0, (edgeVertexCount - 4) * 2);
|
723
|
-
const indexBufferLength = parameters.indices.length + edgeTriangleCount * 3;
|
724
|
-
const indexBuffer = IndexDatatype.IndexDatatype.createTypedArray(
|
725
|
-
quantizedVertexCount + edgeVertexCount,
|
726
|
-
indexBufferLength
|
727
|
-
);
|
728
|
-
indexBuffer.set(parameters.indices, 0);
|
729
|
-
|
730
|
-
const percentage = 0.0001;
|
731
|
-
const lonOffset = (maxLongitude - minLongitude) * percentage;
|
732
|
-
const latOffset = (maxLatitude - minLatitude) * percentage;
|
733
|
-
const westLongitudeOffset = -lonOffset;
|
734
|
-
const westLatitudeOffset = 0.0;
|
735
|
-
const eastLongitudeOffset = lonOffset;
|
736
|
-
const eastLatitudeOffset = 0.0;
|
737
|
-
const northLongitudeOffset = 0.0;
|
738
|
-
const northLatitudeOffset = latOffset;
|
739
|
-
const southLongitudeOffset = 0.0;
|
740
|
-
const southLatitudeOffset = -latOffset;
|
741
|
-
|
742
|
-
// Add skirts.
|
743
|
-
let vertexBufferIndex = quantizedVertexCount * vertexStride;
|
744
|
-
addSkirt(
|
745
|
-
vertexBuffer,
|
746
|
-
vertexBufferIndex,
|
747
|
-
westIndicesSouthToNorth,
|
748
|
-
encoding,
|
749
|
-
heights,
|
750
|
-
uvs,
|
751
|
-
octEncodedNormals,
|
752
|
-
ellipsoid,
|
753
|
-
rectangle,
|
446
|
+
}
|
447
|
+
let hMin = minimumHeight;
|
448
|
+
hMin = Math.min(
|
449
|
+
hMin,
|
450
|
+
findMinMaxSkirts(
|
451
|
+
parameters.westIndices,
|
754
452
|
parameters.westSkirtHeight,
|
755
|
-
southMercatorY,
|
756
|
-
oneOverMercatorHeight,
|
757
|
-
westLongitudeOffset,
|
758
|
-
westLatitudeOffset
|
759
|
-
);
|
760
|
-
vertexBufferIndex += parameters.westIndices.length * vertexStride;
|
761
|
-
addSkirt(
|
762
|
-
vertexBuffer,
|
763
|
-
vertexBufferIndex,
|
764
|
-
southIndicesEastToWest,
|
765
|
-
encoding,
|
766
453
|
heights,
|
767
454
|
uvs,
|
768
|
-
octEncodedNormals,
|
769
|
-
ellipsoid,
|
770
455
|
rectangle,
|
456
|
+
ellipsoid,
|
457
|
+
toENU,
|
458
|
+
minimum,
|
459
|
+
maximum
|
460
|
+
)
|
461
|
+
);
|
462
|
+
hMin = Math.min(
|
463
|
+
hMin,
|
464
|
+
findMinMaxSkirts(
|
465
|
+
parameters.southIndices,
|
771
466
|
parameters.southSkirtHeight,
|
772
|
-
southMercatorY,
|
773
|
-
oneOverMercatorHeight,
|
774
|
-
southLongitudeOffset,
|
775
|
-
southLatitudeOffset
|
776
|
-
);
|
777
|
-
vertexBufferIndex += parameters.southIndices.length * vertexStride;
|
778
|
-
addSkirt(
|
779
|
-
vertexBuffer,
|
780
|
-
vertexBufferIndex,
|
781
|
-
eastIndicesNorthToSouth,
|
782
|
-
encoding,
|
783
467
|
heights,
|
784
468
|
uvs,
|
785
|
-
octEncodedNormals,
|
786
|
-
ellipsoid,
|
787
469
|
rectangle,
|
470
|
+
ellipsoid,
|
471
|
+
toENU,
|
472
|
+
minimum,
|
473
|
+
maximum
|
474
|
+
)
|
475
|
+
);
|
476
|
+
hMin = Math.min(
|
477
|
+
hMin,
|
478
|
+
findMinMaxSkirts(
|
479
|
+
parameters.eastIndices,
|
788
480
|
parameters.eastSkirtHeight,
|
789
|
-
southMercatorY,
|
790
|
-
oneOverMercatorHeight,
|
791
|
-
eastLongitudeOffset,
|
792
|
-
eastLatitudeOffset
|
793
|
-
);
|
794
|
-
vertexBufferIndex += parameters.eastIndices.length * vertexStride;
|
795
|
-
addSkirt(
|
796
|
-
vertexBuffer,
|
797
|
-
vertexBufferIndex,
|
798
|
-
northIndicesWestToEast,
|
799
|
-
encoding,
|
800
481
|
heights,
|
801
482
|
uvs,
|
802
|
-
octEncodedNormals,
|
803
|
-
ellipsoid,
|
804
483
|
rectangle,
|
484
|
+
ellipsoid,
|
485
|
+
toENU,
|
486
|
+
minimum,
|
487
|
+
maximum
|
488
|
+
)
|
489
|
+
);
|
490
|
+
hMin = Math.min(
|
491
|
+
hMin,
|
492
|
+
findMinMaxSkirts(
|
493
|
+
parameters.northIndices,
|
805
494
|
parameters.northSkirtHeight,
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
495
|
+
heights,
|
496
|
+
uvs,
|
497
|
+
rectangle,
|
498
|
+
ellipsoid,
|
499
|
+
toENU,
|
500
|
+
minimum,
|
501
|
+
maximum
|
502
|
+
)
|
503
|
+
);
|
504
|
+
const aaBox = new AxisAlignedBoundingBox_default(minimum, maximum, center);
|
505
|
+
const encoding = new TerrainEncoding_default(
|
506
|
+
center,
|
507
|
+
aaBox,
|
508
|
+
hMin,
|
509
|
+
maximumHeight,
|
510
|
+
fromENU,
|
511
|
+
hasVertexNormals,
|
512
|
+
includeWebMercatorT,
|
513
|
+
includeGeodeticSurfaceNormals,
|
514
|
+
exaggeration,
|
515
|
+
exaggerationRelativeHeight
|
516
|
+
);
|
517
|
+
const vertexStride = encoding.stride;
|
518
|
+
const size = quantizedVertexCount * vertexStride + edgeVertexCount * vertexStride;
|
519
|
+
const vertexBuffer = new Float32Array(size);
|
520
|
+
let bufferIndex = 0;
|
521
|
+
for (let j = 0; j < quantizedVertexCount; ++j) {
|
522
|
+
if (hasVertexNormals) {
|
523
|
+
const n = j * 2;
|
524
|
+
toPack.x = octEncodedNormals[n];
|
525
|
+
toPack.y = octEncodedNormals[n + 1];
|
526
|
+
}
|
527
|
+
bufferIndex = encoding.encode(
|
528
|
+
vertexBuffer,
|
529
|
+
bufferIndex,
|
530
|
+
positions[j],
|
531
|
+
uvs[j],
|
532
|
+
heights[j],
|
533
|
+
toPack,
|
534
|
+
webMercatorTs[j],
|
535
|
+
geodeticSurfaceNormals[j]
|
820
536
|
);
|
821
|
-
|
822
|
-
transferableObjects.push(vertexBuffer.buffer, indexBuffer.buffer);
|
823
|
-
|
824
|
-
return {
|
825
|
-
vertices: vertexBuffer.buffer,
|
826
|
-
indices: indexBuffer.buffer,
|
827
|
-
westIndicesSouthToNorth: westIndicesSouthToNorth,
|
828
|
-
southIndicesEastToWest: southIndicesEastToWest,
|
829
|
-
eastIndicesNorthToSouth: eastIndicesNorthToSouth,
|
830
|
-
northIndicesWestToEast: northIndicesWestToEast,
|
831
|
-
vertexStride: vertexStride,
|
832
|
-
center: center,
|
833
|
-
minimumHeight: minimumHeight,
|
834
|
-
maximumHeight: maximumHeight,
|
835
|
-
occludeePointInScaledSpace: occludeePointInScaledSpace,
|
836
|
-
encoding: encoding,
|
837
|
-
indexCountWithoutSkirts: parameters.indices.length,
|
838
|
-
};
|
839
537
|
}
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
538
|
+
const edgeTriangleCount = Math.max(0, (edgeVertexCount - 4) * 2);
|
539
|
+
const indexBufferLength = parameters.indices.length + edgeTriangleCount * 3;
|
540
|
+
const indexBuffer = IndexDatatype_default.createTypedArray(
|
541
|
+
quantizedVertexCount + edgeVertexCount,
|
542
|
+
indexBufferLength
|
543
|
+
);
|
544
|
+
indexBuffer.set(parameters.indices, 0);
|
545
|
+
const percentage = 1e-4;
|
546
|
+
const lonOffset = (maxLongitude - minLongitude) * percentage;
|
547
|
+
const latOffset = (maxLatitude - minLatitude) * percentage;
|
548
|
+
const westLongitudeOffset = -lonOffset;
|
549
|
+
const westLatitudeOffset = 0;
|
550
|
+
const eastLongitudeOffset = lonOffset;
|
551
|
+
const eastLatitudeOffset = 0;
|
552
|
+
const northLongitudeOffset = 0;
|
553
|
+
const northLatitudeOffset = latOffset;
|
554
|
+
const southLongitudeOffset = 0;
|
555
|
+
const southLatitudeOffset = -latOffset;
|
556
|
+
let vertexBufferIndex = quantizedVertexCount * vertexStride;
|
557
|
+
addSkirt(
|
558
|
+
vertexBuffer,
|
559
|
+
vertexBufferIndex,
|
560
|
+
westIndicesSouthToNorth,
|
561
|
+
encoding,
|
844
562
|
heights,
|
845
563
|
uvs,
|
564
|
+
octEncodedNormals,
|
565
|
+
ellipsoid,
|
846
566
|
rectangle,
|
567
|
+
parameters.westSkirtHeight,
|
568
|
+
southMercatorY,
|
569
|
+
oneOverMercatorHeight,
|
570
|
+
westLongitudeOffset,
|
571
|
+
westLatitudeOffset
|
572
|
+
);
|
573
|
+
vertexBufferIndex += parameters.westIndices.length * vertexStride;
|
574
|
+
addSkirt(
|
575
|
+
vertexBuffer,
|
576
|
+
vertexBufferIndex,
|
577
|
+
southIndicesEastToWest,
|
578
|
+
encoding,
|
579
|
+
heights,
|
580
|
+
uvs,
|
581
|
+
octEncodedNormals,
|
847
582
|
ellipsoid,
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
const west = rectangle.west;
|
858
|
-
|
859
|
-
if (east < west) {
|
860
|
-
east += Math$1.CesiumMath.TWO_PI;
|
861
|
-
}
|
862
|
-
|
863
|
-
const length = edgeIndices.length;
|
864
|
-
for (let i = 0; i < length; ++i) {
|
865
|
-
const index = edgeIndices[i];
|
866
|
-
const h = heights[index];
|
867
|
-
const uv = uvs[index];
|
868
|
-
|
869
|
-
cartographicScratch.longitude = Math$1.CesiumMath.lerp(west, east, uv.x);
|
870
|
-
cartographicScratch.latitude = Math$1.CesiumMath.lerp(south, north, uv.y);
|
871
|
-
cartographicScratch.height = h - edgeHeight;
|
872
|
-
|
873
|
-
const position = ellipsoid.cartographicToCartesian(
|
874
|
-
cartographicScratch,
|
875
|
-
cartesian3Scratch
|
876
|
-
);
|
877
|
-
Matrix2.Matrix4.multiplyByPoint(toENU, position, position);
|
878
|
-
|
879
|
-
Matrix3.Cartesian3.minimumByComponent(position, minimum, minimum);
|
880
|
-
Matrix3.Cartesian3.maximumByComponent(position, maximum, maximum);
|
881
|
-
|
882
|
-
hMin = Math.min(hMin, cartographicScratch.height);
|
883
|
-
}
|
884
|
-
return hMin;
|
885
|
-
}
|
886
|
-
|
887
|
-
function addSkirt(
|
583
|
+
rectangle,
|
584
|
+
parameters.southSkirtHeight,
|
585
|
+
southMercatorY,
|
586
|
+
oneOverMercatorHeight,
|
587
|
+
southLongitudeOffset,
|
588
|
+
southLatitudeOffset
|
589
|
+
);
|
590
|
+
vertexBufferIndex += parameters.southIndices.length * vertexStride;
|
591
|
+
addSkirt(
|
888
592
|
vertexBuffer,
|
889
593
|
vertexBufferIndex,
|
890
|
-
|
594
|
+
eastIndicesNorthToSouth,
|
891
595
|
encoding,
|
892
596
|
heights,
|
893
597
|
uvs,
|
894
598
|
octEncodedNormals,
|
895
599
|
ellipsoid,
|
896
600
|
rectangle,
|
897
|
-
|
601
|
+
parameters.eastSkirtHeight,
|
898
602
|
southMercatorY,
|
899
603
|
oneOverMercatorHeight,
|
900
|
-
|
901
|
-
|
902
|
-
)
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
604
|
+
eastLongitudeOffset,
|
605
|
+
eastLatitudeOffset
|
606
|
+
);
|
607
|
+
vertexBufferIndex += parameters.eastIndices.length * vertexStride;
|
608
|
+
addSkirt(
|
609
|
+
vertexBuffer,
|
610
|
+
vertexBufferIndex,
|
611
|
+
northIndicesWestToEast,
|
612
|
+
encoding,
|
613
|
+
heights,
|
614
|
+
uvs,
|
615
|
+
octEncodedNormals,
|
616
|
+
ellipsoid,
|
617
|
+
rectangle,
|
618
|
+
parameters.northSkirtHeight,
|
619
|
+
southMercatorY,
|
620
|
+
oneOverMercatorHeight,
|
621
|
+
northLongitudeOffset,
|
622
|
+
northLatitudeOffset
|
623
|
+
);
|
624
|
+
TerrainProvider_default.addSkirtIndices(
|
625
|
+
westIndicesSouthToNorth,
|
626
|
+
southIndicesEastToWest,
|
627
|
+
eastIndicesNorthToSouth,
|
628
|
+
northIndicesWestToEast,
|
629
|
+
quantizedVertexCount,
|
630
|
+
indexBuffer,
|
631
|
+
parameters.indices.length
|
632
|
+
);
|
633
|
+
transferableObjects.push(vertexBuffer.buffer, indexBuffer.buffer);
|
634
|
+
return {
|
635
|
+
vertices: vertexBuffer.buffer,
|
636
|
+
indices: indexBuffer.buffer,
|
637
|
+
westIndicesSouthToNorth,
|
638
|
+
southIndicesEastToWest,
|
639
|
+
eastIndicesNorthToSouth,
|
640
|
+
northIndicesWestToEast,
|
641
|
+
vertexStride,
|
642
|
+
center,
|
643
|
+
minimumHeight,
|
644
|
+
maximumHeight,
|
645
|
+
occludeePointInScaledSpace,
|
646
|
+
encoding,
|
647
|
+
indexCountWithoutSkirts: parameters.indices.length
|
648
|
+
};
|
649
|
+
}
|
650
|
+
function findMinMaxSkirts(edgeIndices, edgeHeight, heights, uvs, rectangle, ellipsoid, toENU, minimum, maximum) {
|
651
|
+
let hMin = Number.POSITIVE_INFINITY;
|
652
|
+
const north = rectangle.north;
|
653
|
+
const south = rectangle.south;
|
654
|
+
let east = rectangle.east;
|
655
|
+
const west = rectangle.west;
|
656
|
+
if (east < west) {
|
657
|
+
east += Math_default.TWO_PI;
|
658
|
+
}
|
659
|
+
const length = edgeIndices.length;
|
660
|
+
for (let i = 0; i < length; ++i) {
|
661
|
+
const index = edgeIndices[i];
|
662
|
+
const h = heights[index];
|
663
|
+
const uv = uvs[index];
|
664
|
+
cartographicScratch.longitude = Math_default.lerp(west, east, uv.x);
|
665
|
+
cartographicScratch.latitude = Math_default.lerp(south, north, uv.y);
|
666
|
+
cartographicScratch.height = h - edgeHeight;
|
667
|
+
const position = ellipsoid.cartographicToCartesian(
|
668
|
+
cartographicScratch,
|
669
|
+
cartesian3Scratch
|
670
|
+
);
|
671
|
+
Matrix4_default.multiplyByPoint(toENU, position, position);
|
672
|
+
Cartesian3_default.minimumByComponent(position, minimum, minimum);
|
673
|
+
Cartesian3_default.maximumByComponent(position, maximum, maximum);
|
674
|
+
hMin = Math.min(hMin, cartographicScratch.height);
|
675
|
+
}
|
676
|
+
return hMin;
|
677
|
+
}
|
678
|
+
function addSkirt(vertexBuffer, vertexBufferIndex, edgeVertices, encoding, heights, uvs, octEncodedNormals, ellipsoid, rectangle, skirtLength, southMercatorY, oneOverMercatorHeight, longitudeOffset, latitudeOffset) {
|
679
|
+
const hasVertexNormals = defined_default(octEncodedNormals);
|
680
|
+
const north = rectangle.north;
|
681
|
+
const south = rectangle.south;
|
682
|
+
let east = rectangle.east;
|
683
|
+
const west = rectangle.west;
|
684
|
+
if (east < west) {
|
685
|
+
east += Math_default.TWO_PI;
|
686
|
+
}
|
687
|
+
const length = edgeVertices.length;
|
688
|
+
for (let i = 0; i < length; ++i) {
|
689
|
+
const index = edgeVertices[i];
|
690
|
+
const h = heights[index];
|
691
|
+
const uv = uvs[index];
|
692
|
+
cartographicScratch.longitude = Math_default.lerp(west, east, uv.x) + longitudeOffset;
|
693
|
+
cartographicScratch.latitude = Math_default.lerp(south, north, uv.y) + latitudeOffset;
|
694
|
+
cartographicScratch.height = h - skirtLength;
|
695
|
+
const position = ellipsoid.cartographicToCartesian(
|
696
|
+
cartographicScratch,
|
697
|
+
cartesian3Scratch
|
698
|
+
);
|
699
|
+
if (hasVertexNormals) {
|
700
|
+
const n = index * 2;
|
701
|
+
toPack.x = octEncodedNormals[n];
|
702
|
+
toPack.y = octEncodedNormals[n + 1];
|
912
703
|
}
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
const uv = uvs[index];
|
919
|
-
|
920
|
-
cartographicScratch.longitude =
|
921
|
-
Math$1.CesiumMath.lerp(west, east, uv.x) + longitudeOffset;
|
922
|
-
cartographicScratch.latitude =
|
923
|
-
Math$1.CesiumMath.lerp(south, north, uv.y) + latitudeOffset;
|
924
|
-
cartographicScratch.height = h - skirtLength;
|
925
|
-
|
926
|
-
const position = ellipsoid.cartographicToCartesian(
|
927
|
-
cartographicScratch,
|
928
|
-
cartesian3Scratch
|
929
|
-
);
|
930
|
-
|
931
|
-
if (hasVertexNormals) {
|
932
|
-
const n = index * 2.0;
|
933
|
-
toPack.x = octEncodedNormals[n];
|
934
|
-
toPack.y = octEncodedNormals[n + 1];
|
935
|
-
}
|
936
|
-
|
937
|
-
let webMercatorT;
|
938
|
-
if (encoding.hasWebMercatorT) {
|
939
|
-
webMercatorT =
|
940
|
-
(WebMercatorProjection.WebMercatorProjection.geodeticLatitudeToMercatorAngle(
|
941
|
-
cartographicScratch.latitude
|
942
|
-
) -
|
943
|
-
southMercatorY) *
|
944
|
-
oneOverMercatorHeight;
|
945
|
-
}
|
946
|
-
|
947
|
-
let geodeticSurfaceNormal;
|
948
|
-
if (encoding.hasGeodeticSurfaceNormals) {
|
949
|
-
geodeticSurfaceNormal = ellipsoid.geodeticSurfaceNormal(position);
|
950
|
-
}
|
951
|
-
|
952
|
-
vertexBufferIndex = encoding.encode(
|
953
|
-
vertexBuffer,
|
954
|
-
vertexBufferIndex,
|
955
|
-
position,
|
956
|
-
uv,
|
957
|
-
cartographicScratch.height,
|
958
|
-
toPack,
|
959
|
-
webMercatorT,
|
960
|
-
geodeticSurfaceNormal
|
961
|
-
);
|
704
|
+
let webMercatorT;
|
705
|
+
if (encoding.hasWebMercatorT) {
|
706
|
+
webMercatorT = (WebMercatorProjection_default.geodeticLatitudeToMercatorAngle(
|
707
|
+
cartographicScratch.latitude
|
708
|
+
) - southMercatorY) * oneOverMercatorHeight;
|
962
709
|
}
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
let copy;
|
967
|
-
if (typeof typedArray.slice === "function") {
|
968
|
-
copy = typedArray.slice();
|
969
|
-
if (typeof copy.sort !== "function") {
|
970
|
-
// Sliced typed array isn't sortable, so we can't use it.
|
971
|
-
copy = undefined;
|
972
|
-
}
|
710
|
+
let geodeticSurfaceNormal;
|
711
|
+
if (encoding.hasGeodeticSurfaceNormals) {
|
712
|
+
geodeticSurfaceNormal = ellipsoid.geodeticSurfaceNormal(position);
|
973
713
|
}
|
974
|
-
|
975
|
-
|
976
|
-
|
714
|
+
vertexBufferIndex = encoding.encode(
|
715
|
+
vertexBuffer,
|
716
|
+
vertexBufferIndex,
|
717
|
+
position,
|
718
|
+
uv,
|
719
|
+
cartographicScratch.height,
|
720
|
+
toPack,
|
721
|
+
webMercatorT,
|
722
|
+
geodeticSurfaceNormal
|
723
|
+
);
|
724
|
+
}
|
725
|
+
}
|
726
|
+
function copyAndSort(typedArray, comparator) {
|
727
|
+
let copy;
|
728
|
+
if (typeof typedArray.slice === "function") {
|
729
|
+
copy = typedArray.slice();
|
730
|
+
if (typeof copy.sort !== "function") {
|
731
|
+
copy = void 0;
|
977
732
|
}
|
978
|
-
|
979
|
-
copy.sort(comparator);
|
980
|
-
|
981
|
-
return copy;
|
982
733
|
}
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
return
|
988
|
-
|
989
|
-
|
734
|
+
if (!defined_default(copy)) {
|
735
|
+
copy = Array.prototype.slice.call(typedArray);
|
736
|
+
}
|
737
|
+
copy.sort(comparator);
|
738
|
+
return copy;
|
739
|
+
}
|
740
|
+
var createVerticesFromQuantizedTerrainMesh_default = createTaskProcessorWorker_default(
|
741
|
+
createVerticesFromQuantizedTerrainMesh
|
742
|
+
);
|
743
|
+
export {
|
744
|
+
createVerticesFromQuantizedTerrainMesh_default as default
|
745
|
+
};
|