@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,1344 +0,0 @@
|
|
1
|
-
define(['exports', './Math-0a2ac845', './Matrix2-e1298525', './Matrix3-41c58dde', './Check-6ede7e26', './ComponentDatatype-cf1fa08e', './defaultValue-fe22d8c0', './EllipsoidRhumbLine-ef872433', './GeometryAttribute-ff5b4fb1', './WebGLConstants-0b1ce7ba'], (function (exports, Math$1, Matrix2, Matrix3, Check, ComponentDatatype, defaultValue, EllipsoidRhumbLine, GeometryAttribute, WebGLConstants) { 'use strict';
|
2
|
-
|
3
|
-
var earcut$2 = {exports: {}};
|
4
|
-
|
5
|
-
earcut$2.exports = earcut;
|
6
|
-
earcut$2.exports.default = earcut;
|
7
|
-
|
8
|
-
function earcut(data, holeIndices, dim) {
|
9
|
-
|
10
|
-
dim = dim || 2;
|
11
|
-
|
12
|
-
var hasHoles = holeIndices && holeIndices.length,
|
13
|
-
outerLen = hasHoles ? holeIndices[0] * dim : data.length,
|
14
|
-
outerNode = linkedList(data, 0, outerLen, dim, true),
|
15
|
-
triangles = [];
|
16
|
-
|
17
|
-
if (!outerNode || outerNode.next === outerNode.prev) return triangles;
|
18
|
-
|
19
|
-
var minX, minY, maxX, maxY, x, y, invSize;
|
20
|
-
|
21
|
-
if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);
|
22
|
-
|
23
|
-
// if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox
|
24
|
-
if (data.length > 80 * dim) {
|
25
|
-
minX = maxX = data[0];
|
26
|
-
minY = maxY = data[1];
|
27
|
-
|
28
|
-
for (var i = dim; i < outerLen; i += dim) {
|
29
|
-
x = data[i];
|
30
|
-
y = data[i + 1];
|
31
|
-
if (x < minX) minX = x;
|
32
|
-
if (y < minY) minY = y;
|
33
|
-
if (x > maxX) maxX = x;
|
34
|
-
if (y > maxY) maxY = y;
|
35
|
-
}
|
36
|
-
|
37
|
-
// minX, minY and invSize are later used to transform coords into integers for z-order calculation
|
38
|
-
invSize = Math.max(maxX - minX, maxY - minY);
|
39
|
-
invSize = invSize !== 0 ? 32767 / invSize : 0;
|
40
|
-
}
|
41
|
-
|
42
|
-
earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);
|
43
|
-
|
44
|
-
return triangles;
|
45
|
-
}
|
46
|
-
|
47
|
-
// create a circular doubly linked list from polygon points in the specified winding order
|
48
|
-
function linkedList(data, start, end, dim, clockwise) {
|
49
|
-
var i, last;
|
50
|
-
|
51
|
-
if (clockwise === (signedArea(data, start, end, dim) > 0)) {
|
52
|
-
for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);
|
53
|
-
} else {
|
54
|
-
for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);
|
55
|
-
}
|
56
|
-
|
57
|
-
if (last && equals(last, last.next)) {
|
58
|
-
removeNode(last);
|
59
|
-
last = last.next;
|
60
|
-
}
|
61
|
-
|
62
|
-
return last;
|
63
|
-
}
|
64
|
-
|
65
|
-
// eliminate colinear or duplicate points
|
66
|
-
function filterPoints(start, end) {
|
67
|
-
if (!start) return start;
|
68
|
-
if (!end) end = start;
|
69
|
-
|
70
|
-
var p = start,
|
71
|
-
again;
|
72
|
-
do {
|
73
|
-
again = false;
|
74
|
-
|
75
|
-
if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {
|
76
|
-
removeNode(p);
|
77
|
-
p = end = p.prev;
|
78
|
-
if (p === p.next) break;
|
79
|
-
again = true;
|
80
|
-
|
81
|
-
} else {
|
82
|
-
p = p.next;
|
83
|
-
}
|
84
|
-
} while (again || p !== end);
|
85
|
-
|
86
|
-
return end;
|
87
|
-
}
|
88
|
-
|
89
|
-
// main ear slicing loop which triangulates a polygon (given as a linked list)
|
90
|
-
function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {
|
91
|
-
if (!ear) return;
|
92
|
-
|
93
|
-
// interlink polygon nodes in z-order
|
94
|
-
if (!pass && invSize) indexCurve(ear, minX, minY, invSize);
|
95
|
-
|
96
|
-
var stop = ear,
|
97
|
-
prev, next;
|
98
|
-
|
99
|
-
// iterate through ears, slicing them one by one
|
100
|
-
while (ear.prev !== ear.next) {
|
101
|
-
prev = ear.prev;
|
102
|
-
next = ear.next;
|
103
|
-
|
104
|
-
if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {
|
105
|
-
// cut off the triangle
|
106
|
-
triangles.push(prev.i / dim | 0);
|
107
|
-
triangles.push(ear.i / dim | 0);
|
108
|
-
triangles.push(next.i / dim | 0);
|
109
|
-
|
110
|
-
removeNode(ear);
|
111
|
-
|
112
|
-
// skipping the next vertex leads to less sliver triangles
|
113
|
-
ear = next.next;
|
114
|
-
stop = next.next;
|
115
|
-
|
116
|
-
continue;
|
117
|
-
}
|
118
|
-
|
119
|
-
ear = next;
|
120
|
-
|
121
|
-
// if we looped through the whole remaining polygon and can't find any more ears
|
122
|
-
if (ear === stop) {
|
123
|
-
// try filtering points and slicing again
|
124
|
-
if (!pass) {
|
125
|
-
earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);
|
126
|
-
|
127
|
-
// if this didn't work, try curing all small self-intersections locally
|
128
|
-
} else if (pass === 1) {
|
129
|
-
ear = cureLocalIntersections(filterPoints(ear), triangles, dim);
|
130
|
-
earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);
|
131
|
-
|
132
|
-
// as a last resort, try splitting the remaining polygon into two
|
133
|
-
} else if (pass === 2) {
|
134
|
-
splitEarcut(ear, triangles, dim, minX, minY, invSize);
|
135
|
-
}
|
136
|
-
|
137
|
-
break;
|
138
|
-
}
|
139
|
-
}
|
140
|
-
}
|
141
|
-
|
142
|
-
// check whether a polygon node forms a valid ear with adjacent nodes
|
143
|
-
function isEar(ear) {
|
144
|
-
var a = ear.prev,
|
145
|
-
b = ear,
|
146
|
-
c = ear.next;
|
147
|
-
|
148
|
-
if (area(a, b, c) >= 0) return false; // reflex, can't be an ear
|
149
|
-
|
150
|
-
// now make sure we don't have other points inside the potential ear
|
151
|
-
var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
|
152
|
-
|
153
|
-
// triangle bbox; min & max are calculated like this for speed
|
154
|
-
var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),
|
155
|
-
y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),
|
156
|
-
x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),
|
157
|
-
y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);
|
158
|
-
|
159
|
-
var p = c.next;
|
160
|
-
while (p !== a) {
|
161
|
-
if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 &&
|
162
|
-
pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) &&
|
163
|
-
area(p.prev, p, p.next) >= 0) return false;
|
164
|
-
p = p.next;
|
165
|
-
}
|
166
|
-
|
167
|
-
return true;
|
168
|
-
}
|
169
|
-
|
170
|
-
function isEarHashed(ear, minX, minY, invSize) {
|
171
|
-
var a = ear.prev,
|
172
|
-
b = ear,
|
173
|
-
c = ear.next;
|
174
|
-
|
175
|
-
if (area(a, b, c) >= 0) return false; // reflex, can't be an ear
|
176
|
-
|
177
|
-
var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
|
178
|
-
|
179
|
-
// triangle bbox; min & max are calculated like this for speed
|
180
|
-
var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),
|
181
|
-
y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),
|
182
|
-
x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),
|
183
|
-
y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);
|
184
|
-
|
185
|
-
// z-order range for the current triangle bbox;
|
186
|
-
var minZ = zOrder(x0, y0, minX, minY, invSize),
|
187
|
-
maxZ = zOrder(x1, y1, minX, minY, invSize);
|
188
|
-
|
189
|
-
var p = ear.prevZ,
|
190
|
-
n = ear.nextZ;
|
191
|
-
|
192
|
-
// look for points inside the triangle in both directions
|
193
|
-
while (p && p.z >= minZ && n && n.z <= maxZ) {
|
194
|
-
if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&
|
195
|
-
pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
|
196
|
-
p = p.prevZ;
|
197
|
-
|
198
|
-
if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&
|
199
|
-
pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
|
200
|
-
n = n.nextZ;
|
201
|
-
}
|
202
|
-
|
203
|
-
// look for remaining points in decreasing z-order
|
204
|
-
while (p && p.z >= minZ) {
|
205
|
-
if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&
|
206
|
-
pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
|
207
|
-
p = p.prevZ;
|
208
|
-
}
|
209
|
-
|
210
|
-
// look for remaining points in increasing z-order
|
211
|
-
while (n && n.z <= maxZ) {
|
212
|
-
if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&
|
213
|
-
pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
|
214
|
-
n = n.nextZ;
|
215
|
-
}
|
216
|
-
|
217
|
-
return true;
|
218
|
-
}
|
219
|
-
|
220
|
-
// go through all polygon nodes and cure small local self-intersections
|
221
|
-
function cureLocalIntersections(start, triangles, dim) {
|
222
|
-
var p = start;
|
223
|
-
do {
|
224
|
-
var a = p.prev,
|
225
|
-
b = p.next.next;
|
226
|
-
|
227
|
-
if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {
|
228
|
-
|
229
|
-
triangles.push(a.i / dim | 0);
|
230
|
-
triangles.push(p.i / dim | 0);
|
231
|
-
triangles.push(b.i / dim | 0);
|
232
|
-
|
233
|
-
// remove two nodes involved
|
234
|
-
removeNode(p);
|
235
|
-
removeNode(p.next);
|
236
|
-
|
237
|
-
p = start = b;
|
238
|
-
}
|
239
|
-
p = p.next;
|
240
|
-
} while (p !== start);
|
241
|
-
|
242
|
-
return filterPoints(p);
|
243
|
-
}
|
244
|
-
|
245
|
-
// try splitting polygon into two and triangulate them independently
|
246
|
-
function splitEarcut(start, triangles, dim, minX, minY, invSize) {
|
247
|
-
// look for a valid diagonal that divides the polygon into two
|
248
|
-
var a = start;
|
249
|
-
do {
|
250
|
-
var b = a.next.next;
|
251
|
-
while (b !== a.prev) {
|
252
|
-
if (a.i !== b.i && isValidDiagonal(a, b)) {
|
253
|
-
// split the polygon in two by the diagonal
|
254
|
-
var c = splitPolygon(a, b);
|
255
|
-
|
256
|
-
// filter colinear points around the cuts
|
257
|
-
a = filterPoints(a, a.next);
|
258
|
-
c = filterPoints(c, c.next);
|
259
|
-
|
260
|
-
// run earcut on each half
|
261
|
-
earcutLinked(a, triangles, dim, minX, minY, invSize, 0);
|
262
|
-
earcutLinked(c, triangles, dim, minX, minY, invSize, 0);
|
263
|
-
return;
|
264
|
-
}
|
265
|
-
b = b.next;
|
266
|
-
}
|
267
|
-
a = a.next;
|
268
|
-
} while (a !== start);
|
269
|
-
}
|
270
|
-
|
271
|
-
// link every hole into the outer loop, producing a single-ring polygon without holes
|
272
|
-
function eliminateHoles(data, holeIndices, outerNode, dim) {
|
273
|
-
var queue = [],
|
274
|
-
i, len, start, end, list;
|
275
|
-
|
276
|
-
for (i = 0, len = holeIndices.length; i < len; i++) {
|
277
|
-
start = holeIndices[i] * dim;
|
278
|
-
end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
|
279
|
-
list = linkedList(data, start, end, dim, false);
|
280
|
-
if (list === list.next) list.steiner = true;
|
281
|
-
queue.push(getLeftmost(list));
|
282
|
-
}
|
283
|
-
|
284
|
-
queue.sort(compareX);
|
285
|
-
|
286
|
-
// process holes from left to right
|
287
|
-
for (i = 0; i < queue.length; i++) {
|
288
|
-
outerNode = eliminateHole(queue[i], outerNode);
|
289
|
-
}
|
290
|
-
|
291
|
-
return outerNode;
|
292
|
-
}
|
293
|
-
|
294
|
-
function compareX(a, b) {
|
295
|
-
return a.x - b.x;
|
296
|
-
}
|
297
|
-
|
298
|
-
// find a bridge between vertices that connects hole with an outer ring and and link it
|
299
|
-
function eliminateHole(hole, outerNode) {
|
300
|
-
var bridge = findHoleBridge(hole, outerNode);
|
301
|
-
if (!bridge) {
|
302
|
-
return outerNode;
|
303
|
-
}
|
304
|
-
|
305
|
-
var bridgeReverse = splitPolygon(bridge, hole);
|
306
|
-
|
307
|
-
// filter collinear points around the cuts
|
308
|
-
filterPoints(bridgeReverse, bridgeReverse.next);
|
309
|
-
return filterPoints(bridge, bridge.next);
|
310
|
-
}
|
311
|
-
|
312
|
-
// David Eberly's algorithm for finding a bridge between hole and outer polygon
|
313
|
-
function findHoleBridge(hole, outerNode) {
|
314
|
-
var p = outerNode,
|
315
|
-
hx = hole.x,
|
316
|
-
hy = hole.y,
|
317
|
-
qx = -Infinity,
|
318
|
-
m;
|
319
|
-
|
320
|
-
// find a segment intersected by a ray from the hole's leftmost point to the left;
|
321
|
-
// segment's endpoint with lesser x will be potential connection point
|
322
|
-
do {
|
323
|
-
if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {
|
324
|
-
var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
|
325
|
-
if (x <= hx && x > qx) {
|
326
|
-
qx = x;
|
327
|
-
m = p.x < p.next.x ? p : p.next;
|
328
|
-
if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint
|
329
|
-
}
|
330
|
-
}
|
331
|
-
p = p.next;
|
332
|
-
} while (p !== outerNode);
|
333
|
-
|
334
|
-
if (!m) return null;
|
335
|
-
|
336
|
-
// look for points inside the triangle of hole point, segment intersection and endpoint;
|
337
|
-
// if there are no points found, we have a valid connection;
|
338
|
-
// otherwise choose the point of the minimum angle with the ray as connection point
|
339
|
-
|
340
|
-
var stop = m,
|
341
|
-
mx = m.x,
|
342
|
-
my = m.y,
|
343
|
-
tanMin = Infinity,
|
344
|
-
tan;
|
345
|
-
|
346
|
-
p = m;
|
347
|
-
|
348
|
-
do {
|
349
|
-
if (hx >= p.x && p.x >= mx && hx !== p.x &&
|
350
|
-
pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {
|
351
|
-
|
352
|
-
tan = Math.abs(hy - p.y) / (hx - p.x); // tangential
|
353
|
-
|
354
|
-
if (locallyInside(p, hole) &&
|
355
|
-
(tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {
|
356
|
-
m = p;
|
357
|
-
tanMin = tan;
|
358
|
-
}
|
359
|
-
}
|
360
|
-
|
361
|
-
p = p.next;
|
362
|
-
} while (p !== stop);
|
363
|
-
|
364
|
-
return m;
|
365
|
-
}
|
366
|
-
|
367
|
-
// whether sector in vertex m contains sector in vertex p in the same coordinates
|
368
|
-
function sectorContainsSector(m, p) {
|
369
|
-
return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;
|
370
|
-
}
|
371
|
-
|
372
|
-
// interlink polygon nodes in z-order
|
373
|
-
function indexCurve(start, minX, minY, invSize) {
|
374
|
-
var p = start;
|
375
|
-
do {
|
376
|
-
if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize);
|
377
|
-
p.prevZ = p.prev;
|
378
|
-
p.nextZ = p.next;
|
379
|
-
p = p.next;
|
380
|
-
} while (p !== start);
|
381
|
-
|
382
|
-
p.prevZ.nextZ = null;
|
383
|
-
p.prevZ = null;
|
384
|
-
|
385
|
-
sortLinked(p);
|
386
|
-
}
|
387
|
-
|
388
|
-
// Simon Tatham's linked list merge sort algorithm
|
389
|
-
// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html
|
390
|
-
function sortLinked(list) {
|
391
|
-
var i, p, q, e, tail, numMerges, pSize, qSize,
|
392
|
-
inSize = 1;
|
393
|
-
|
394
|
-
do {
|
395
|
-
p = list;
|
396
|
-
list = null;
|
397
|
-
tail = null;
|
398
|
-
numMerges = 0;
|
399
|
-
|
400
|
-
while (p) {
|
401
|
-
numMerges++;
|
402
|
-
q = p;
|
403
|
-
pSize = 0;
|
404
|
-
for (i = 0; i < inSize; i++) {
|
405
|
-
pSize++;
|
406
|
-
q = q.nextZ;
|
407
|
-
if (!q) break;
|
408
|
-
}
|
409
|
-
qSize = inSize;
|
410
|
-
|
411
|
-
while (pSize > 0 || (qSize > 0 && q)) {
|
412
|
-
|
413
|
-
if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {
|
414
|
-
e = p;
|
415
|
-
p = p.nextZ;
|
416
|
-
pSize--;
|
417
|
-
} else {
|
418
|
-
e = q;
|
419
|
-
q = q.nextZ;
|
420
|
-
qSize--;
|
421
|
-
}
|
422
|
-
|
423
|
-
if (tail) tail.nextZ = e;
|
424
|
-
else list = e;
|
425
|
-
|
426
|
-
e.prevZ = tail;
|
427
|
-
tail = e;
|
428
|
-
}
|
429
|
-
|
430
|
-
p = q;
|
431
|
-
}
|
432
|
-
|
433
|
-
tail.nextZ = null;
|
434
|
-
inSize *= 2;
|
435
|
-
|
436
|
-
} while (numMerges > 1);
|
437
|
-
|
438
|
-
return list;
|
439
|
-
}
|
440
|
-
|
441
|
-
// z-order of a point given coords and inverse of the longer side of data bbox
|
442
|
-
function zOrder(x, y, minX, minY, invSize) {
|
443
|
-
// coords are transformed into non-negative 15-bit integer range
|
444
|
-
x = (x - minX) * invSize | 0;
|
445
|
-
y = (y - minY) * invSize | 0;
|
446
|
-
|
447
|
-
x = (x | (x << 8)) & 0x00FF00FF;
|
448
|
-
x = (x | (x << 4)) & 0x0F0F0F0F;
|
449
|
-
x = (x | (x << 2)) & 0x33333333;
|
450
|
-
x = (x | (x << 1)) & 0x55555555;
|
451
|
-
|
452
|
-
y = (y | (y << 8)) & 0x00FF00FF;
|
453
|
-
y = (y | (y << 4)) & 0x0F0F0F0F;
|
454
|
-
y = (y | (y << 2)) & 0x33333333;
|
455
|
-
y = (y | (y << 1)) & 0x55555555;
|
456
|
-
|
457
|
-
return x | (y << 1);
|
458
|
-
}
|
459
|
-
|
460
|
-
// find the leftmost node of a polygon ring
|
461
|
-
function getLeftmost(start) {
|
462
|
-
var p = start,
|
463
|
-
leftmost = start;
|
464
|
-
do {
|
465
|
-
if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;
|
466
|
-
p = p.next;
|
467
|
-
} while (p !== start);
|
468
|
-
|
469
|
-
return leftmost;
|
470
|
-
}
|
471
|
-
|
472
|
-
// check if a point lies within a convex triangle
|
473
|
-
function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
|
474
|
-
return (cx - px) * (ay - py) >= (ax - px) * (cy - py) &&
|
475
|
-
(ax - px) * (by - py) >= (bx - px) * (ay - py) &&
|
476
|
-
(bx - px) * (cy - py) >= (cx - px) * (by - py);
|
477
|
-
}
|
478
|
-
|
479
|
-
// check if a diagonal between two polygon nodes is valid (lies in polygon interior)
|
480
|
-
function isValidDiagonal(a, b) {
|
481
|
-
return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges
|
482
|
-
(locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible
|
483
|
-
(area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors
|
484
|
-
equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case
|
485
|
-
}
|
486
|
-
|
487
|
-
// signed area of a triangle
|
488
|
-
function area(p, q, r) {
|
489
|
-
return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);
|
490
|
-
}
|
491
|
-
|
492
|
-
// check if two points are equal
|
493
|
-
function equals(p1, p2) {
|
494
|
-
return p1.x === p2.x && p1.y === p2.y;
|
495
|
-
}
|
496
|
-
|
497
|
-
// check if two segments intersect
|
498
|
-
function intersects(p1, q1, p2, q2) {
|
499
|
-
var o1 = sign(area(p1, q1, p2));
|
500
|
-
var o2 = sign(area(p1, q1, q2));
|
501
|
-
var o3 = sign(area(p2, q2, p1));
|
502
|
-
var o4 = sign(area(p2, q2, q1));
|
503
|
-
|
504
|
-
if (o1 !== o2 && o3 !== o4) return true; // general case
|
505
|
-
|
506
|
-
if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1
|
507
|
-
if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1
|
508
|
-
if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2
|
509
|
-
if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2
|
510
|
-
|
511
|
-
return false;
|
512
|
-
}
|
513
|
-
|
514
|
-
// for collinear points p, q, r, check if point q lies on segment pr
|
515
|
-
function onSegment(p, q, r) {
|
516
|
-
return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);
|
517
|
-
}
|
518
|
-
|
519
|
-
function sign(num) {
|
520
|
-
return num > 0 ? 1 : num < 0 ? -1 : 0;
|
521
|
-
}
|
522
|
-
|
523
|
-
// check if a polygon diagonal intersects any polygon segments
|
524
|
-
function intersectsPolygon(a, b) {
|
525
|
-
var p = a;
|
526
|
-
do {
|
527
|
-
if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&
|
528
|
-
intersects(p, p.next, a, b)) return true;
|
529
|
-
p = p.next;
|
530
|
-
} while (p !== a);
|
531
|
-
|
532
|
-
return false;
|
533
|
-
}
|
534
|
-
|
535
|
-
// check if a polygon diagonal is locally inside the polygon
|
536
|
-
function locallyInside(a, b) {
|
537
|
-
return area(a.prev, a, a.next) < 0 ?
|
538
|
-
area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :
|
539
|
-
area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;
|
540
|
-
}
|
541
|
-
|
542
|
-
// check if the middle point of a polygon diagonal is inside the polygon
|
543
|
-
function middleInside(a, b) {
|
544
|
-
var p = a,
|
545
|
-
inside = false,
|
546
|
-
px = (a.x + b.x) / 2,
|
547
|
-
py = (a.y + b.y) / 2;
|
548
|
-
do {
|
549
|
-
if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&
|
550
|
-
(px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))
|
551
|
-
inside = !inside;
|
552
|
-
p = p.next;
|
553
|
-
} while (p !== a);
|
554
|
-
|
555
|
-
return inside;
|
556
|
-
}
|
557
|
-
|
558
|
-
// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;
|
559
|
-
// if one belongs to the outer ring and another to a hole, it merges it into a single ring
|
560
|
-
function splitPolygon(a, b) {
|
561
|
-
var a2 = new Node(a.i, a.x, a.y),
|
562
|
-
b2 = new Node(b.i, b.x, b.y),
|
563
|
-
an = a.next,
|
564
|
-
bp = b.prev;
|
565
|
-
|
566
|
-
a.next = b;
|
567
|
-
b.prev = a;
|
568
|
-
|
569
|
-
a2.next = an;
|
570
|
-
an.prev = a2;
|
571
|
-
|
572
|
-
b2.next = a2;
|
573
|
-
a2.prev = b2;
|
574
|
-
|
575
|
-
bp.next = b2;
|
576
|
-
b2.prev = bp;
|
577
|
-
|
578
|
-
return b2;
|
579
|
-
}
|
580
|
-
|
581
|
-
// create a node and optionally link it with previous one (in a circular doubly linked list)
|
582
|
-
function insertNode(i, x, y, last) {
|
583
|
-
var p = new Node(i, x, y);
|
584
|
-
|
585
|
-
if (!last) {
|
586
|
-
p.prev = p;
|
587
|
-
p.next = p;
|
588
|
-
|
589
|
-
} else {
|
590
|
-
p.next = last.next;
|
591
|
-
p.prev = last;
|
592
|
-
last.next.prev = p;
|
593
|
-
last.next = p;
|
594
|
-
}
|
595
|
-
return p;
|
596
|
-
}
|
597
|
-
|
598
|
-
function removeNode(p) {
|
599
|
-
p.next.prev = p.prev;
|
600
|
-
p.prev.next = p.next;
|
601
|
-
|
602
|
-
if (p.prevZ) p.prevZ.nextZ = p.nextZ;
|
603
|
-
if (p.nextZ) p.nextZ.prevZ = p.prevZ;
|
604
|
-
}
|
605
|
-
|
606
|
-
function Node(i, x, y) {
|
607
|
-
// vertex index in coordinates array
|
608
|
-
this.i = i;
|
609
|
-
|
610
|
-
// vertex coordinates
|
611
|
-
this.x = x;
|
612
|
-
this.y = y;
|
613
|
-
|
614
|
-
// previous and next vertex nodes in a polygon ring
|
615
|
-
this.prev = null;
|
616
|
-
this.next = null;
|
617
|
-
|
618
|
-
// z-order curve value
|
619
|
-
this.z = 0;
|
620
|
-
|
621
|
-
// previous and next nodes in z-order
|
622
|
-
this.prevZ = null;
|
623
|
-
this.nextZ = null;
|
624
|
-
|
625
|
-
// indicates whether this is a steiner point
|
626
|
-
this.steiner = false;
|
627
|
-
}
|
628
|
-
|
629
|
-
// return a percentage difference between the polygon area and its triangulation area;
|
630
|
-
// used to verify correctness of triangulation
|
631
|
-
earcut.deviation = function (data, holeIndices, dim, triangles) {
|
632
|
-
var hasHoles = holeIndices && holeIndices.length;
|
633
|
-
var outerLen = hasHoles ? holeIndices[0] * dim : data.length;
|
634
|
-
|
635
|
-
var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));
|
636
|
-
if (hasHoles) {
|
637
|
-
for (var i = 0, len = holeIndices.length; i < len; i++) {
|
638
|
-
var start = holeIndices[i] * dim;
|
639
|
-
var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
|
640
|
-
polygonArea -= Math.abs(signedArea(data, start, end, dim));
|
641
|
-
}
|
642
|
-
}
|
643
|
-
|
644
|
-
var trianglesArea = 0;
|
645
|
-
for (i = 0; i < triangles.length; i += 3) {
|
646
|
-
var a = triangles[i] * dim;
|
647
|
-
var b = triangles[i + 1] * dim;
|
648
|
-
var c = triangles[i + 2] * dim;
|
649
|
-
trianglesArea += Math.abs(
|
650
|
-
(data[a] - data[c]) * (data[b + 1] - data[a + 1]) -
|
651
|
-
(data[a] - data[b]) * (data[c + 1] - data[a + 1]));
|
652
|
-
}
|
653
|
-
|
654
|
-
return polygonArea === 0 && trianglesArea === 0 ? 0 :
|
655
|
-
Math.abs((trianglesArea - polygonArea) / polygonArea);
|
656
|
-
};
|
657
|
-
|
658
|
-
function signedArea(data, start, end, dim) {
|
659
|
-
var sum = 0;
|
660
|
-
for (var i = start, j = end - dim; i < end; i += dim) {
|
661
|
-
sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);
|
662
|
-
j = i;
|
663
|
-
}
|
664
|
-
return sum;
|
665
|
-
}
|
666
|
-
|
667
|
-
// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts
|
668
|
-
earcut.flatten = function (data) {
|
669
|
-
var dim = data[0][0].length,
|
670
|
-
result = {vertices: [], holes: [], dimensions: dim},
|
671
|
-
holeIndex = 0;
|
672
|
-
|
673
|
-
for (var i = 0; i < data.length; i++) {
|
674
|
-
for (var j = 0; j < data[i].length; j++) {
|
675
|
-
for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);
|
676
|
-
}
|
677
|
-
if (i > 0) {
|
678
|
-
holeIndex += data[i - 1].length;
|
679
|
-
result.holes.push(holeIndex);
|
680
|
-
}
|
681
|
-
}
|
682
|
-
return result;
|
683
|
-
};
|
684
|
-
|
685
|
-
var earcutExports = earcut$2.exports;
|
686
|
-
var earcut$1 = /*@__PURE__*/Math$1.getDefaultExportFromCjs(earcutExports);
|
687
|
-
|
688
|
-
/**
|
689
|
-
* Winding order defines the order of vertices for a triangle to be considered front-facing.
|
690
|
-
*
|
691
|
-
* @enum {number}
|
692
|
-
*/
|
693
|
-
const WindingOrder = {
|
694
|
-
/**
|
695
|
-
* Vertices are in clockwise order.
|
696
|
-
*
|
697
|
-
* @type {number}
|
698
|
-
* @constant
|
699
|
-
*/
|
700
|
-
CLOCKWISE: WebGLConstants.WebGLConstants.CW,
|
701
|
-
|
702
|
-
/**
|
703
|
-
* Vertices are in counter-clockwise order.
|
704
|
-
*
|
705
|
-
* @type {number}
|
706
|
-
* @constant
|
707
|
-
*/
|
708
|
-
COUNTER_CLOCKWISE: WebGLConstants.WebGLConstants.CCW,
|
709
|
-
};
|
710
|
-
|
711
|
-
/**
|
712
|
-
* @private
|
713
|
-
*/
|
714
|
-
WindingOrder.validate = function (windingOrder) {
|
715
|
-
return (
|
716
|
-
windingOrder === WindingOrder.CLOCKWISE ||
|
717
|
-
windingOrder === WindingOrder.COUNTER_CLOCKWISE
|
718
|
-
);
|
719
|
-
};
|
720
|
-
|
721
|
-
var WindingOrder$1 = Object.freeze(WindingOrder);
|
722
|
-
|
723
|
-
const scaleToGeodeticHeightN = new Matrix3.Cartesian3();
|
724
|
-
const scaleToGeodeticHeightP = new Matrix3.Cartesian3();
|
725
|
-
|
726
|
-
/**
|
727
|
-
* @private
|
728
|
-
*/
|
729
|
-
const PolygonPipeline = {};
|
730
|
-
|
731
|
-
/**
|
732
|
-
* @exception {DeveloperError} At least three positions are required.
|
733
|
-
*/
|
734
|
-
PolygonPipeline.computeArea2D = function (positions) {
|
735
|
-
//>>includeStart('debug', pragmas.debug);
|
736
|
-
Check.Check.defined("positions", positions);
|
737
|
-
Check.Check.typeOf.number.greaterThanOrEquals(
|
738
|
-
"positions.length",
|
739
|
-
positions.length,
|
740
|
-
3
|
741
|
-
);
|
742
|
-
//>>includeEnd('debug');
|
743
|
-
|
744
|
-
const length = positions.length;
|
745
|
-
let area = 0.0;
|
746
|
-
|
747
|
-
for (let i0 = length - 1, i1 = 0; i1 < length; i0 = i1++) {
|
748
|
-
const v0 = positions[i0];
|
749
|
-
const v1 = positions[i1];
|
750
|
-
|
751
|
-
area += v0.x * v1.y - v1.x * v0.y;
|
752
|
-
}
|
753
|
-
|
754
|
-
return area * 0.5;
|
755
|
-
};
|
756
|
-
|
757
|
-
/**
|
758
|
-
* @returns {WindingOrder} The winding order.
|
759
|
-
*
|
760
|
-
* @exception {DeveloperError} At least three positions are required.
|
761
|
-
*/
|
762
|
-
PolygonPipeline.computeWindingOrder2D = function (positions) {
|
763
|
-
const area = PolygonPipeline.computeArea2D(positions);
|
764
|
-
return area > 0.0 ? WindingOrder$1.COUNTER_CLOCKWISE : WindingOrder$1.CLOCKWISE;
|
765
|
-
};
|
766
|
-
|
767
|
-
/**
|
768
|
-
* Triangulate a polygon.
|
769
|
-
*
|
770
|
-
* @param {Cartesian2[]} positions Cartesian2 array containing the vertices of the polygon
|
771
|
-
* @param {number[]} [holes] An array of the staring indices of the holes.
|
772
|
-
* @returns {number[]} Index array representing triangles that fill the polygon
|
773
|
-
*/
|
774
|
-
PolygonPipeline.triangulate = function (positions, holes) {
|
775
|
-
//>>includeStart('debug', pragmas.debug);
|
776
|
-
Check.Check.defined("positions", positions);
|
777
|
-
//>>includeEnd('debug');
|
778
|
-
|
779
|
-
const flattenedPositions = Matrix2.Cartesian2.packArray(positions);
|
780
|
-
return earcut$1(flattenedPositions, holes, 2);
|
781
|
-
};
|
782
|
-
|
783
|
-
const subdivisionV0Scratch = new Matrix3.Cartesian3();
|
784
|
-
const subdivisionV1Scratch = new Matrix3.Cartesian3();
|
785
|
-
const subdivisionV2Scratch = new Matrix3.Cartesian3();
|
786
|
-
const subdivisionS0Scratch = new Matrix3.Cartesian3();
|
787
|
-
const subdivisionS1Scratch = new Matrix3.Cartesian3();
|
788
|
-
const subdivisionS2Scratch = new Matrix3.Cartesian3();
|
789
|
-
const subdivisionMidScratch = new Matrix3.Cartesian3();
|
790
|
-
const subdivisionT0Scratch = new Matrix2.Cartesian2();
|
791
|
-
const subdivisionT1Scratch = new Matrix2.Cartesian2();
|
792
|
-
const subdivisionT2Scratch = new Matrix2.Cartesian2();
|
793
|
-
const subdivisionTexcoordMidScratch = new Matrix2.Cartesian2();
|
794
|
-
|
795
|
-
/**
|
796
|
-
* Subdivides positions and raises points to the surface of the ellipsoid.
|
797
|
-
*
|
798
|
-
* @param {Ellipsoid} ellipsoid The ellipsoid the polygon in on.
|
799
|
-
* @param {Cartesian3[]} positions An array of {@link Cartesian3} positions of the polygon.
|
800
|
-
* @param {number[]} indices An array of indices that determines the triangles in the polygon.
|
801
|
-
* @param {Cartesian2[]} texcoords An optional array of {@link Cartesian2} texture coordinates of the polygon.
|
802
|
-
* @param {number} [granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
803
|
-
*
|
804
|
-
* @exception {DeveloperError} At least three indices are required.
|
805
|
-
* @exception {DeveloperError} The number of indices must be divisable by three.
|
806
|
-
* @exception {DeveloperError} Granularity must be greater than zero.
|
807
|
-
*/
|
808
|
-
PolygonPipeline.computeSubdivision = function (
|
809
|
-
ellipsoid,
|
810
|
-
positions,
|
811
|
-
indices,
|
812
|
-
texcoords,
|
813
|
-
granularity
|
814
|
-
) {
|
815
|
-
granularity = defaultValue.defaultValue(granularity, Math$1.CesiumMath.RADIANS_PER_DEGREE);
|
816
|
-
|
817
|
-
const hasTexcoords = defaultValue.defined(texcoords);
|
818
|
-
|
819
|
-
//>>includeStart('debug', pragmas.debug);
|
820
|
-
Check.Check.typeOf.object("ellipsoid", ellipsoid);
|
821
|
-
Check.Check.defined("positions", positions);
|
822
|
-
Check.Check.defined("indices", indices);
|
823
|
-
Check.Check.typeOf.number.greaterThanOrEquals("indices.length", indices.length, 3);
|
824
|
-
Check.Check.typeOf.number.equals("indices.length % 3", "0", indices.length % 3, 0);
|
825
|
-
Check.Check.typeOf.number.greaterThan("granularity", granularity, 0.0);
|
826
|
-
//>>includeEnd('debug');
|
827
|
-
|
828
|
-
// triangles that need (or might need) to be subdivided.
|
829
|
-
const triangles = indices.slice(0);
|
830
|
-
|
831
|
-
// New positions due to edge splits are appended to the positions list.
|
832
|
-
let i;
|
833
|
-
const length = positions.length;
|
834
|
-
const subdividedPositions = new Array(length * 3);
|
835
|
-
const subdividedTexcoords = new Array(length * 2);
|
836
|
-
let q = 0;
|
837
|
-
let p = 0;
|
838
|
-
for (i = 0; i < length; i++) {
|
839
|
-
const item = positions[i];
|
840
|
-
subdividedPositions[q++] = item.x;
|
841
|
-
subdividedPositions[q++] = item.y;
|
842
|
-
subdividedPositions[q++] = item.z;
|
843
|
-
|
844
|
-
if (hasTexcoords) {
|
845
|
-
const texcoordItem = texcoords[i];
|
846
|
-
subdividedTexcoords[p++] = texcoordItem.x;
|
847
|
-
subdividedTexcoords[p++] = texcoordItem.y;
|
848
|
-
}
|
849
|
-
}
|
850
|
-
|
851
|
-
const subdividedIndices = [];
|
852
|
-
|
853
|
-
// Used to make sure shared edges are not split more than once.
|
854
|
-
const edges = {};
|
855
|
-
|
856
|
-
const radius = ellipsoid.maximumRadius;
|
857
|
-
const minDistance = Math$1.CesiumMath.chordLength(granularity, radius);
|
858
|
-
const minDistanceSqrd = minDistance * minDistance;
|
859
|
-
|
860
|
-
while (triangles.length > 0) {
|
861
|
-
const i2 = triangles.pop();
|
862
|
-
const i1 = triangles.pop();
|
863
|
-
const i0 = triangles.pop();
|
864
|
-
|
865
|
-
const v0 = Matrix3.Cartesian3.fromArray(
|
866
|
-
subdividedPositions,
|
867
|
-
i0 * 3,
|
868
|
-
subdivisionV0Scratch
|
869
|
-
);
|
870
|
-
const v1 = Matrix3.Cartesian3.fromArray(
|
871
|
-
subdividedPositions,
|
872
|
-
i1 * 3,
|
873
|
-
subdivisionV1Scratch
|
874
|
-
);
|
875
|
-
const v2 = Matrix3.Cartesian3.fromArray(
|
876
|
-
subdividedPositions,
|
877
|
-
i2 * 3,
|
878
|
-
subdivisionV2Scratch
|
879
|
-
);
|
880
|
-
|
881
|
-
let t0, t1, t2;
|
882
|
-
if (hasTexcoords) {
|
883
|
-
t0 = Matrix2.Cartesian2.fromArray(
|
884
|
-
subdividedTexcoords,
|
885
|
-
i0 * 2,
|
886
|
-
subdivisionT0Scratch
|
887
|
-
);
|
888
|
-
t1 = Matrix2.Cartesian2.fromArray(
|
889
|
-
subdividedTexcoords,
|
890
|
-
i1 * 2,
|
891
|
-
subdivisionT1Scratch
|
892
|
-
);
|
893
|
-
t2 = Matrix2.Cartesian2.fromArray(
|
894
|
-
subdividedTexcoords,
|
895
|
-
i2 * 2,
|
896
|
-
subdivisionT2Scratch
|
897
|
-
);
|
898
|
-
}
|
899
|
-
|
900
|
-
const s0 = Matrix3.Cartesian3.multiplyByScalar(
|
901
|
-
Matrix3.Cartesian3.normalize(v0, subdivisionS0Scratch),
|
902
|
-
radius,
|
903
|
-
subdivisionS0Scratch
|
904
|
-
);
|
905
|
-
const s1 = Matrix3.Cartesian3.multiplyByScalar(
|
906
|
-
Matrix3.Cartesian3.normalize(v1, subdivisionS1Scratch),
|
907
|
-
radius,
|
908
|
-
subdivisionS1Scratch
|
909
|
-
);
|
910
|
-
const s2 = Matrix3.Cartesian3.multiplyByScalar(
|
911
|
-
Matrix3.Cartesian3.normalize(v2, subdivisionS2Scratch),
|
912
|
-
radius,
|
913
|
-
subdivisionS2Scratch
|
914
|
-
);
|
915
|
-
|
916
|
-
const g0 = Matrix3.Cartesian3.magnitudeSquared(
|
917
|
-
Matrix3.Cartesian3.subtract(s0, s1, subdivisionMidScratch)
|
918
|
-
);
|
919
|
-
const g1 = Matrix3.Cartesian3.magnitudeSquared(
|
920
|
-
Matrix3.Cartesian3.subtract(s1, s2, subdivisionMidScratch)
|
921
|
-
);
|
922
|
-
const g2 = Matrix3.Cartesian3.magnitudeSquared(
|
923
|
-
Matrix3.Cartesian3.subtract(s2, s0, subdivisionMidScratch)
|
924
|
-
);
|
925
|
-
|
926
|
-
const max = Math.max(g0, g1, g2);
|
927
|
-
let edge;
|
928
|
-
let mid;
|
929
|
-
let midTexcoord;
|
930
|
-
|
931
|
-
// if the max length squared of a triangle edge is greater than the chord length of squared
|
932
|
-
// of the granularity, subdivide the triangle
|
933
|
-
if (max > minDistanceSqrd) {
|
934
|
-
if (g0 === max) {
|
935
|
-
edge = `${Math.min(i0, i1)} ${Math.max(i0, i1)}`;
|
936
|
-
|
937
|
-
i = edges[edge];
|
938
|
-
if (!defaultValue.defined(i)) {
|
939
|
-
mid = Matrix3.Cartesian3.add(v0, v1, subdivisionMidScratch);
|
940
|
-
Matrix3.Cartesian3.multiplyByScalar(mid, 0.5, mid);
|
941
|
-
subdividedPositions.push(mid.x, mid.y, mid.z);
|
942
|
-
i = subdividedPositions.length / 3 - 1;
|
943
|
-
edges[edge] = i;
|
944
|
-
|
945
|
-
if (hasTexcoords) {
|
946
|
-
midTexcoord = Matrix2.Cartesian2.add(t0, t1, subdivisionTexcoordMidScratch);
|
947
|
-
Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
|
948
|
-
subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
|
949
|
-
}
|
950
|
-
}
|
951
|
-
|
952
|
-
triangles.push(i0, i, i2);
|
953
|
-
triangles.push(i, i1, i2);
|
954
|
-
} else if (g1 === max) {
|
955
|
-
edge = `${Math.min(i1, i2)} ${Math.max(i1, i2)}`;
|
956
|
-
|
957
|
-
i = edges[edge];
|
958
|
-
if (!defaultValue.defined(i)) {
|
959
|
-
mid = Matrix3.Cartesian3.add(v1, v2, subdivisionMidScratch);
|
960
|
-
Matrix3.Cartesian3.multiplyByScalar(mid, 0.5, mid);
|
961
|
-
subdividedPositions.push(mid.x, mid.y, mid.z);
|
962
|
-
i = subdividedPositions.length / 3 - 1;
|
963
|
-
edges[edge] = i;
|
964
|
-
|
965
|
-
if (hasTexcoords) {
|
966
|
-
midTexcoord = Matrix2.Cartesian2.add(t1, t2, subdivisionTexcoordMidScratch);
|
967
|
-
Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
|
968
|
-
subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
|
969
|
-
}
|
970
|
-
}
|
971
|
-
|
972
|
-
triangles.push(i1, i, i0);
|
973
|
-
triangles.push(i, i2, i0);
|
974
|
-
} else if (g2 === max) {
|
975
|
-
edge = `${Math.min(i2, i0)} ${Math.max(i2, i0)}`;
|
976
|
-
|
977
|
-
i = edges[edge];
|
978
|
-
if (!defaultValue.defined(i)) {
|
979
|
-
mid = Matrix3.Cartesian3.add(v2, v0, subdivisionMidScratch);
|
980
|
-
Matrix3.Cartesian3.multiplyByScalar(mid, 0.5, mid);
|
981
|
-
subdividedPositions.push(mid.x, mid.y, mid.z);
|
982
|
-
i = subdividedPositions.length / 3 - 1;
|
983
|
-
edges[edge] = i;
|
984
|
-
|
985
|
-
if (hasTexcoords) {
|
986
|
-
midTexcoord = Matrix2.Cartesian2.add(t2, t0, subdivisionTexcoordMidScratch);
|
987
|
-
Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
|
988
|
-
subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
|
989
|
-
}
|
990
|
-
}
|
991
|
-
|
992
|
-
triangles.push(i2, i, i1);
|
993
|
-
triangles.push(i, i0, i1);
|
994
|
-
}
|
995
|
-
} else {
|
996
|
-
subdividedIndices.push(i0);
|
997
|
-
subdividedIndices.push(i1);
|
998
|
-
subdividedIndices.push(i2);
|
999
|
-
}
|
1000
|
-
}
|
1001
|
-
|
1002
|
-
const geometryOptions = {
|
1003
|
-
attributes: {
|
1004
|
-
position: new GeometryAttribute.GeometryAttribute({
|
1005
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.DOUBLE,
|
1006
|
-
componentsPerAttribute: 3,
|
1007
|
-
values: subdividedPositions,
|
1008
|
-
}),
|
1009
|
-
},
|
1010
|
-
indices: subdividedIndices,
|
1011
|
-
primitiveType: GeometryAttribute.PrimitiveType.TRIANGLES,
|
1012
|
-
};
|
1013
|
-
|
1014
|
-
if (hasTexcoords) {
|
1015
|
-
geometryOptions.attributes.st = new GeometryAttribute.GeometryAttribute({
|
1016
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
1017
|
-
componentsPerAttribute: 2,
|
1018
|
-
values: subdividedTexcoords,
|
1019
|
-
});
|
1020
|
-
}
|
1021
|
-
|
1022
|
-
return new GeometryAttribute.Geometry(geometryOptions);
|
1023
|
-
};
|
1024
|
-
|
1025
|
-
const subdivisionC0Scratch = new Matrix3.Cartographic();
|
1026
|
-
const subdivisionC1Scratch = new Matrix3.Cartographic();
|
1027
|
-
const subdivisionC2Scratch = new Matrix3.Cartographic();
|
1028
|
-
const subdivisionCartographicScratch = new Matrix3.Cartographic();
|
1029
|
-
|
1030
|
-
/**
|
1031
|
-
* Subdivides positions on rhumb lines and raises points to the surface of the ellipsoid.
|
1032
|
-
*
|
1033
|
-
* @param {Ellipsoid} ellipsoid The ellipsoid the polygon in on.
|
1034
|
-
* @param {Cartesian3[]} positions An array of {@link Cartesian3} positions of the polygon.
|
1035
|
-
* @param {number[]} indices An array of indices that determines the triangles in the polygon.
|
1036
|
-
* @param {Cartesian2[]} texcoords An optional array of {@link Cartesian2} texture coordinates of the polygon.
|
1037
|
-
* @param {number} [granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
1038
|
-
*
|
1039
|
-
* @exception {DeveloperError} At least three indices are required.
|
1040
|
-
* @exception {DeveloperError} The number of indices must be divisable by three.
|
1041
|
-
* @exception {DeveloperError} Granularity must be greater than zero.
|
1042
|
-
*/
|
1043
|
-
PolygonPipeline.computeRhumbLineSubdivision = function (
|
1044
|
-
ellipsoid,
|
1045
|
-
positions,
|
1046
|
-
indices,
|
1047
|
-
texcoords,
|
1048
|
-
granularity
|
1049
|
-
) {
|
1050
|
-
granularity = defaultValue.defaultValue(granularity, Math$1.CesiumMath.RADIANS_PER_DEGREE);
|
1051
|
-
|
1052
|
-
const hasTexcoords = defaultValue.defined(texcoords);
|
1053
|
-
|
1054
|
-
//>>includeStart('debug', pragmas.debug);
|
1055
|
-
Check.Check.typeOf.object("ellipsoid", ellipsoid);
|
1056
|
-
Check.Check.defined("positions", positions);
|
1057
|
-
Check.Check.defined("indices", indices);
|
1058
|
-
Check.Check.typeOf.number.greaterThanOrEquals("indices.length", indices.length, 3);
|
1059
|
-
Check.Check.typeOf.number.equals("indices.length % 3", "0", indices.length % 3, 0);
|
1060
|
-
Check.Check.typeOf.number.greaterThan("granularity", granularity, 0.0);
|
1061
|
-
//>>includeEnd('debug');
|
1062
|
-
|
1063
|
-
// triangles that need (or might need) to be subdivided.
|
1064
|
-
const triangles = indices.slice(0);
|
1065
|
-
|
1066
|
-
// New positions due to edge splits are appended to the positions list.
|
1067
|
-
let i;
|
1068
|
-
const length = positions.length;
|
1069
|
-
const subdividedPositions = new Array(length * 3);
|
1070
|
-
const subdividedTexcoords = new Array(length * 2);
|
1071
|
-
let q = 0;
|
1072
|
-
let p = 0;
|
1073
|
-
for (i = 0; i < length; i++) {
|
1074
|
-
const item = positions[i];
|
1075
|
-
subdividedPositions[q++] = item.x;
|
1076
|
-
subdividedPositions[q++] = item.y;
|
1077
|
-
subdividedPositions[q++] = item.z;
|
1078
|
-
|
1079
|
-
if (hasTexcoords) {
|
1080
|
-
const texcoordItem = texcoords[i];
|
1081
|
-
subdividedTexcoords[p++] = texcoordItem.x;
|
1082
|
-
subdividedTexcoords[p++] = texcoordItem.y;
|
1083
|
-
}
|
1084
|
-
}
|
1085
|
-
|
1086
|
-
const subdividedIndices = [];
|
1087
|
-
|
1088
|
-
// Used to make sure shared edges are not split more than once.
|
1089
|
-
const edges = {};
|
1090
|
-
|
1091
|
-
const radius = ellipsoid.maximumRadius;
|
1092
|
-
const minDistance = Math$1.CesiumMath.chordLength(granularity, radius);
|
1093
|
-
|
1094
|
-
const rhumb0 = new EllipsoidRhumbLine.EllipsoidRhumbLine(undefined, undefined, ellipsoid);
|
1095
|
-
const rhumb1 = new EllipsoidRhumbLine.EllipsoidRhumbLine(undefined, undefined, ellipsoid);
|
1096
|
-
const rhumb2 = new EllipsoidRhumbLine.EllipsoidRhumbLine(undefined, undefined, ellipsoid);
|
1097
|
-
|
1098
|
-
while (triangles.length > 0) {
|
1099
|
-
const i2 = triangles.pop();
|
1100
|
-
const i1 = triangles.pop();
|
1101
|
-
const i0 = triangles.pop();
|
1102
|
-
|
1103
|
-
const v0 = Matrix3.Cartesian3.fromArray(
|
1104
|
-
subdividedPositions,
|
1105
|
-
i0 * 3,
|
1106
|
-
subdivisionV0Scratch
|
1107
|
-
);
|
1108
|
-
const v1 = Matrix3.Cartesian3.fromArray(
|
1109
|
-
subdividedPositions,
|
1110
|
-
i1 * 3,
|
1111
|
-
subdivisionV1Scratch
|
1112
|
-
);
|
1113
|
-
const v2 = Matrix3.Cartesian3.fromArray(
|
1114
|
-
subdividedPositions,
|
1115
|
-
i2 * 3,
|
1116
|
-
subdivisionV2Scratch
|
1117
|
-
);
|
1118
|
-
|
1119
|
-
let t0, t1, t2;
|
1120
|
-
if (hasTexcoords) {
|
1121
|
-
t0 = Matrix2.Cartesian2.fromArray(
|
1122
|
-
subdividedTexcoords,
|
1123
|
-
i0 * 2,
|
1124
|
-
subdivisionT0Scratch
|
1125
|
-
);
|
1126
|
-
t1 = Matrix2.Cartesian2.fromArray(
|
1127
|
-
subdividedTexcoords,
|
1128
|
-
i1 * 2,
|
1129
|
-
subdivisionT1Scratch
|
1130
|
-
);
|
1131
|
-
t2 = Matrix2.Cartesian2.fromArray(
|
1132
|
-
subdividedTexcoords,
|
1133
|
-
i2 * 2,
|
1134
|
-
subdivisionT2Scratch
|
1135
|
-
);
|
1136
|
-
}
|
1137
|
-
|
1138
|
-
const c0 = ellipsoid.cartesianToCartographic(v0, subdivisionC0Scratch);
|
1139
|
-
const c1 = ellipsoid.cartesianToCartographic(v1, subdivisionC1Scratch);
|
1140
|
-
const c2 = ellipsoid.cartesianToCartographic(v2, subdivisionC2Scratch);
|
1141
|
-
|
1142
|
-
rhumb0.setEndPoints(c0, c1);
|
1143
|
-
const g0 = rhumb0.surfaceDistance;
|
1144
|
-
rhumb1.setEndPoints(c1, c2);
|
1145
|
-
const g1 = rhumb1.surfaceDistance;
|
1146
|
-
rhumb2.setEndPoints(c2, c0);
|
1147
|
-
const g2 = rhumb2.surfaceDistance;
|
1148
|
-
|
1149
|
-
const max = Math.max(g0, g1, g2);
|
1150
|
-
let edge;
|
1151
|
-
let mid;
|
1152
|
-
let midHeight;
|
1153
|
-
let midCartesian3;
|
1154
|
-
let midTexcoord;
|
1155
|
-
|
1156
|
-
// if the max length squared of a triangle edge is greater than granularity, subdivide the triangle
|
1157
|
-
if (max > minDistance) {
|
1158
|
-
if (g0 === max) {
|
1159
|
-
edge = `${Math.min(i0, i1)} ${Math.max(i0, i1)}`;
|
1160
|
-
|
1161
|
-
i = edges[edge];
|
1162
|
-
if (!defaultValue.defined(i)) {
|
1163
|
-
mid = rhumb0.interpolateUsingFraction(
|
1164
|
-
0.5,
|
1165
|
-
subdivisionCartographicScratch
|
1166
|
-
);
|
1167
|
-
midHeight = (c0.height + c1.height) * 0.5;
|
1168
|
-
midCartesian3 = Matrix3.Cartesian3.fromRadians(
|
1169
|
-
mid.longitude,
|
1170
|
-
mid.latitude,
|
1171
|
-
midHeight,
|
1172
|
-
ellipsoid,
|
1173
|
-
subdivisionMidScratch
|
1174
|
-
);
|
1175
|
-
subdividedPositions.push(
|
1176
|
-
midCartesian3.x,
|
1177
|
-
midCartesian3.y,
|
1178
|
-
midCartesian3.z
|
1179
|
-
);
|
1180
|
-
i = subdividedPositions.length / 3 - 1;
|
1181
|
-
edges[edge] = i;
|
1182
|
-
|
1183
|
-
if (hasTexcoords) {
|
1184
|
-
midTexcoord = Matrix2.Cartesian2.add(t0, t1, subdivisionTexcoordMidScratch);
|
1185
|
-
Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
|
1186
|
-
subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
|
1187
|
-
}
|
1188
|
-
}
|
1189
|
-
|
1190
|
-
triangles.push(i0, i, i2);
|
1191
|
-
triangles.push(i, i1, i2);
|
1192
|
-
} else if (g1 === max) {
|
1193
|
-
edge = `${Math.min(i1, i2)} ${Math.max(i1, i2)}`;
|
1194
|
-
|
1195
|
-
i = edges[edge];
|
1196
|
-
if (!defaultValue.defined(i)) {
|
1197
|
-
mid = rhumb1.interpolateUsingFraction(
|
1198
|
-
0.5,
|
1199
|
-
subdivisionCartographicScratch
|
1200
|
-
);
|
1201
|
-
midHeight = (c1.height + c2.height) * 0.5;
|
1202
|
-
midCartesian3 = Matrix3.Cartesian3.fromRadians(
|
1203
|
-
mid.longitude,
|
1204
|
-
mid.latitude,
|
1205
|
-
midHeight,
|
1206
|
-
ellipsoid,
|
1207
|
-
subdivisionMidScratch
|
1208
|
-
);
|
1209
|
-
subdividedPositions.push(
|
1210
|
-
midCartesian3.x,
|
1211
|
-
midCartesian3.y,
|
1212
|
-
midCartesian3.z
|
1213
|
-
);
|
1214
|
-
i = subdividedPositions.length / 3 - 1;
|
1215
|
-
edges[edge] = i;
|
1216
|
-
|
1217
|
-
if (hasTexcoords) {
|
1218
|
-
midTexcoord = Matrix2.Cartesian2.add(t1, t2, subdivisionTexcoordMidScratch);
|
1219
|
-
Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
|
1220
|
-
subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
|
1221
|
-
}
|
1222
|
-
}
|
1223
|
-
|
1224
|
-
triangles.push(i1, i, i0);
|
1225
|
-
triangles.push(i, i2, i0);
|
1226
|
-
} else if (g2 === max) {
|
1227
|
-
edge = `${Math.min(i2, i0)} ${Math.max(i2, i0)}`;
|
1228
|
-
|
1229
|
-
i = edges[edge];
|
1230
|
-
if (!defaultValue.defined(i)) {
|
1231
|
-
mid = rhumb2.interpolateUsingFraction(
|
1232
|
-
0.5,
|
1233
|
-
subdivisionCartographicScratch
|
1234
|
-
);
|
1235
|
-
midHeight = (c2.height + c0.height) * 0.5;
|
1236
|
-
midCartesian3 = Matrix3.Cartesian3.fromRadians(
|
1237
|
-
mid.longitude,
|
1238
|
-
mid.latitude,
|
1239
|
-
midHeight,
|
1240
|
-
ellipsoid,
|
1241
|
-
subdivisionMidScratch
|
1242
|
-
);
|
1243
|
-
subdividedPositions.push(
|
1244
|
-
midCartesian3.x,
|
1245
|
-
midCartesian3.y,
|
1246
|
-
midCartesian3.z
|
1247
|
-
);
|
1248
|
-
i = subdividedPositions.length / 3 - 1;
|
1249
|
-
edges[edge] = i;
|
1250
|
-
|
1251
|
-
if (hasTexcoords) {
|
1252
|
-
midTexcoord = Matrix2.Cartesian2.add(t2, t0, subdivisionTexcoordMidScratch);
|
1253
|
-
Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
|
1254
|
-
subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
|
1255
|
-
}
|
1256
|
-
}
|
1257
|
-
|
1258
|
-
triangles.push(i2, i, i1);
|
1259
|
-
triangles.push(i, i0, i1);
|
1260
|
-
}
|
1261
|
-
} else {
|
1262
|
-
subdividedIndices.push(i0);
|
1263
|
-
subdividedIndices.push(i1);
|
1264
|
-
subdividedIndices.push(i2);
|
1265
|
-
}
|
1266
|
-
}
|
1267
|
-
|
1268
|
-
const geometryOptions = {
|
1269
|
-
attributes: {
|
1270
|
-
position: new GeometryAttribute.GeometryAttribute({
|
1271
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.DOUBLE,
|
1272
|
-
componentsPerAttribute: 3,
|
1273
|
-
values: subdividedPositions,
|
1274
|
-
}),
|
1275
|
-
},
|
1276
|
-
indices: subdividedIndices,
|
1277
|
-
primitiveType: GeometryAttribute.PrimitiveType.TRIANGLES,
|
1278
|
-
};
|
1279
|
-
|
1280
|
-
if (hasTexcoords) {
|
1281
|
-
geometryOptions.attributes.st = new GeometryAttribute.GeometryAttribute({
|
1282
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
1283
|
-
componentsPerAttribute: 2,
|
1284
|
-
values: subdividedTexcoords,
|
1285
|
-
});
|
1286
|
-
}
|
1287
|
-
|
1288
|
-
return new GeometryAttribute.Geometry(geometryOptions);
|
1289
|
-
};
|
1290
|
-
|
1291
|
-
/**
|
1292
|
-
* Scales each position of a geometry's position attribute to a height, in place.
|
1293
|
-
*
|
1294
|
-
* @param {number[]} positions The array of numbers representing the positions to be scaled
|
1295
|
-
* @param {number} [height=0.0] The desired height to add to the positions
|
1296
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
|
1297
|
-
* @param {boolean} [scaleToSurface=true] <code>true</code> if the positions need to be scaled to the surface before the height is added.
|
1298
|
-
* @returns {number[]} The input array of positions, scaled to height
|
1299
|
-
*/
|
1300
|
-
PolygonPipeline.scaleToGeodeticHeight = function (
|
1301
|
-
positions,
|
1302
|
-
height,
|
1303
|
-
ellipsoid,
|
1304
|
-
scaleToSurface
|
1305
|
-
) {
|
1306
|
-
ellipsoid = defaultValue.defaultValue(ellipsoid, Matrix3.Ellipsoid.WGS84);
|
1307
|
-
|
1308
|
-
let n = scaleToGeodeticHeightN;
|
1309
|
-
let p = scaleToGeodeticHeightP;
|
1310
|
-
|
1311
|
-
height = defaultValue.defaultValue(height, 0.0);
|
1312
|
-
scaleToSurface = defaultValue.defaultValue(scaleToSurface, true);
|
1313
|
-
|
1314
|
-
if (defaultValue.defined(positions)) {
|
1315
|
-
const length = positions.length;
|
1316
|
-
|
1317
|
-
for (let i = 0; i < length; i += 3) {
|
1318
|
-
Matrix3.Cartesian3.fromArray(positions, i, p);
|
1319
|
-
|
1320
|
-
if (scaleToSurface) {
|
1321
|
-
p = ellipsoid.scaleToGeodeticSurface(p, p);
|
1322
|
-
}
|
1323
|
-
|
1324
|
-
if (height !== 0) {
|
1325
|
-
n = ellipsoid.geodeticSurfaceNormal(p, n);
|
1326
|
-
|
1327
|
-
Matrix3.Cartesian3.multiplyByScalar(n, height, n);
|
1328
|
-
Matrix3.Cartesian3.add(p, n, p);
|
1329
|
-
}
|
1330
|
-
|
1331
|
-
positions[i] = p.x;
|
1332
|
-
positions[i + 1] = p.y;
|
1333
|
-
positions[i + 2] = p.z;
|
1334
|
-
}
|
1335
|
-
}
|
1336
|
-
|
1337
|
-
return positions;
|
1338
|
-
};
|
1339
|
-
var PolygonPipeline$1 = PolygonPipeline;
|
1340
|
-
|
1341
|
-
exports.PolygonPipeline = PolygonPipeline$1;
|
1342
|
-
exports.WindingOrder = WindingOrder$1;
|
1343
|
-
|
1344
|
-
}));
|