@vcmap/ui 5.0.0-rc.6 → 5.0.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -22
- package/build/build.js +0 -3
- package/build/buildHelpers.js +0 -1
- package/build/commonViteConfig.js +1 -1
- package/config/aerowest.config.json +2 -1
- package/config/base.config.json +7 -7
- package/config/dev.config.json +4 -4
- package/dist/assets/cesium/Workers/{AttributeCompression-27507afe.js → AttributeCompression-80665726.js} +1 -1
- package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-7565c1e8.js → AxisAlignedBoundingBox-a655a4bc.js} +1 -1
- package/dist/assets/cesium/Workers/{BoundingRectangle-9d707275.js → BoundingRectangle-c3b79029.js} +1 -1
- package/dist/assets/cesium/Workers/{BoxGeometry-fb31d3b5.js → BoxGeometry-f8f9c981.js} +1 -1
- package/dist/assets/cesium/Workers/{Color-56bb5728.js → Color-de06a177.js} +1 -1
- package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-72143c19.js → CoplanarPolygonGeometryLibrary-48cdc26d.js} +1 -1
- package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-7bae1712.js → CorridorGeometryLibrary-ddc027d3.js} +1 -1
- package/dist/assets/cesium/Workers/{CylinderGeometry-331891fe.js → CylinderGeometry-82a8cbe6.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometry-5e3f67b6.js → EllipseGeometry-32d55454.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-dbc15162.js → EllipseGeometryLibrary-b2ae188a.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-21191fce.js → EllipseOutlineGeometry-f05a5a27.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidGeodesic-cc3bace8.js → EllipsoidGeodesic-19e75e11.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidGeometry-8bfa24a9.js → EllipsoidGeometry-7c99fc81.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-48d9c023.js → EllipsoidOutlineGeometry-21c243df.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidRhumbLine-125a8b72.js → EllipsoidRhumbLine-6145377b.js} +1 -1
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-a01286f6.js +1 -0
- package/dist/assets/cesium/Workers/{EncodedCartesian3-96fdc0ef.js → EncodedCartesian3-d9f5c4a4.js} +1 -1
- package/dist/assets/cesium/Workers/{FrustumGeometry-9ab86004.js → FrustumGeometry-17776af8.js} +1 -1
- package/dist/assets/cesium/Workers/GeometryAttribute-89a520b9.js +1 -0
- package/dist/assets/cesium/Workers/{GeometryInstance-13e4ff38.js → GeometryInstance-4fbf16ba.js} +1 -1
- package/dist/assets/cesium/Workers/{GeometryPipeline-e0eb4567.js → GeometryPipeline-309fad76.js} +1 -1
- package/dist/assets/cesium/Workers/IntersectionTests-58aa8f80.js +1 -0
- package/dist/assets/cesium/Workers/{Matrix2-37e55508.js → Matrix2-47e98d76.js} +0 -0
- package/dist/assets/cesium/Workers/{OrientedBoundingBox-e9c07538.js → OrientedBoundingBox-fcb5b750.js} +1 -1
- package/dist/assets/cesium/Workers/{Plane-6ee42cab.js → Plane-3f01019d.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-b408c688.js → PolygonGeometryLibrary-0b29eb16.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonPipeline-7b8e4643.js → PolygonPipeline-a934c4dd.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylinePipeline-6757400c.js → PolylinePipeline-8095c9bc.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-eb972210.js → PolylineVolumeGeometryLibrary-67d12fff.js} +1 -1
- package/dist/assets/cesium/Workers/{PrimitivePipeline-f244975e.js → PrimitivePipeline-980e44c5.js} +1 -1
- package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-1bd6152a.js → RectangleGeometryLibrary-621c6de8.js} +1 -1
- package/dist/assets/cesium/Workers/{TerrainEncoding-5a21a97f.js → TerrainEncoding-f96552d5.js} +1 -1
- package/dist/assets/cesium/Workers/{Transforms-eb5c1a84.js → Transforms-c8cb8f43.js} +3 -3
- package/dist/assets/cesium/Workers/{WallGeometryLibrary-a6b6a368.js → WallGeometryLibrary-c03d8479.js} +1 -1
- package/dist/assets/cesium/Workers/{WebMercatorProjection-2839e524.js → WebMercatorProjection-79b3214e.js} +1 -1
- package/dist/assets/cesium/Workers/combineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createBoxGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCircleGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSphereGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePolylines.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/dist/assets/cesium/Workers/createWallGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/dist/assets/{cesium.fba8ca.js → cesium.4e40f4.js} +955 -968
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core.edcf5e.js +4 -0
- package/dist/assets/core.js +1 -1
- package/dist/assets/{index.6a83278e.js → index.889d0f3a.js} +1 -1
- package/dist/assets/{ol.abea3a.js → ol.246fd4.js} +0 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.df4f6d.css +1 -0
- package/dist/assets/ui.df4f6d.js +43 -0
- package/dist/assets/ui.js +1 -1
- package/dist/assets/{vue-composition-api.7051d7.js → vue-composition-api.a520f3.js} +1 -1
- package/dist/assets/vue-composition-api.js +2 -2
- package/dist/assets/{vue.9fd7f6.js → vue.2cee44.js} +0 -0
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify.33dafc.css → vuetify.cc817b.css} +1 -1
- package/dist/assets/{vuetify.33dafc.js → vuetify.cc817b.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/index.js +96 -6
- package/package.json +3 -4
- package/plugins/@vcmap/pluginExample/index.js +5 -5
- package/plugins/@vcmap/pluginExample/pluginExampleComponent.vue +1 -1
- package/plugins/@vcmap/project-selector/ContextsListComponent.vue +1 -1
- package/plugins/@vcmap/project-selector/index.js +5 -5
- package/plugins/@vcmap/project-selector/package.json +1 -2
- package/plugins/@vcmap/theme-changer/index.js +6 -6
- package/plugins/buttonExamples/ButtonExamples.vue +1 -1
- package/plugins/buttonExamples/index.js +5 -4
- package/plugins/categoryTest/Categories.vue +1 -1
- package/plugins/categoryTest/Category.vue +1 -1
- package/plugins/categoryTest/index.js +5 -5
- package/plugins/example/index.js +33 -14
- package/plugins/test/allIconsComponent.vue +34 -0
- package/plugins/test/editor.vue +1 -1
- package/plugins/test/index.js +40 -17
- package/plugins/test/toolbox-data.js +106 -26
- package/plugins/test/windowManagerExample.vue +1 -2
- package/src/actions/actionHelper.js +41 -1
- package/src/actions/styleSelector.vue +1 -1
- package/src/application/Navbar.vue +47 -6
- package/src/application/VcsApp.vue +37 -29
- package/src/application/VcsMap.vue +1 -20
- package/src/assets/logo-mobile.svg +9 -0
- package/src/assets/logo.svg +23 -23
- package/src/components/buttons/VcsActionButtonList.vue +99 -0
- package/src/components/buttons/VcsButton.vue +201 -0
- package/src/components/form-inputs-controls/VcsCheckbox.vue +73 -0
- package/src/components/form-inputs-controls/VcsColorPicker.vue +81 -0
- package/src/components/form-inputs-controls/VcsFormSection.vue +46 -0
- package/src/components/form-inputs-controls/VcsLabel.vue +38 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +97 -0
- package/src/components/form-inputs-controls/VcsTextArea.vue +130 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +129 -0
- package/src/components/form-output/VcsFormattedNumber.vue +103 -0
- package/src/components/lists/VcsActionList.vue +100 -0
- package/src/components/lists/VcsTreeview.vue +109 -0
- package/src/components/lists/VcsTreeviewLeaf.vue +105 -0
- package/src/components/lists/VcsTreeviewSearchbar.vue +156 -0
- package/src/components/notification/VcsBadge.vue +27 -0
- package/src/components/notification/VcsTooltip.vue +154 -0
- package/src/components/notification/validation.js +19 -0
- package/src/contentTree/LayerTree.vue +1 -1
- package/src/contentTree/contentTreeCollection.js +6 -2
- package/src/icons/+all.js +359 -0
- package/src/icons/2DAreaIcon.vue +21 -0
- package/src/icons/2DDistanceIcon.vue +18 -0
- package/src/icons/3DAreaIcon.vue +21 -0
- package/src/icons/3DDistanceIcon.vue +18 -0
- package/src/icons/3DHeightIcon.vue +18 -0
- package/src/icons/AngleIcon.vue +8 -0
- package/src/icons/AssociationsIcon.vue +34 -0
- package/src/icons/AxisIcon.vue +10 -0
- package/src/icons/BoundingBoxIcon.vue +15 -0
- package/src/icons/CheckboxCheckedIcon.vue +16 -0
- package/src/icons/CheckboxIcon.vue +23 -0
- package/src/icons/CheckboxIndeterminateIcon.vue +24 -0
- package/src/icons/CircleIcon.vue +10 -0
- package/src/icons/ColorSwatchIcon.vue +17 -0
- package/src/icons/CommentIcon.vue +19 -0
- package/src/icons/CompassIcon.vue +8 -0
- package/src/icons/ComponentsIcon.vue +7 -0
- package/src/icons/ConeIcon.vue +11 -0
- package/src/icons/DimensionsHouseIcon.vue +14 -0
- package/src/icons/ElevationProfileIcon.vue +111 -0
- package/src/icons/ExportAreaIcon.vue +7 -0
- package/src/icons/ExportFlightIcon.vue +7 -0
- package/src/icons/ExportIcon.vue +8 -0
- package/src/icons/ExternalLinkIcon.vue +10 -0
- package/src/icons/EyeIcon.vue +7 -0
- package/src/icons/FastForwardIcon.vue +7 -0
- package/src/icons/FilterIcon.vue +8 -0
- package/src/icons/GlobeNatureIcon.vue +14 -0
- package/src/icons/HealthCareIndustriesIcon.vue +118 -0
- package/src/icons/HelpIcon.vue +7 -0
- package/src/icons/HomePointIcon.vue +8 -0
- package/src/icons/HospitalsIcon.vue +237 -0
- package/src/icons/HouseIcon.vue +25 -0
- package/src/icons/ImportIcon.vue +8 -0
- package/src/icons/InfoIcon.vue +10 -0
- package/src/icons/KebabIcon.vue +36 -0
- package/src/icons/LabelIcon.vue +7 -0
- package/src/icons/LayersIcon.vue +26 -0
- package/src/icons/LegendIcon.vue +65 -0
- package/src/icons/LineIcon.vue +7 -0
- package/src/icons/LinkIcon.vue +7 -0
- package/src/icons/MapIcon.vue +8 -0
- package/src/icons/MenuIcon.vue +34 -0
- package/src/icons/MinusIcon.vue +8 -0
- package/src/icons/ObjectAttributeIcon.vue +18 -0
- package/src/icons/ObjectSelectIcon.vue +8 -0
- package/src/icons/ObliqueViewIcon.vue +13 -0
- package/src/icons/PdfIcon.vue +10 -0
- package/src/icons/PedestrianIcon.vue +8 -0
- package/src/icons/PenIcon.vue +14 -0
- package/src/icons/PlayCircleIcon.vue +10 -0
- package/src/icons/PlusIcon.vue +9 -0
- package/src/icons/PoiIcon.vue +7 -0
- package/src/icons/PointSelectIcon.vue +7 -0
- package/src/icons/PolygonIcon.vue +38 -0
- package/src/icons/PresentationModeIcon.vue +7 -0
- package/src/icons/ProgressIcon.vue +24 -0
- package/src/icons/QueryIcon.vue +15 -0
- package/src/icons/RectangleIcon.vue +9 -0
- package/src/icons/ReturnIcon.vue +7 -0
- package/src/icons/RewindIcon.vue +6 -0
- package/src/icons/SearchIcon.vue +8 -0
- package/src/icons/ShadowIcon.vue +9 -0
- package/src/icons/ShapesIcon.vue +28 -0
- package/src/icons/ShareIcon.vue +22 -0
- package/src/icons/SimpleCircleFilledIcon.vue +15 -0
- package/src/icons/SimpleCircleHalfFilledIcon.vue +12 -0
- package/src/icons/SimpleCircleOutlinedIcon.vue +15 -0
- package/src/icons/SkipNextIcon.vue +7 -0
- package/src/icons/SkipPreviousIcon.vue +9 -0
- package/src/icons/SplitViewIcon.vue +19 -0
- package/src/icons/TextStyleIcon.vue +14 -0
- package/src/icons/ThreeDimensionsIcon.vue +7 -0
- package/src/icons/ToolsIcon.vue +35 -0
- package/src/icons/TouchIcon.vue +8 -0
- package/src/icons/TrashCanIcon.vue +7 -0
- package/src/icons/TriangleIcon.vue +15 -0
- package/src/icons/TwoDimensionsIcon.vue +8 -0
- package/src/icons/UploadIcon.vue +14 -0
- package/src/icons/VideoRecorderIcon.vue +14 -0
- package/src/icons/WalkingIcon.vue +7 -0
- package/src/icons/WallIcon.vue +14 -0
- package/src/manager/buttonManager.js +5 -52
- package/src/manager/navbarManager.js +81 -0
- package/src/manager/toolbox/ToolboxGroupComponent.vue +128 -0
- package/src/manager/toolbox/ToolboxManager.vue +119 -76
- package/src/manager/toolbox/toolboxManager.js +204 -0
- package/src/manager/window/WindowComponent.vue +27 -20
- package/src/manager/window/WindowComponentHeader.vue +13 -6
- package/src/manager/window/WindowManager.vue +18 -1
- package/src/manager/window/windowManager.js +3 -5
- package/src/navigation/mapNavigation.vue +34 -5
- package/src/navigation/orientationToolsButton.vue +1 -1
- package/src/navigation/overviewMap.js +616 -0
- package/src/navigation/overviewMapClickedInteraction.js +38 -0
- package/src/navigation/tiltSlider.vue +1 -1
- package/src/styles/_theming.scss +10 -0
- package/src/styles/main.scss +3 -0
- package/src/styles/variables.scss +70 -0
- package/src/styles/vcsFont.scss +5 -0
- package/src/styles/vcsGrid.scss +4 -0
- package/src/vcsUiApp.js +18 -3
- package/src/vuePlugins/vuetify.js +1 -1
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-678e34e4.js +0 -1
- package/dist/assets/cesium/Workers/GeometryAttribute-3915ea0b.js +0 -1
- package/dist/assets/cesium/Workers/IntersectionTests-ac2459de.js +0 -1
- package/dist/assets/core.d5ed0f.js +0 -4
- package/dist/assets/ui.ad1ec9.css +0 -1
- package/dist/assets/ui.ad1ec9.js +0 -39
- package/dist/assets/uicomponents.161461.css +0 -1
- package/dist/assets/uicomponents.161461.js +0 -31
- package/dist/assets/uicomponents.js +0 -1
- package/lib/uicomponents.js +0 -1
- package/src/manager/toolbox/ToolboxMultiSelectButton.vue +0 -96
- package/src/manager/toolbox/ToolboxSingleSelectButton.vue +0 -98
- package/src/manager/toolbox/toolbox-manager.js +0 -203
@@ -0,0 +1,70 @@
|
|
1
|
+
/** Global **/
|
2
|
+
$font-size: 14px;
|
3
|
+
$font-size-root: 14px;
|
4
|
+
|
5
|
+
// input font and icon
|
6
|
+
$input-font-size: $font-size;
|
7
|
+
$input-icon-height: 16px; // 24px !default;
|
8
|
+
$input-icon-width: 16px; // 24px !default;
|
9
|
+
$input-icon-min-width: 16px; // 24px !default;
|
10
|
+
|
11
|
+
|
12
|
+
/** VcsTextfield **/
|
13
|
+
|
14
|
+
// height, size and padding
|
15
|
+
$text-field-padding: 2px 0 1px; //8px 0 8px !default;
|
16
|
+
$text-field-filled-full-width-outlined-slot-min-height: 32px; // 56px !default;
|
17
|
+
$text-field-filled-full-width-outlined-single-line-slot-min-height: 24px; //40px !default;
|
18
|
+
$text-field-solo-control-min-height: 30px; //48px !default;
|
19
|
+
$text-field-solo-dense-control-min-height: 22px; //38px !default;
|
20
|
+
$text-field-outlined-fieldset-border: 1px solid currentColor; // 2px solid currentColor !default;
|
21
|
+
|
22
|
+
// dense non outlined
|
23
|
+
$text-field-dense-padding: 2px 0px 1px; //4px 0 2px !default;
|
24
|
+
|
25
|
+
// clear icon non dense
|
26
|
+
$text-field-enclosed-prepend-append-margin-top: 9px;
|
27
|
+
|
28
|
+
// tooltip icon in append slot
|
29
|
+
$text-field-outlined-append-prepend-outer-margin-top: 4px; // 18px !default;
|
30
|
+
$text-field-append-prepend-margin: 0px; // 4px !default;
|
31
|
+
$text-field-outlined-prepend-append-margin-top: 4px; // 8px !default;
|
32
|
+
|
33
|
+
// label position for outlined Label dense and non-dense
|
34
|
+
$text-field-outlined-label-position-x: 6px;
|
35
|
+
$text-field-outlined-label-position-y: -14px;
|
36
|
+
$text-field-outlined-dense-label-position-x: 2px;
|
37
|
+
$text-field-outlined-dense-label-position-y: -10px;
|
38
|
+
$text-field-label-top: 2px; // 6px !default;
|
39
|
+
$text-field-label-active-transform: translateY(-14px) scale(.75); //translateY(-18px) scale(.75) !default;
|
40
|
+
|
41
|
+
/** VcsTextarea **/
|
42
|
+
$textarea-box-enclosed-single-outlined-margin-top: 0px; // 10px !default;
|
43
|
+
$textarea-dense-box-enclosed-single-outlined-margin-top: 0px; // 6px !default;
|
44
|
+
|
45
|
+
/** VcsCheckbox **/
|
46
|
+
$icon-size: 20px; // 24px !default;
|
47
|
+
$icon-size-dense: 16px; // 20px !default;
|
48
|
+
|
49
|
+
/** VcsSelect **/
|
50
|
+
|
51
|
+
$select-dense-selections-margin: 4px 4px 3px 0; // 5px 4px 3px 0 !default;
|
52
|
+
|
53
|
+
// list box
|
54
|
+
$list-padding: 0 0; // 8px 0 !default;
|
55
|
+
$list-item-title-font-size: $font-size; // map-deep-get($headings, 'subtitle-1', 'size') !default;
|
56
|
+
$list-item-dense-title-font-size: $font-size; // 0.8125rem !default;
|
57
|
+
$list-item-dense-title-line-height: 24px; // 1rem !default;
|
58
|
+
$list-item-min-height: 32px; // 48px !default;
|
59
|
+
$list-dense-min-height: 24px; // 40px !default;
|
60
|
+
$list-item-content-padding: 4px 0; // 12px 0 !default;
|
61
|
+
$list-dense-content-padding: 0 0; // 8px 0 !default;
|
62
|
+
$list-item-action-icon-margin: 0 0; //32px !default;
|
63
|
+
$list-item-action-margin: 0 0; // 12px 0 !default;
|
64
|
+
$list-item-icon-margin: auto 0; // 16px 0 !default;
|
65
|
+
|
66
|
+
|
67
|
+
/** Treeview **/
|
68
|
+
$treeview-node-level-width: 16px;
|
69
|
+
$treeview-node-margin: 4px;
|
70
|
+
$treeview-node-height: 32px; // 48px !default;
|
package/src/vcsUiApp.js
CHANGED
@@ -13,11 +13,12 @@ import {
|
|
13
13
|
serializePlugin,
|
14
14
|
deserializePlugin,
|
15
15
|
} from './pluginHelper.js';
|
16
|
-
import { ToolboxManager } from './manager/toolbox/
|
16
|
+
import { setupDefaultGroups, ToolboxManager } from './manager/toolbox/toolboxManager.js';
|
17
17
|
import { WindowManager } from './manager/window/windowManager.js';
|
18
|
-
import
|
18
|
+
import { NavbarManager } from './manager/navbarManager.js';
|
19
19
|
import { createContentTreeCollection } from './contentTree/contentTreeCollection.js';
|
20
20
|
import { contentTreeClassRegistry } from './contentTree/contentTreeItem.js';
|
21
|
+
import OverviewMap from './navigation/overviewMap.js';
|
21
22
|
|
22
23
|
/**
|
23
24
|
* @typedef {import("@vcmap/core").VcsAppConfig} VcsUiAppConfig
|
@@ -114,6 +115,7 @@ class VcsUiApp extends VcsApp {
|
|
114
115
|
* @private
|
115
116
|
*/
|
116
117
|
this._toolboxManager = new ToolboxManager();
|
118
|
+
setupDefaultGroups(this._toolboxManager);
|
117
119
|
|
118
120
|
/**
|
119
121
|
* @type {WindowManager}
|
@@ -124,7 +126,13 @@ class VcsUiApp extends VcsApp {
|
|
124
126
|
* @type {ButtonManager}
|
125
127
|
* @private
|
126
128
|
*/
|
127
|
-
this._navbarManager = new
|
129
|
+
this._navbarManager = new NavbarManager();
|
130
|
+
|
131
|
+
/**
|
132
|
+
* @type {OverviewMap}
|
133
|
+
* @private
|
134
|
+
*/
|
135
|
+
this._overviewMap = new OverviewMap(this);
|
128
136
|
}
|
129
137
|
|
130
138
|
/**
|
@@ -163,6 +171,12 @@ class VcsUiApp extends VcsApp {
|
|
163
171
|
*/
|
164
172
|
get navbarManager() { return this._navbarManager; }
|
165
173
|
|
174
|
+
/**
|
175
|
+
* @type {OverviewMap}
|
176
|
+
* @readonly
|
177
|
+
*/
|
178
|
+
get overviewMap() { return this._overviewMap; }
|
179
|
+
|
166
180
|
/**
|
167
181
|
* @param {import("@vcmap/core").Context} context
|
168
182
|
* @returns {Promise<void>}
|
@@ -211,6 +225,7 @@ class VcsUiApp extends VcsApp {
|
|
211
225
|
destroy() {
|
212
226
|
this.windowManager.destroy();
|
213
227
|
this.navbarManager.destroy();
|
228
|
+
this._overviewMap.destroy();
|
214
229
|
// TODO destroy other manager
|
215
230
|
this._pluginAddedListener();
|
216
231
|
destroyCollection(this._plugins);
|
@@ -1 +0,0 @@
|
|
1
|
-
define(["exports","./AxisAlignedBoundingBox-7565c1e8","./Matrix2-37e55508","./RuntimeError-8952249c","./defaultValue-81eec7ed","./IntersectionTests-ac2459de","./Plane-6ee42cab","./Transforms-eb5c1a84"],(function(t,e,n,i,o,r,s,a){"use strict";const l=new n.Cartesian4;function c(t,e){t=(e=o.defaultValue(e,n.Ellipsoid.WGS84)).scaleToGeodeticSurface(t);const i=a.Transforms.eastNorthUpToFixedFrame(t,e);this._ellipsoid=e,this._origin=t,this._xAxis=n.Cartesian3.fromCartesian4(n.Matrix4.getColumn(i,0,l)),this._yAxis=n.Cartesian3.fromCartesian4(n.Matrix4.getColumn(i,1,l));const r=n.Cartesian3.fromCartesian4(n.Matrix4.getColumn(i,2,l));this._plane=s.Plane.fromPointNormal(t,r)}Object.defineProperties(c.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});const d=new e.AxisAlignedBoundingBox;c.fromPoints=function(t,n){return new c(e.AxisAlignedBoundingBox.fromPoints(t,d).center,n)};const p=new r.Ray,u=new n.Cartesian3;c.prototype.projectPointOntoPlane=function(t,e){const i=p;i.origin=t,n.Cartesian3.normalize(t,i.direction);let s=r.IntersectionTests.rayPlane(i,this._plane,u);if(o.defined(s)||(n.Cartesian3.negate(i.direction,i.direction),s=r.IntersectionTests.rayPlane(i,this._plane,u)),o.defined(s)){const t=n.Cartesian3.subtract(s,this._origin,s),i=n.Cartesian3.dot(this._xAxis,t),r=n.Cartesian3.dot(this._yAxis,t);return o.defined(e)?(e.x=i,e.y=r,e):new n.Cartesian2(i,r)}},c.prototype.projectPointsOntoPlane=function(t,e){o.defined(e)||(e=[]);let n=0;const i=t.length;for(let r=0;r<i;r++){const i=this.projectPointOntoPlane(t[r],e[n]);o.defined(i)&&(e[n]=i,n++)}return e.length=n,e},c.prototype.projectPointToNearestOnPlane=function(t,e){o.defined(e)||(e=new n.Cartesian2);const i=p;i.origin=t,n.Cartesian3.clone(this._plane.normal,i.direction);let s=r.IntersectionTests.rayPlane(i,this._plane,u);o.defined(s)||(n.Cartesian3.negate(i.direction,i.direction),s=r.IntersectionTests.rayPlane(i,this._plane,u));const a=n.Cartesian3.subtract(s,this._origin,s),l=n.Cartesian3.dot(this._xAxis,a),c=n.Cartesian3.dot(this._yAxis,a);return e.x=l,e.y=c,e},c.prototype.projectPointsToNearestOnPlane=function(t,e){o.defined(e)||(e=[]);const n=t.length;e.length=n;for(let i=0;i<n;i++)e[i]=this.projectPointToNearestOnPlane(t[i],e[i]);return e};const f=new n.Cartesian3;c.prototype.projectPointOntoEllipsoid=function(t,e){o.defined(e)||(e=new n.Cartesian3);const i=this._ellipsoid,r=this._origin,s=this._xAxis,a=this._yAxis,l=f;return n.Cartesian3.multiplyByScalar(s,t.x,l),e=n.Cartesian3.add(r,l,e),n.Cartesian3.multiplyByScalar(a,t.y,l),n.Cartesian3.add(e,l,e),i.scaleToGeocentricSurface(e,e),e},c.prototype.projectPointsOntoEllipsoid=function(t,e){const n=t.length;o.defined(e)?e.length=n:e=new Array(n);for(let i=0;i<n;++i)e[i]=this.projectPointOntoEllipsoid(t[i],e[i]);return e},t.EllipsoidTangentPlane=c}));
|
@@ -1 +0,0 @@
|
|
1
|
-
define(["exports","./Matrix2-37e55508","./RuntimeError-8952249c","./defaultValue-81eec7ed","./WebGLConstants-508b9636","./Transforms-eb5c1a84"],(function(t,e,n,a,r,i){"use strict";var o=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});const s={POINTS:r.WebGLConstants.POINTS,LINES:r.WebGLConstants.LINES,LINE_LOOP:r.WebGLConstants.LINE_LOOP,LINE_STRIP:r.WebGLConstants.LINE_STRIP,TRIANGLES:r.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:r.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:r.WebGLConstants.TRIANGLE_FAN,validate:function(t){return t===s.POINTS||t===s.LINES||t===s.LINE_LOOP||t===s.LINE_STRIP||t===s.TRIANGLES||t===s.TRIANGLE_STRIP||t===s.TRIANGLE_FAN}};var u=Object.freeze(s);function I(t){t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=a.defaultValue(t.primitiveType,u.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=a.defaultValue(t.geometryType,o.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}I.computeNumberOfVertices=function(t){let e=-1;for(const n in t.attributes)if(t.attributes.hasOwnProperty(n)&&a.defined(t.attributes[n])&&a.defined(t.attributes[n].values)){const a=t.attributes[n];e=a.values.length/a.componentsPerAttribute}return e};const N=new e.Cartographic,c=new e.Cartesian3,l=new e.Matrix4,T=[new e.Cartographic,new e.Cartographic,new e.Cartographic],m=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],p=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],y=new e.Cartesian3,E=new i.Quaternion,b=new e.Matrix4,f=new e.Matrix2;I._textureCoordinateRotationPoints=function(t,n,a,r){let o;const s=e.Rectangle.center(r,N),u=e.Cartographic.toCartesian(s,a,c),I=i.Transforms.eastNorthUpToFixedFrame(u,a,l),L=e.Matrix4.inverse(I,l),C=m,h=T;h[0].longitude=r.west,h[0].latitude=r.south,h[1].longitude=r.west,h[1].latitude=r.north,h[2].longitude=r.east,h[2].latitude=r.south;let d=y;for(o=0;o<3;o++)e.Cartographic.toCartesian(h[o],a,d),d=e.Matrix4.multiplyByPointAsVector(L,d,d),C[o].x=d.x,C[o].y=d.y;const x=i.Quaternion.fromAxisAngle(e.Cartesian3.UNIT_Z,-n,E),A=e.Matrix3.fromQuaternion(x,b),P=t.length;let S=Number.POSITIVE_INFINITY,G=Number.POSITIVE_INFINITY,R=Number.NEGATIVE_INFINITY,w=Number.NEGATIVE_INFINITY;for(o=0;o<P;o++)d=e.Matrix4.multiplyByPointAsVector(L,t[o],d),d=e.Matrix3.multiplyByVector(A,d,d),S=Math.min(S,d.x),G=Math.min(G,d.y),R=Math.max(R,d.x),w=Math.max(w,d.y);const O=e.Matrix2.fromRotation(n,f),_=p;_[0].x=S,_[0].y=G,_[1].x=S,_[1].y=w,_[2].x=R,_[2].y=G;const g=C[0],V=C[2].x-g.x,M=C[1].y-g.y;for(o=0;o<3;o++){const t=_[o];e.Matrix2.multiplyByVector(O,t,t),t.x=(t.x-g.x)/V,t.y=(t.y-g.y)/M}const v=_[0],F=_[1],W=_[2],Y=new Array(6);return e.Cartesian2.pack(v,Y),e.Cartesian2.pack(F,Y,2),e.Cartesian2.pack(W,Y,4),Y},t.Geometry=I,t.GeometryAttribute=function(t){t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT),this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=a.defaultValue(t.normalize,!1),this.values=t.values},t.GeometryType=o,t.PrimitiveType=u}));
|
@@ -1 +0,0 @@
|
|
1
|
-
define(["exports","./Matrix2-37e55508","./defaultValue-81eec7ed","./RuntimeError-8952249c","./Transforms-eb5c1a84","./ComponentDatatype-a15c9a19"],(function(t,e,n,a,i,r){"use strict";const s={};function o(t,e,n){const a=t+e;return r.CesiumMath.sign(t)!==r.CesiumMath.sign(e)&&Math.abs(a/Math.max(Math.abs(t),Math.abs(e)))<n?0:a}s.computeDiscriminant=function(t,e,n){return e*e-4*t*n},s.computeRealRoots=function(t,e,n){let a;if(0===t)return 0===e?[]:[-n/e];if(0===e){if(0===n)return[0,0];const e=Math.abs(n),i=Math.abs(t);if(e<i&&e/i<r.CesiumMath.EPSILON14)return[0,0];if(e>i&&i/e<r.CesiumMath.EPSILON14)return[];if(a=-n/t,a<0)return[];const s=Math.sqrt(a);return[-s,s]}if(0===n)return a=-e/t,a<0?[a,0]:[0,a];const i=o(e*e,-(4*t*n),r.CesiumMath.EPSILON14);if(i<0)return[];const s=-.5*o(e,r.CesiumMath.sign(e)*Math.sqrt(i),r.CesiumMath.EPSILON14);return e>0?[s/t,n/s]:[n/s,s/t]};const c={};function u(t,e,n,a){const i=t,r=e/3,s=n/3,o=a,c=i*s,u=r*o,l=r*r,C=s*s,M=i*s-l,h=i*o-r*s,m=r*o-C,f=4*M*m-h*h;let d,g;if(f<0){let t,e,n;l*u>=c*C?(t=i,e=M,n=-2*r*M+i*h):(t=o,e=m,n=-o*h+2*s*m);const a=-(n<0?-1:1)*Math.abs(t)*Math.sqrt(-f);g=-n+a;const p=g/2,w=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),R=g===a?-w:-e/w;return d=e<=0?w+R:-n/(w*w+R*R+e),l*u>=c*C?[(d-r)/i]:[-o/(d+s)]}const p=M,w=-2*r*M+i*h,R=m,S=-o*h+2*s*m,O=Math.sqrt(f),x=Math.sqrt(3)/2;let y=Math.abs(Math.atan2(i*O,-w)/3);d=2*Math.sqrt(-p);let P=Math.cos(y);g=d*P;let N=d*(-P/2-x*Math.sin(y));const b=g+N>2*r?g-r:N-r,q=i,L=b/q;y=Math.abs(Math.atan2(o*O,-S)/3),d=2*Math.sqrt(-R),P=Math.cos(y),g=d*P,N=d*(-P/2-x*Math.sin(y));const I=-o,E=g+N<2*s?g+s:N+s,z=I/E,T=-b*E-q*I,v=(s*T-r*(b*I))/(-r*T+s*(q*E));return L<=v?L<=z?v<=z?[L,v,z]:[L,z,v]:[z,L,v]:L<=z?[v,L,z]:v<=z?[v,z,L]:[z,v,L]}c.computeDiscriminant=function(t,e,n,a){const i=e*e,r=n*n;return 18*t*e*n*a+i*r-27*(t*t)*(a*a)-4*(t*r*n+i*e*a)},c.computeRealRoots=function(t,e,n,a){let i,r;if(0===t)return s.computeRealRoots(e,n,a);if(0===e){if(0===n){if(0===a)return[0,0,0];r=-a/t;const e=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[e,e,e]}return 0===a?(i=s.computeRealRoots(t,0,n),0===i.Length?[0]:[i[0],0,i[1]]):u(t,0,n,a)}return 0===n?0===a?(r=-e/t,r<0?[r,0,0]:[0,0,r]):u(t,e,0,a):0===a?(i=s.computeRealRoots(t,e,n),0===i.length?[0]:i[1]<=0?[i[0],i[1],0]:i[0]>=0?[0,i[0],i[1]]:[i[0],0,i[1]]):u(t,e,n,a)};const l={};function C(t,e,n,a){const i=t*t,o=e-3*i/8,u=n-e*t/2+i*t/8,l=a-n*t/4+e*i/16-3*i*i/256,C=c.computeRealRoots(1,2*o,o*o-4*l,-u*u);if(C.length>0){const e=-t/4,n=C[C.length-1];if(Math.abs(n)<r.CesiumMath.EPSILON14){const t=s.computeRealRoots(1,o,l);if(2===t.length){const n=t[0],a=t[1];let i;if(n>=0&&a>=0){const t=Math.sqrt(n),i=Math.sqrt(a);return[e-i,e-t,e+t,e+i]}if(n>=0&&a<0)return i=Math.sqrt(n),[e-i,e+i];if(n<0&&a>=0)return i=Math.sqrt(a),[e-i,e+i]}return[]}if(n>0){const t=Math.sqrt(n),a=(o+n-u/t)/2,i=(o+n+u/t)/2,r=s.computeRealRoots(1,t,a),c=s.computeRealRoots(1,-t,i);return 0!==r.length?(r[0]+=e,r[1]+=e,0!==c.length?(c[0]+=e,c[1]+=e,r[1]<=c[0]?[r[0],r[1],c[0],c[1]]:c[1]<=r[0]?[c[0],c[1],r[0],r[1]]:r[0]>=c[0]&&r[1]<=c[1]?[c[0],r[0],r[1],c[1]]:c[0]>=r[0]&&c[1]<=r[1]?[r[0],c[0],c[1],r[1]]:r[0]>c[0]&&r[0]<c[1]?[c[0],r[0],c[1],r[1]]:[r[0],c[0],r[1],c[1]]):r):0!==c.length?(c[0]+=e,c[1]+=e,c):[]}}return[]}function M(t,e,n,a){const i=t*t,o=-2*e,u=n*t+e*e-4*a,l=i*a-n*e*t+n*n,C=c.computeRealRoots(1,o,u,l);if(C.length>0){const o=C[0],c=e-o,u=c*c,l=t/2,M=c/2,h=u-4*a,m=u+4*Math.abs(a),f=i-4*o,d=i+4*Math.abs(o);let g,p,w,R,S,O;if(o<0||h*d<f*m){const e=Math.sqrt(f);g=e/2,p=0===e?0:(t*M-n)/e}else{const e=Math.sqrt(h);g=0===e?0:(t*M-n)/e,p=e/2}0===l&&0===g?(w=0,R=0):r.CesiumMath.sign(l)===r.CesiumMath.sign(g)?(w=l+g,R=o/w):(R=l-g,w=o/R),0===M&&0===p?(S=0,O=0):r.CesiumMath.sign(M)===r.CesiumMath.sign(p)?(S=M+p,O=a/S):(O=M-p,S=a/O);const x=s.computeRealRoots(1,w,S),y=s.computeRealRoots(1,R,O);if(0!==x.length)return 0!==y.length?x[1]<=y[0]?[x[0],x[1],y[0],y[1]]:y[1]<=x[0]?[y[0],y[1],x[0],x[1]]:x[0]>=y[0]&&x[1]<=y[1]?[y[0],x[0],x[1],y[1]]:y[0]>=x[0]&&y[1]<=x[1]?[x[0],y[0],y[1],x[1]]:x[0]>y[0]&&x[0]<y[1]?[y[0],x[0],y[1],x[1]]:[x[0],y[0],x[1],y[1]]:x;if(0!==y.length)return y}return[]}function h(t,a){a=e.Cartesian3.clone(n.defaultValue(a,e.Cartesian3.ZERO)),e.Cartesian3.equals(a,e.Cartesian3.ZERO)||e.Cartesian3.normalize(a,a),this.origin=e.Cartesian3.clone(n.defaultValue(t,e.Cartesian3.ZERO)),this.direction=a}l.computeDiscriminant=function(t,e,n,a,i){const r=t*t,s=e*e,o=s*e,c=n*n,u=c*n,l=a*a,C=l*a,M=i*i;return s*c*l-4*o*C-4*t*u*l+18*t*e*n*C-27*r*l*l+256*(r*t)*(M*i)+i*(18*o*n*a-4*s*u+16*t*c*c-80*t*e*c*a-6*t*s*l+144*r*n*l)+M*(144*t*s*n-27*s*s-128*r*c-192*r*e*a)},l.computeRealRoots=function(t,e,n,a,i){if(Math.abs(t)<r.CesiumMath.EPSILON15)return c.computeRealRoots(e,n,a,i);const s=e/t,o=n/t,u=a/t,l=i/t;let h=s<0?1:0;switch(h+=o<0?h+1:h,h+=u<0?h+1:h,h+=l<0?h+1:h,h){case 0:case 3:case 4:case 6:case 7:case 9:case 10:case 12:case 13:case 14:case 15:return C(s,o,u,l);case 1:case 2:case 5:case 8:case 11:return M(s,o,u,l);default:return}},h.clone=function(t,a){if(n.defined(t))return n.defined(a)?(a.origin=e.Cartesian3.clone(t.origin),a.direction=e.Cartesian3.clone(t.direction),a):new h(t.origin,t.direction)},h.getPoint=function(t,a,i){return n.defined(i)||(i=new e.Cartesian3),i=e.Cartesian3.multiplyByScalar(t.direction,a,i),e.Cartesian3.add(t.origin,i,i)};const m={rayPlane:function(t,a,i){n.defined(i)||(i=new e.Cartesian3);const s=t.origin,o=t.direction,c=a.normal,u=e.Cartesian3.dot(c,o);if(Math.abs(u)<r.CesiumMath.EPSILON15)return;const l=(-a.distance-e.Cartesian3.dot(c,s))/u;return l<0?void 0:(i=e.Cartesian3.multiplyByScalar(o,l,i),e.Cartesian3.add(s,i,i))}},f=new e.Cartesian3,d=new e.Cartesian3,g=new e.Cartesian3,p=new e.Cartesian3,w=new e.Cartesian3;m.rayTriangleParametric=function(t,a,i,s,o){o=n.defaultValue(o,!1);const c=t.origin,u=t.direction,l=e.Cartesian3.subtract(i,a,f),C=e.Cartesian3.subtract(s,a,d),M=e.Cartesian3.cross(u,C,g),h=e.Cartesian3.dot(l,M);let m,R,S,O,x;if(o){if(h<r.CesiumMath.EPSILON6)return;if(m=e.Cartesian3.subtract(c,a,p),S=e.Cartesian3.dot(m,M),S<0||S>h)return;if(R=e.Cartesian3.cross(m,l,w),O=e.Cartesian3.dot(u,R),O<0||S+O>h)return;x=e.Cartesian3.dot(C,R)/h}else{if(Math.abs(h)<r.CesiumMath.EPSILON6)return;const t=1/h;if(m=e.Cartesian3.subtract(c,a,p),S=e.Cartesian3.dot(m,M)*t,S<0||S>1)return;if(R=e.Cartesian3.cross(m,l,w),O=e.Cartesian3.dot(u,R)*t,O<0||S+O>1)return;x=e.Cartesian3.dot(C,R)*t}return x},m.rayTriangle=function(t,a,i,r,s,o){const c=m.rayTriangleParametric(t,a,i,r,s);if(n.defined(c)&&!(c<0))return n.defined(o)||(o=new e.Cartesian3),e.Cartesian3.multiplyByScalar(t.direction,c,o),e.Cartesian3.add(t.origin,o,o)};const R=new h;m.lineSegmentTriangle=function(t,a,i,r,s,o,c){const u=R;e.Cartesian3.clone(t,u.origin),e.Cartesian3.subtract(a,t,u.direction),e.Cartesian3.normalize(u.direction,u.direction);const l=m.rayTriangleParametric(u,i,r,s,o);if(!(!n.defined(l)||l<0||l>e.Cartesian3.distance(t,a)))return n.defined(c)||(c=new e.Cartesian3),e.Cartesian3.multiplyByScalar(u.direction,l,c),e.Cartesian3.add(u.origin,c,c)};const S={root0:0,root1:0};function O(t,a,r){n.defined(r)||(r=new i.Interval);const s=t.origin,o=t.direction,c=a.center,u=a.radius*a.radius,l=e.Cartesian3.subtract(s,c,g),C=function(t,e,n,a){const i=e*e-4*t*n;if(i<0)return;if(i>0){const n=1/(2*t),r=Math.sqrt(i),s=(-e+r)*n,o=(-e-r)*n;return s<o?(a.root0=s,a.root1=o):(a.root0=o,a.root1=s),a}const r=-e/(2*t);return 0!==r?(a.root0=a.root1=r,a):void 0}(e.Cartesian3.dot(o,o),2*e.Cartesian3.dot(o,l),e.Cartesian3.magnitudeSquared(l)-u,S);if(n.defined(C))return r.start=C.root0,r.stop=C.root1,r}m.raySphere=function(t,e,a){if(a=O(t,e,a),n.defined(a)&&!(a.stop<0))return a.start=Math.max(a.start,0),a};const x=new h;m.lineSegmentSphere=function(t,a,i,r){const s=x;e.Cartesian3.clone(t,s.origin);const o=e.Cartesian3.subtract(a,t,s.direction),c=e.Cartesian3.magnitude(o);if(e.Cartesian3.normalize(o,o),r=O(s,i,r),!(!n.defined(r)||r.stop<0||r.start>c))return r.start=Math.max(r.start,0),r.stop=Math.min(r.stop,c),r};const y=new e.Cartesian3,P=new e.Cartesian3;function N(t,e,n){const a=t+e;return r.CesiumMath.sign(t)!==r.CesiumMath.sign(e)&&Math.abs(a/Math.max(Math.abs(t),Math.abs(e)))<n?0:a}m.rayEllipsoid=function(t,n){const a=n.oneOverRadii,r=e.Cartesian3.multiplyComponents(a,t.origin,y),s=e.Cartesian3.multiplyComponents(a,t.direction,P),o=e.Cartesian3.magnitudeSquared(r),c=e.Cartesian3.dot(r,s);let u,l,C,M,h;if(o>1){if(c>=0)return;const t=c*c;if(u=o-1,l=e.Cartesian3.magnitudeSquared(s),C=l*u,t<C)return;if(t>C){M=c*c-C,h=-c+Math.sqrt(M);const t=h/l,e=u/h;return t<e?new i.Interval(t,e):{start:e,stop:t}}const n=Math.sqrt(u/l);return new i.Interval(n,n)}return o<1?(u=o-1,l=e.Cartesian3.magnitudeSquared(s),C=l*u,M=c*c-C,h=-c+Math.sqrt(M),new i.Interval(0,h/l)):c<0?(l=e.Cartesian3.magnitudeSquared(s),new i.Interval(0,-c/l)):void 0};const b=new e.Cartesian3,q=new e.Cartesian3,L=new e.Cartesian3,I=new e.Cartesian3,E=new e.Cartesian3,z=new e.Matrix3,T=new e.Matrix3,v=new e.Matrix3,U=new e.Matrix3,W=new e.Matrix3,B=new e.Matrix3,V=new e.Matrix3,Z=new e.Cartesian3,D=new e.Cartesian3,A=new e.Cartographic;m.grazingAltitudeLocation=function(t,a){const i=t.origin,o=t.direction;if(!e.Cartesian3.equals(i,e.Cartesian3.ZERO)){const t=a.geodeticSurfaceNormal(i,b);if(e.Cartesian3.dot(o,t)>=0)return i}const c=n.defined(this.rayEllipsoid(t,a)),u=a.transformPositionToScaledSpace(o,b),C=e.Cartesian3.normalize(u,u),M=e.Cartesian3.mostOrthogonalAxis(u,I),h=e.Cartesian3.normalize(e.Cartesian3.cross(M,C,q),q),m=e.Cartesian3.normalize(e.Cartesian3.cross(C,h,L),L),f=z;f[0]=C.x,f[1]=C.y,f[2]=C.z,f[3]=h.x,f[4]=h.y,f[5]=h.z,f[6]=m.x,f[7]=m.y,f[8]=m.z;const d=e.Matrix3.transpose(f,T),g=e.Matrix3.fromScale(a.radii,v),p=e.Matrix3.fromScale(a.oneOverRadii,U),w=W;w[0]=0,w[1]=-o.z,w[2]=o.y,w[3]=o.z,w[4]=0,w[5]=-o.x,w[6]=-o.y,w[7]=o.x,w[8]=0;const R=e.Matrix3.multiply(e.Matrix3.multiply(d,p,B),w,B),S=e.Matrix3.multiply(e.Matrix3.multiply(R,g,V),f,V),O=e.Matrix3.multiplyByVector(R,i,E),x=function(t,n,a,i,o){const c=i*i,u=o*o,C=(t[e.Matrix3.COLUMN1ROW1]-t[e.Matrix3.COLUMN2ROW2])*u,M=o*(i*N(t[e.Matrix3.COLUMN1ROW0],t[e.Matrix3.COLUMN0ROW1],r.CesiumMath.EPSILON15)+n.y),h=t[e.Matrix3.COLUMN0ROW0]*c+t[e.Matrix3.COLUMN2ROW2]*u+i*n.x+a,m=u*N(t[e.Matrix3.COLUMN2ROW1],t[e.Matrix3.COLUMN1ROW2],r.CesiumMath.EPSILON15),f=o*(i*N(t[e.Matrix3.COLUMN2ROW0],t[e.Matrix3.COLUMN0ROW2])+n.z);let d;const g=[];if(0===f&&0===m){if(d=s.computeRealRoots(C,M,h),0===d.length)return g;const t=d[0],n=Math.sqrt(Math.max(1-t*t,0));if(g.push(new e.Cartesian3(i,o*t,o*-n)),g.push(new e.Cartesian3(i,o*t,o*n)),2===d.length){const t=d[1],n=Math.sqrt(Math.max(1-t*t,0));g.push(new e.Cartesian3(i,o*t,o*-n)),g.push(new e.Cartesian3(i,o*t,o*n))}return g}const p=f*f,w=m*m,R=f*m,S=C*C+w,O=2*(M*C+R),x=2*h*C+M*M-w+p,y=2*(h*M-R),P=h*h-p;if(0===S&&0===O&&0===x&&0===y)return g;d=l.computeRealRoots(S,O,x,y,P);const b=d.length;if(0===b)return g;for(let t=0;t<b;++t){const n=d[t],a=n*n,s=Math.max(1-a,0),c=Math.sqrt(s);let u;u=r.CesiumMath.sign(C)===r.CesiumMath.sign(h)?N(C*a+h,M*n,r.CesiumMath.EPSILON12):r.CesiumMath.sign(h)===r.CesiumMath.sign(M*n)?N(C*a,M*n+h,r.CesiumMath.EPSILON12):N(C*a+M*n,h,r.CesiumMath.EPSILON12);const l=u*N(m*n,f,r.CesiumMath.EPSILON15);l<0?g.push(new e.Cartesian3(i,o*n,o*c)):l>0?g.push(new e.Cartesian3(i,o*n,o*-c)):0!==c?(g.push(new e.Cartesian3(i,o*n,o*-c)),g.push(new e.Cartesian3(i,o*n,o*c)),++t):g.push(new e.Cartesian3(i,o*n,o*c))}return g}(S,e.Cartesian3.negate(O,b),0,0,1);let y,P;const F=x.length;if(F>0){let t=e.Cartesian3.clone(e.Cartesian3.ZERO,D),n=Number.NEGATIVE_INFINITY;for(let a=0;a<F;++a){y=e.Matrix3.multiplyByVector(g,e.Matrix3.multiplyByVector(f,x[a],Z),Z);const r=e.Cartesian3.normalize(e.Cartesian3.subtract(y,i,I),I),s=e.Cartesian3.dot(r,o);s>n&&(n=s,t=e.Cartesian3.clone(y,t))}const s=a.cartesianToCartographic(t,A);return n=r.CesiumMath.clamp(n,0,1),P=e.Cartesian3.magnitude(e.Cartesian3.subtract(t,i,I))*Math.sqrt(1-n*n),P=c?-P:P,s.height=P,a.cartographicToCartesian(s,new e.Cartesian3)}};const F=new e.Cartesian3;m.lineSegmentPlane=function(t,a,i,s){n.defined(s)||(s=new e.Cartesian3);const o=e.Cartesian3.subtract(a,t,F),c=i.normal,u=e.Cartesian3.dot(c,o);if(Math.abs(u)<r.CesiumMath.EPSILON6)return;const l=e.Cartesian3.dot(c,t),C=-(i.distance+l)/u;return C<0||C>1?void 0:(e.Cartesian3.multiplyByScalar(o,C,s),e.Cartesian3.add(t,s,s),s)},m.trianglePlaneIntersection=function(t,n,a,i){const r=i.normal,s=i.distance,o=e.Cartesian3.dot(r,t)+s<0,c=e.Cartesian3.dot(r,n)+s<0,u=e.Cartesian3.dot(r,a)+s<0;let l,C,M=0;if(M+=o?1:0,M+=c?1:0,M+=u?1:0,1!==M&&2!==M||(l=new e.Cartesian3,C=new e.Cartesian3),1===M){if(o)return m.lineSegmentPlane(t,n,i,l),m.lineSegmentPlane(t,a,i,C),{positions:[t,n,a,l,C],indices:[0,3,4,1,2,4,1,4,3]};if(c)return m.lineSegmentPlane(n,a,i,l),m.lineSegmentPlane(n,t,i,C),{positions:[t,n,a,l,C],indices:[1,3,4,2,0,4,2,4,3]};if(u)return m.lineSegmentPlane(a,t,i,l),m.lineSegmentPlane(a,n,i,C),{positions:[t,n,a,l,C],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===M){if(!o)return m.lineSegmentPlane(n,t,i,l),m.lineSegmentPlane(a,t,i,C),{positions:[t,n,a,l,C],indices:[1,2,4,1,4,3,0,3,4]};if(!c)return m.lineSegmentPlane(a,n,i,l),m.lineSegmentPlane(t,n,i,C),{positions:[t,n,a,l,C],indices:[2,0,4,2,4,3,1,3,4]};if(!u)return m.lineSegmentPlane(t,a,i,l),m.lineSegmentPlane(n,a,i,C),{positions:[t,n,a,l,C],indices:[0,1,4,0,4,3,2,3,4]}}},t.IntersectionTests=m,t.Ray=h}));
|