@geode/opengeodeweb-front 11.2.2-rc.1 → 12.0.0-rc.2
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/shared/utils/response_handlers/load.js +5 -2
- package/.build/tests/browser/helpers/object_trees/main_object_tree.js +3 -3
- package/.build/tests/browser/helpers/object_trees/model_components_object_tree.js +2 -2
- package/.build/tests/browser/suites/model/surfaces.js +1 -1
- package/app/app.config.ts +28 -0
- package/app/assets/css/main.css +11 -0
- package/app/assets/geode_objects.ts +37 -108
- package/app/assets/img/geode_objects/HorizonStack3D.svg +10 -0
- package/app/components/ActionButton.vue +9 -2
- package/app/components/CameraManager/List.vue +6 -6
- package/app/components/CameraManager.vue +0 -1
- package/app/components/CameraOrientation.vue +12 -7
- package/app/components/ChromeTheme.vue +20 -0
- package/app/components/ClippingPlaneCard.vue +2 -3
- package/app/components/ClippingPlanes.vue +2 -2
- package/app/components/CrsSelector.vue +8 -8
- package/app/components/DeleteDialog.vue +12 -16
- package/app/components/DragAndDropInternal/DragAndDropInline.vue +7 -7
- package/app/components/DragAndDropInternal/DragAndDropOverlay.vue +87 -82
- package/app/components/ExtensionSelector.vue +21 -14
- package/app/components/FactorFilterPanel.vue +0 -1
- package/app/components/FeedBack/ErrorBanner.vue +8 -9
- package/app/components/FeedBack/Snackers.vue +5 -7
- package/app/components/FileUploader.vue +13 -21
- package/app/components/GlassCard.vue +3 -1
- package/app/components/HybridRenderingView.vue +2 -0
- package/app/components/HybridViewerTooltip.vue +4 -4
- package/app/components/Launcher.vue +1 -1
- package/app/components/Loading/EcoMessages.vue +17 -11
- package/app/components/Loading/Footer.vue +2 -2
- package/app/components/Loading/Header.vue +9 -4
- package/app/components/Loading/Progress.vue +7 -3
- package/app/components/Loading.vue +54 -46
- package/app/components/MissingFilesSelector.vue +5 -5
- package/app/components/ObjectSelector.vue +8 -15
- package/app/components/PackagesVersions.vue +1 -3
- package/app/components/ProjectCrs.vue +1 -1
- package/app/components/Screenshot.vue +23 -15
- package/app/components/SearchBar.vue +1 -3
- package/app/components/SliceCard.vue +1 -2
- package/app/components/Step.vue +1 -1
- package/app/components/Stepper.vue +13 -11
- package/app/components/ThresholdCard.vue +1 -1
- package/app/components/ThresholdFilter.vue +2 -2
- package/app/components/TimeSeriesTargetSelector.vue +3 -6
- package/app/components/ToolPanel.vue +3 -9
- package/app/components/Viewer/Basemap/CropOptions.vue +1 -1
- package/app/components/Viewer/Basemap/OpacityOptions.vue +1 -1
- package/app/components/Viewer/ContextMenu/CenterButton.vue +9 -3
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +1 -1
- package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +17 -6
- package/app/components/Viewer/ContextMenu/InfoCard.vue +12 -13
- package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +12 -9
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +2 -2
- package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +12 -9
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +1 -1
- package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +12 -9
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +3 -3
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +12 -8
- package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +12 -9
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +1 -1
- package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +12 -9
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +1 -1
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +16 -17
- package/app/components/Viewer/Generic/Model/ComponentEdgesOptions.vue +11 -6
- package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +11 -6
- package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +7 -8
- package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +7 -8
- package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +9 -10
- package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +9 -10
- package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +2 -2
- package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +1 -1
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +3 -4
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +16 -17
- package/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue +4 -4
- package/app/components/Viewer/ObjectTree/Base/ComponentRelations.vue +1 -1
- package/app/components/Viewer/ObjectTree/Base/Controls.vue +22 -18
- package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +11 -11
- package/app/components/Viewer/ObjectTree/Base/StickyHeader.vue +3 -3
- package/app/components/Viewer/ObjectTree/Base/TreeRow.vue +6 -9
- package/app/components/Viewer/ObjectTree/Box.vue +20 -21
- package/app/components/Viewer/ObjectTree/Layout.vue +28 -25
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +4 -3
- package/app/components/Viewer/ObjectTree/Views/ModelTree.vue +1 -1
- package/app/components/Viewer/Options/AttributeRangeSelector.vue +1 -1
- package/app/components/Viewer/Options/AttributeSelector.vue +1 -1
- package/app/components/Viewer/Options/ColorMapList.vue +7 -9
- package/app/components/Viewer/Options/ColorMapPicker.vue +2 -2
- package/app/components/Viewer/Options/ColorPicker.vue +9 -9
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +9 -9
- package/app/components/Viewer/Options/NoDataColorInfo.vue +4 -4
- package/app/components/Viewer/Options/Sliders/Opacity.vue +1 -1
- package/app/components/Viewer/Options/Sliders/Slider.vue +1 -1
- package/app/components/Viewer/Options/TextureItem.vue +11 -8
- package/app/components/Viewer/Options/TexturesSelector.vue +3 -3
- package/app/components/Viewer/Options/VisibilitySwitch.vue +1 -1
- package/app/components/Viewer/OrientationCompass.vue +223 -0
- package/app/components/Viewer/OrientationGlobe.vue +376 -0
- package/app/components/Viewer/OrientationOverlay.vue +47 -0
- package/app/components/Viewer/OverlappingObjectsPicker.vue +10 -7
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +4 -5
- package/app/components/Viewer/Scene/BackgroundOptions.vue +3 -3
- package/app/components/Viewer/Scene/OrientationWidgetOptions.vue +1 -1
- package/app/components/Viewer/Scene/TextOptions.vue +3 -3
- package/app/components/Viewer/Solid/SpecificPolyhedraColoring.vue +12 -12
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +1 -1
- package/app/components/Viewer/Surface/PolygonsColoring.vue +12 -12
- package/app/components/Viewer/Surface/PolygonsOptions.vue +1 -1
- package/app/components/Viewer/ToolActiveChip.vue +1 -1
- package/app/components/Viewer/Ui.vue +2 -2
- package/app/components/csv-preview/CsvPreviewer.vue +17 -24
- package/app/components/csv-preview/CsvSettings.vue +6 -6
- package/app/components/csv-preview/CsvTable.vue +11 -9
- package/app/composables/attribute_selector.ts +1 -1
- package/app/composables/batch_style.ts +3 -3
- package/app/composables/batch_style_model.ts +1 -1
- package/app/composables/chrome_theme.ts +23 -0
- package/app/composables/clipping_slices.ts +2 -1
- package/app/composables/hover_highlight.ts +10 -7
- package/app/composables/live_data_item.ts +1 -1
- package/app/composables/model_menu_context.ts +11 -4
- package/app/composables/orientation_overlay.ts +133 -0
- package/app/composables/project_manager_helpers/reset.ts +2 -0
- package/app/composables/project_manager_helpers/types.ts +2 -2
- package/app/composables/use_adaptive_styles.ts +42 -21
- package/app/composables/use_overlapping_picker.ts +10 -8
- package/app/composables/view_toolbar_options.ts +7 -7
- package/app/composables/view_toolbar_tool_options.ts +9 -11
- package/app/composables/viewer_context_menu.ts +4 -2
- package/app/composables/viewer_reset.ts +54 -0
- package/app/plugins/chrome_theme.ts +10 -0
- package/app/plugins/phosphor_icons.ts +13 -0
- package/app/plugins/scene_colors.ts +10 -0
- package/app/stores/basemap_helpers/builds.ts +2 -2
- package/app/stores/basemap_helpers/viewer.ts +1 -1
- package/app/stores/crs.ts +12 -12
- package/app/stores/data.ts +4 -5
- package/app/stores/data_helpers/mesh.ts +2 -1
- package/app/stores/data_style.ts +4 -3
- package/app/stores/hybrid_viewer.ts +5 -3
- package/app/stores/menu.ts +18 -12
- package/app/stores/treeview.ts +5 -4
- package/app/stores/viewer.ts +2 -0
- package/app/types/attribute.ts +5 -21
- package/app/types/identifiers.ts +5 -15
- package/app/utils/attribute_range.ts +1 -1
- package/app/utils/attributes.ts +2 -1
- package/app/utils/clipping_planes.ts +1 -1
- package/app/utils/color_picker.ts +3 -3
- package/app/utils/crs.ts +6 -6
- package/app/utils/default_styles/constants.ts +17 -22
- package/app/utils/default_styles/index.ts +24 -3
- package/app/utils/default_styles/mesh_components.ts +15 -11
- package/app/utils/default_styles/meshes.ts +1 -1
- package/app/utils/default_styles/model_components.ts +14 -10
- package/app/utils/default_styles/models.ts +1 -1
- package/app/utils/import_workflow.ts +3 -1
- package/app/utils/legacy_data_id.ts +2 -1
- package/app/utils/orientation_compass.ts +103 -0
- package/app/utils/orientation_gizmo.ts +73 -0
- package/app/utils/orientation_globe.ts +145 -0
- package/app/utils/orientation_strata.ts +119 -0
- package/app/utils/phosphor_icons.ts +105 -0
- package/app/utils/slice.ts +2 -1
- package/app/utils/threshold_sources.ts +1 -1
- package/internal/stores/data_style/attribute_types.ts +6 -6
- package/internal/stores/data_style/mesh/base_style.ts +6 -7
- package/internal/stores/data_style/mesh/cells/cell.ts +6 -6
- package/internal/stores/data_style/mesh/cells/cell_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/cells/cell_config.ts +5 -6
- package/internal/stores/data_style/mesh/cells/color.ts +6 -6
- package/internal/stores/data_style/mesh/cells/opacity.ts +3 -4
- package/internal/stores/data_style/mesh/cells/vertex.ts +6 -6
- package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/cells/vertex_config.ts +5 -6
- package/internal/stores/data_style/mesh/cells/visibility.ts +1 -1
- package/internal/stores/data_style/mesh/edges/color.ts +6 -6
- package/internal/stores/data_style/mesh/edges/edge.ts +6 -6
- package/internal/stores/data_style/mesh/edges/edge_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/edges/edge_config.ts +5 -6
- package/internal/stores/data_style/mesh/edges/opacity.ts +3 -4
- package/internal/stores/data_style/mesh/edges/vertex.ts +6 -6
- package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/edges/vertex_config.ts +5 -6
- package/internal/stores/data_style/mesh/edges/visibility.ts +1 -1
- package/internal/stores/data_style/mesh/edges/width.ts +6 -6
- package/internal/stores/data_style/mesh/index.ts +3 -4
- package/internal/stores/data_style/mesh/points/color.ts +6 -6
- package/internal/stores/data_style/mesh/points/common.ts +1 -1
- package/internal/stores/data_style/mesh/points/opacity.ts +3 -4
- package/internal/stores/data_style/mesh/points/size.ts +6 -6
- package/internal/stores/data_style/mesh/points/vertex.ts +6 -6
- package/internal/stores/data_style/mesh/points/vertex_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/points/vertex_config.ts +5 -6
- package/internal/stores/data_style/mesh/points/visibility.ts +1 -1
- package/internal/stores/data_style/mesh/polygons/color.ts +6 -6
- package/internal/stores/data_style/mesh/polygons/opacity.ts +3 -4
- package/internal/stores/data_style/mesh/polygons/polygon.ts +6 -6
- package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/polygons/polygon_config.ts +5 -6
- package/internal/stores/data_style/mesh/polygons/vertex.ts +6 -6
- package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/polygons/vertex_config.ts +5 -6
- package/internal/stores/data_style/mesh/polygons/visibility.ts +1 -1
- package/internal/stores/data_style/mesh/polyhedra/color.ts +6 -6
- package/internal/stores/data_style/mesh/polyhedra/opacity.ts +3 -4
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +6 -6
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +5 -6
- package/internal/stores/data_style/mesh/polyhedra/vertex.ts +6 -6
- package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +5 -6
- package/internal/stores/data_style/mesh/polyhedra/visibility.ts +1 -1
- package/internal/stores/data_style/model/blocks/color.ts +6 -6
- package/internal/stores/data_style/model/blocks/coloring_groups.ts +2 -2
- package/internal/stores/data_style/model/blocks/polyhedron.ts +12 -9
- package/internal/stores/data_style/model/blocks/vertex.ts +12 -9
- package/internal/stores/data_style/model/blocks/visibility.ts +1 -1
- package/internal/stores/data_style/model/color.ts +10 -11
- package/internal/stores/data_style/model/common.ts +3 -4
- package/internal/stores/data_style/model/corners/color.ts +6 -6
- package/internal/stores/data_style/model/corners/index.ts +2 -2
- package/internal/stores/data_style/model/corners/vertex.ts +12 -9
- package/internal/stores/data_style/model/corners/visibility.ts +1 -1
- package/internal/stores/data_style/model/edges/component.ts +13 -13
- package/internal/stores/data_style/model/edges/visibility.ts +1 -1
- package/internal/stores/data_style/model/edges/width.ts +6 -6
- package/internal/stores/data_style/model/lines/color.ts +6 -6
- package/internal/stores/data_style/model/lines/coloring_groups.ts +2 -2
- package/internal/stores/data_style/model/lines/edge.ts +12 -9
- package/internal/stores/data_style/model/lines/vertex.ts +12 -9
- package/internal/stores/data_style/model/lines/visibility.ts +1 -1
- package/internal/stores/data_style/model/points/component.ts +17 -13
- package/internal/stores/data_style/model/points/index.ts +2 -2
- package/internal/stores/data_style/model/points/size.ts +6 -6
- package/internal/stores/data_style/model/points/visibility.ts +1 -1
- package/internal/stores/data_style/model/surfaces/color.ts +6 -6
- package/internal/stores/data_style/model/surfaces/coloring_groups.ts +2 -2
- package/internal/stores/data_style/model/surfaces/polygon.ts +12 -9
- package/internal/stores/data_style/model/surfaces/vertex.ts +12 -9
- package/internal/stores/data_style/model/surfaces/visibility.ts +1 -1
- package/internal/stores/data_style/model/visibility.ts +1 -1
- package/internal/stores/data_style/scene.ts +31 -19
- package/internal/stores/data_style/time_step.ts +3 -2
- package/internal/stores/data_style/types.ts +3 -4
- package/internal/stores/hybrid_viewer/brightness.ts +14 -7
- package/internal/stores/hybrid_viewer/camera.ts +1 -1
- package/internal/stores/hybrid_viewer/constants.ts +1 -12
- package/internal/stores/hybrid_viewer/filters.ts +2 -2
- package/internal/stores/hybrid_viewer/highlight.ts +2 -1
- package/internal/stores/hybrid_viewer/scene.ts +11 -4
- package/nuxt.config.ts +9 -1
- package/package.json +4 -2
- package/shared/utils/response_handlers/load.ts +19 -11
- package/tests/browser/helpers/object_trees/main_object_tree.ts +3 -3
- package/tests/browser/helpers/object_trees/model_components_object_tree.ts +2 -2
- package/tests/browser/suites/model/surfaces.ts +1 -1
- package/tests/unit/helpers/phosphor_glyphs.ts +46 -0
- package/app/assets/viewer_svgs/camera-bookmark.svg +0 -64
- package/app/types/style.ts +0 -13
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
type GlobeLabel,
|
|
4
|
+
cameraElevation,
|
|
5
|
+
globeLabels,
|
|
6
|
+
northPoint,
|
|
7
|
+
orientationReadout,
|
|
8
|
+
strataRings,
|
|
9
|
+
} from "@ogw_front/utils/orientation_globe";
|
|
10
|
+
import { cameraViewBasis, toCameraPose } from "@ogw_front/utils/orientation_gizmo";
|
|
11
|
+
import { compassHeading } from "@ogw_front/utils/orientation_compass";
|
|
12
|
+
import { strataPixels } from "@ogw_front/utils/orientation_strata";
|
|
13
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
14
|
+
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
15
|
+
|
|
16
|
+
// Orientation globe: a sphere crossed by horizontal strata (the "round shape & lines" of the Geode
|
|
17
|
+
// Solutions brand, and the geometry of its mark), the world axes from its center and the north as the
|
|
18
|
+
// Brand orange dot. The strata stay horizontal in the world, so up and the tilt read at a glance.
|
|
19
|
+
// A click on an axis label looks from that axis; a click on the globe itself does nothing.
|
|
20
|
+
|
|
21
|
+
const SIZE = 112;
|
|
22
|
+
const HALF_SIZE = SIZE / 2;
|
|
23
|
+
const RADIUS = 30;
|
|
24
|
+
const BACKDROP_MARGIN = 14;
|
|
25
|
+
const BACKDROP_RADIUS = RADIUS + BACKDROP_MARGIN;
|
|
26
|
+
// Axes stay crisp while roughly in the screen plane, then fade down to AWAY_OPACITY pointing away
|
|
27
|
+
const FADE_START_DEPTH = -0.3;
|
|
28
|
+
const FADE_RANGE = 0.7;
|
|
29
|
+
const AWAY_OPACITY = 0.45;
|
|
30
|
+
// Strata in a Bleu Fumée tint under a dark ink, in the brand ink under a light one
|
|
31
|
+
const LIGHT_STRATA_COLOR = "#E8EEF0";
|
|
32
|
+
const DARK_STRATA_COLOR = "#1F2E33";
|
|
33
|
+
// Over this relative luminance, the ink is light and the strata turn dark
|
|
34
|
+
const LIGHT_INK_LUMINANCE = 0.5;
|
|
35
|
+
const LUMINANCE_WEIGHTS = { red: 0.2126, green: 0.7152, blue: 0.0722 } as const;
|
|
36
|
+
const MAX_CHANNEL = 255;
|
|
37
|
+
const AXIS_COLORS = { x: "#D9553B", y: "#3F8F63", z: "#3567B5" } as const;
|
|
38
|
+
const ORANGE = "#F48830";
|
|
39
|
+
|
|
40
|
+
const hybridViewerStore = useHybridViewerStore();
|
|
41
|
+
const dataStyleStore = useDataStyleStore();
|
|
42
|
+
|
|
43
|
+
// The ink (sphere, strata rings, center, readout) takes the scene text color, as the VTK marker did: it stays
|
|
44
|
+
// Readable on the background the user picked, like the grid scale and ruler labels
|
|
45
|
+
const ink = computed(() => dataStyleStore.sceneStyle.text.color);
|
|
46
|
+
const isLightInk = computed(() => {
|
|
47
|
+
const { red, green, blue } = ink.value;
|
|
48
|
+
const luminance =
|
|
49
|
+
(LUMINANCE_WEIGHTS.red * red +
|
|
50
|
+
LUMINANCE_WEIGHTS.green * green +
|
|
51
|
+
LUMINANCE_WEIGHTS.blue * blue) /
|
|
52
|
+
MAX_CHANNEL;
|
|
53
|
+
return luminance > LIGHT_INK_LUMINANCE;
|
|
54
|
+
});
|
|
55
|
+
const strataColor = computed(() => (isLightInk.value ? DARK_STRATA_COLOR : LIGHT_STRATA_COLOR));
|
|
56
|
+
const inkStyle = computed(() => ({
|
|
57
|
+
"--globe-ink": `${ink.value.red}, ${ink.value.green}, ${ink.value.blue}`,
|
|
58
|
+
"--globe-strata": strataColor.value,
|
|
59
|
+
}));
|
|
60
|
+
// The strata are drawn off the DOM and shown as an SVG image: the viewer keeps a single <canvas>, the
|
|
61
|
+
// VTK one, which the viewer tests locate
|
|
62
|
+
let strataCanvas: HTMLCanvasElement | undefined = undefined;
|
|
63
|
+
const strataImage = ref("");
|
|
64
|
+
|
|
65
|
+
const basis = computed(() => {
|
|
66
|
+
const pose = toCameraPose(hybridViewerStore.camera_options);
|
|
67
|
+
return pose && cameraViewBasis(pose);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const rings = computed(() => {
|
|
71
|
+
if (!basis.value) {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
return strataRings(basis.value, RADIUS);
|
|
75
|
+
});
|
|
76
|
+
const labels = computed(() => {
|
|
77
|
+
if (!basis.value) {
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
80
|
+
return globeLabels(basis.value, RADIUS);
|
|
81
|
+
});
|
|
82
|
+
const north = computed(() => {
|
|
83
|
+
if (!basis.value) {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
return northPoint(basis.value, RADIUS);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
// The last readable heading is kept while the camera is rolled until no heading can be read
|
|
90
|
+
const heading = ref(0);
|
|
91
|
+
watch(
|
|
92
|
+
basis,
|
|
93
|
+
(value) => {
|
|
94
|
+
heading.value = (value && compassHeading(value)) ?? heading.value;
|
|
95
|
+
},
|
|
96
|
+
{ immediate: true },
|
|
97
|
+
);
|
|
98
|
+
const readout = computed(() => {
|
|
99
|
+
if (!basis.value) {
|
|
100
|
+
return "";
|
|
101
|
+
}
|
|
102
|
+
return orientationReadout(heading.value, cameraElevation(basis.value));
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
function axisColor(label: GlobeLabel): string {
|
|
106
|
+
return AXIS_COLORS[label.axis];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function opacity(depth: number): number {
|
|
110
|
+
const fade = Math.min(1, Math.max(0, (FADE_START_DEPTH - depth) / FADE_RANGE));
|
|
111
|
+
return 1 - (1 - AWAY_OPACITY) * fade;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function lookFrom(label: GlobeLabel): void {
|
|
115
|
+
// Animates the camera then syncs the remote one, which renders the viewer image
|
|
116
|
+
hybridViewerStore.setCameraOrientation(label.key);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function drawStrata(): void {
|
|
120
|
+
strataCanvas ??= document.createElement("canvas");
|
|
121
|
+
const canvas = strataCanvas;
|
|
122
|
+
const context = canvas.getContext("2d");
|
|
123
|
+
if (!context || !basis.value) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const side = Math.ceil(2 * RADIUS * (globalThis.devicePixelRatio || 1));
|
|
127
|
+
canvas.width = side;
|
|
128
|
+
canvas.height = side;
|
|
129
|
+
const image = context.createImageData(side, side);
|
|
130
|
+
image.data.set(strataPixels(basis.value, side, strataColor.value));
|
|
131
|
+
context.putImageData(image, 0, 0);
|
|
132
|
+
strataImage.value = canvas.toDataURL();
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// The camera changes on every step of a rotation or an animation: the strata are drawn at most once per frame
|
|
136
|
+
let strataFrame: number | undefined = undefined;
|
|
137
|
+
function scheduleStrata(): void {
|
|
138
|
+
if (strataFrame !== undefined) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
strataFrame = requestAnimationFrame(() => {
|
|
142
|
+
strataFrame = undefined;
|
|
143
|
+
drawStrata();
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
drawStrata();
|
|
148
|
+
watch([basis, strataColor], scheduleStrata);
|
|
149
|
+
onBeforeUnmount(() => {
|
|
150
|
+
if (strataFrame !== undefined) {
|
|
151
|
+
cancelAnimationFrame(strataFrame);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
</script>
|
|
155
|
+
|
|
156
|
+
<template>
|
|
157
|
+
<div class="orientation-globe" data-testid="orientationGlobe" :style="inkStyle">
|
|
158
|
+
<div class="globe-stage">
|
|
159
|
+
<svg
|
|
160
|
+
:width="SIZE"
|
|
161
|
+
:height="SIZE"
|
|
162
|
+
:viewBox="`${-HALF_SIZE} ${-HALF_SIZE} ${SIZE} ${SIZE}`"
|
|
163
|
+
shape-rendering="geometricPrecision"
|
|
164
|
+
role="group"
|
|
165
|
+
aria-label="Orientation axes"
|
|
166
|
+
>
|
|
167
|
+
<circle class="backdrop" :r="BACKDROP_RADIUS" />
|
|
168
|
+
<image
|
|
169
|
+
v-if="strataImage"
|
|
170
|
+
class="globe-strata"
|
|
171
|
+
:href="strataImage"
|
|
172
|
+
:x="-RADIUS"
|
|
173
|
+
:y="-RADIUS"
|
|
174
|
+
:width="2 * RADIUS"
|
|
175
|
+
:height="2 * RADIUS"
|
|
176
|
+
aria-hidden="true"
|
|
177
|
+
/>
|
|
178
|
+
<!-- Catches the pointer so a click on the globe neither moves the camera nor reaches the viewer -->
|
|
179
|
+
<g class="globe-body" data-testid="orientationGlobe-body">
|
|
180
|
+
<circle class="sphere" :r="RADIUS" />
|
|
181
|
+
<path
|
|
182
|
+
v-for="(ring, index) in rings"
|
|
183
|
+
:key="`back-${index}`"
|
|
184
|
+
class="ring-back"
|
|
185
|
+
:class="{ equator: ring.equator }"
|
|
186
|
+
:d="ring.back"
|
|
187
|
+
/>
|
|
188
|
+
<path
|
|
189
|
+
v-for="(ring, index) in rings"
|
|
190
|
+
:key="`front-${index}`"
|
|
191
|
+
class="ring-front"
|
|
192
|
+
:class="{ equator: ring.equator }"
|
|
193
|
+
:d="ring.front"
|
|
194
|
+
/>
|
|
195
|
+
</g>
|
|
196
|
+
<line
|
|
197
|
+
v-for="label in labels"
|
|
198
|
+
:key="`line-${label.key}`"
|
|
199
|
+
class="axis-line"
|
|
200
|
+
:x2="label.tipX"
|
|
201
|
+
:y2="label.tipY"
|
|
202
|
+
:stroke="axisColor(label)"
|
|
203
|
+
:opacity="opacity(label.depth)"
|
|
204
|
+
/>
|
|
205
|
+
<circle class="center" r="2" />
|
|
206
|
+
<circle
|
|
207
|
+
v-if="north"
|
|
208
|
+
class="north"
|
|
209
|
+
:class="{ away: north.depth < 0 }"
|
|
210
|
+
:cx="north.x"
|
|
211
|
+
:cy="north.y"
|
|
212
|
+
:r="north.depth < 0 ? 2.6 : 3.6"
|
|
213
|
+
/>
|
|
214
|
+
<text
|
|
215
|
+
v-for="label in labels"
|
|
216
|
+
:key="`label-${label.key}`"
|
|
217
|
+
class="axis-label"
|
|
218
|
+
:class="{ foreshortened: label.foreshortened }"
|
|
219
|
+
:x="label.x"
|
|
220
|
+
:y="label.y"
|
|
221
|
+
:fill="axisColor(label)"
|
|
222
|
+
:opacity="opacity(label.depth)"
|
|
223
|
+
role="button"
|
|
224
|
+
tabindex="0"
|
|
225
|
+
:data-testid="`orientationGlobe-${label.key}`"
|
|
226
|
+
:aria-label="`View from +${label.text}`"
|
|
227
|
+
@click="lookFrom(label)"
|
|
228
|
+
@keydown.enter.prevent="lookFrom(label)"
|
|
229
|
+
@keydown.space.prevent="lookFrom(label)"
|
|
230
|
+
>
|
|
231
|
+
{{ label.text }}
|
|
232
|
+
<title>View from +{{ label.text }}</title>
|
|
233
|
+
</text>
|
|
234
|
+
</svg>
|
|
235
|
+
</div>
|
|
236
|
+
<div class="readout" data-testid="orientationGlobeReadout">{{ readout }}</div>
|
|
237
|
+
</div>
|
|
238
|
+
</template>
|
|
239
|
+
|
|
240
|
+
<style scoped>
|
|
241
|
+
/* The readout hangs under the stage, so the globe stays centered like the compass */
|
|
242
|
+
.orientation-globe {
|
|
243
|
+
position: relative;
|
|
244
|
+
display: flex;
|
|
245
|
+
flex-direction: column;
|
|
246
|
+
align-items: center;
|
|
247
|
+
font-family: var(--v-font-heading, inherit);
|
|
248
|
+
color: rgb(var(--globe-ink));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.globe-stage {
|
|
252
|
+
position: relative;
|
|
253
|
+
width: 112px;
|
|
254
|
+
height: 112px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.globe-strata {
|
|
258
|
+
pointer-events: none;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
svg {
|
|
262
|
+
position: relative;
|
|
263
|
+
overflow: visible;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.backdrop {
|
|
267
|
+
/* Same tone as the strata: light under a dark ink, dark under a light ink */
|
|
268
|
+
fill: color-mix(in srgb, var(--globe-strata) 55%, transparent);
|
|
269
|
+
opacity: 0;
|
|
270
|
+
transition: opacity 0.2s ease;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.orientation-globe:hover .backdrop,
|
|
274
|
+
.orientation-globe:focus-within .backdrop {
|
|
275
|
+
opacity: 1;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.globe-body {
|
|
279
|
+
pointer-events: all;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.sphere {
|
|
283
|
+
fill: color-mix(in srgb, var(--globe-strata) 18%, transparent);
|
|
284
|
+
stroke: rgba(var(--globe-ink), 0.6);
|
|
285
|
+
stroke-width: 1.25px;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.ring-back {
|
|
289
|
+
fill: none;
|
|
290
|
+
stroke: rgba(var(--globe-ink), 0.14);
|
|
291
|
+
stroke-width: 1px;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.ring-back.equator {
|
|
295
|
+
stroke: rgba(var(--globe-ink), 0.22);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.ring-front {
|
|
299
|
+
fill: none;
|
|
300
|
+
stroke: rgba(var(--globe-ink), 0.38);
|
|
301
|
+
stroke-width: 1px;
|
|
302
|
+
stroke-linecap: round;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.ring-front.equator {
|
|
306
|
+
stroke: rgba(var(--globe-ink), 0.7);
|
|
307
|
+
stroke-width: 1.4px;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.axis-line {
|
|
311
|
+
stroke-width: 1.75px;
|
|
312
|
+
stroke-linecap: round;
|
|
313
|
+
pointer-events: none;
|
|
314
|
+
transition: opacity 0.2s ease;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.center {
|
|
318
|
+
fill: rgb(var(--globe-ink));
|
|
319
|
+
pointer-events: none;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.north {
|
|
323
|
+
fill: v-bind(ORANGE);
|
|
324
|
+
stroke: #e8eef0;
|
|
325
|
+
stroke-width: 1.5px;
|
|
326
|
+
pointer-events: none;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.north.away {
|
|
330
|
+
fill-opacity: 0.5;
|
|
331
|
+
stroke-width: 0;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.axis-label {
|
|
335
|
+
font-size: 12px;
|
|
336
|
+
font-weight: 700;
|
|
337
|
+
text-anchor: middle;
|
|
338
|
+
dominant-baseline: central;
|
|
339
|
+
cursor: pointer;
|
|
340
|
+
outline: none;
|
|
341
|
+
pointer-events: all;
|
|
342
|
+
user-select: none;
|
|
343
|
+
transition: opacity 0.2s ease;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.axis-label.foreshortened {
|
|
347
|
+
font-size: 10px;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.axis-label:hover,
|
|
351
|
+
.axis-label:focus-visible {
|
|
352
|
+
text-decoration: underline;
|
|
353
|
+
text-underline-offset: 2px;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.readout {
|
|
357
|
+
position: absolute;
|
|
358
|
+
top: calc(100% - 6px);
|
|
359
|
+
left: 50%;
|
|
360
|
+
transform: translateX(-50%);
|
|
361
|
+
font-family: var(--v-font-body, inherit);
|
|
362
|
+
font-size: 11px;
|
|
363
|
+
font-weight: 600;
|
|
364
|
+
font-variant-numeric: tabular-nums;
|
|
365
|
+
letter-spacing: 0.04em;
|
|
366
|
+
white-space: nowrap;
|
|
367
|
+
opacity: 0;
|
|
368
|
+
transition: opacity 0.2s ease;
|
|
369
|
+
pointer-events: none;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.orientation-globe:hover .readout,
|
|
373
|
+
.orientation-globe:focus-within .readout {
|
|
374
|
+
opacity: 0.9;
|
|
375
|
+
}
|
|
376
|
+
</style>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
useOrientationMarkerVisible,
|
|
4
|
+
useOrientationOverlay,
|
|
5
|
+
} from "@ogw_front/composables/orientation_overlay";
|
|
6
|
+
import ChromeTheme from "@ogw_front/components/ChromeTheme.vue";
|
|
7
|
+
import OrientationCompass from "@ogw_front/components/Viewer/OrientationCompass.vue";
|
|
8
|
+
import OrientationGlobe from "@ogw_front/components/Viewer/OrientationGlobe.vue";
|
|
9
|
+
import { toCameraPose } from "@ogw_front/utils/orientation_gizmo";
|
|
10
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
11
|
+
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
12
|
+
|
|
13
|
+
// Orientation marker drawn by the front in the bottom right corner of the viewer, where the viewer
|
|
14
|
+
// Draws its VTK marker otherwise. Opt-in: see `ogwFront.orientationOverlay` in app.config.ts.
|
|
15
|
+
const enabled = useOrientationOverlay();
|
|
16
|
+
const markerVisible = useOrientationMarkerVisible();
|
|
17
|
+
const dataStyleStore = useDataStyleStore();
|
|
18
|
+
const hybridViewerStore = useHybridViewerStore();
|
|
19
|
+
|
|
20
|
+
const hasCamera = computed(() => toCameraPose(hybridViewerStore.camera_options) !== undefined);
|
|
21
|
+
const marker = computed(() => dataStyleStore.sceneStyle.orientation_widget);
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<ChromeTheme v-if="enabled && markerVisible && hasCamera">
|
|
26
|
+
<div class="orientation-overlay" data-testid="orientationOverlay">
|
|
27
|
+
<OrientationCompass v-if="marker === 'compass'" />
|
|
28
|
+
<OrientationGlobe v-else />
|
|
29
|
+
</div>
|
|
30
|
+
</ChromeTheme>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<style scoped>
|
|
34
|
+
/* Centered where the viewer draws its VTK marker (viewport 0.8-1 x 0-0.2), above the project CRS button */
|
|
35
|
+
.orientation-overlay {
|
|
36
|
+
position: absolute;
|
|
37
|
+
right: max(8px, calc(10% - 56px));
|
|
38
|
+
bottom: max(40px, calc(10% - 56px));
|
|
39
|
+
z-index: 1;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
width: 112px;
|
|
44
|
+
height: 112px;
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import GlassCard from "@ogw_front/components/GlassCard.vue";
|
|
3
3
|
import type { ProposedItem } from "@ogw_front/composables/use_overlapping_picker";
|
|
4
4
|
import { formatListId } from "@ogw_front/utils/name_cleaner";
|
|
5
|
-
import {
|
|
5
|
+
import { geodeObjectImage } from "@ogw_front/assets/geode_objects";
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
8
8
|
displayIntermediate: boolean;
|
|
@@ -48,7 +48,7 @@ function handleUpdate(val: boolean): void {
|
|
|
48
48
|
<v-card-title
|
|
49
49
|
class="d-flex align-center py-2 px-3 text-caption text-uppercase font-weight-black text-medium-emphasis"
|
|
50
50
|
>
|
|
51
|
-
<v-icon icon="
|
|
51
|
+
<v-icon icon="ph-stack" size="small" class="mr-2" color="secondary" />
|
|
52
52
|
Overlapping objects
|
|
53
53
|
</v-card-title>
|
|
54
54
|
|
|
@@ -63,18 +63,21 @@ function handleUpdate(val: boolean): void {
|
|
|
63
63
|
>
|
|
64
64
|
<template #prepend>
|
|
65
65
|
<v-img
|
|
66
|
-
v-if="
|
|
67
|
-
:src="
|
|
66
|
+
v-if="item.geode_object_type"
|
|
67
|
+
:src="geodeObjectImage(item.geode_object_type)"
|
|
68
68
|
height="24"
|
|
69
69
|
width="24"
|
|
70
70
|
max-width="24"
|
|
71
71
|
class="mr-3"
|
|
72
|
-
style="
|
|
72
|
+
style="
|
|
73
|
+
object-fit: contain;
|
|
74
|
+
filter: var(--ogw-mono-icon-filter, brightness(0) invert(1));
|
|
75
|
+
"
|
|
73
76
|
/>
|
|
74
|
-
<v-icon v-else icon="
|
|
77
|
+
<v-icon v-else icon="ph-cube" size="24" class="mr-3" />
|
|
75
78
|
</template>
|
|
76
79
|
|
|
77
|
-
<v-list-item-title class="font-weight-bold text-body-2 text-truncate
|
|
80
|
+
<v-list-item-title class="font-weight-bold text-body-2 text-truncate">
|
|
78
81
|
{{ item.name }}
|
|
79
82
|
</v-list-item-title>
|
|
80
83
|
<v-list-item-subtitle
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { ColorRGBA, Opacity } from "@geode/opengeodeweb-viewer/schema_types";
|
|
2
3
|
import {
|
|
3
4
|
type RangesPerData,
|
|
4
5
|
applyRangesPerData,
|
|
@@ -8,9 +9,7 @@ import ViewerContextMenuItem, {
|
|
|
8
9
|
type ItemProps,
|
|
9
10
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
10
11
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
11
|
-
import type { Opacity } from "@ogw_front/types/style";
|
|
12
12
|
import PointSetPoints from "@ogw_front/assets/viewer_svgs/point_set_points.svg";
|
|
13
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
14
13
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
15
14
|
import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size.vue";
|
|
16
15
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
@@ -62,8 +61,8 @@ const coloring_style_key = computed({
|
|
|
62
61
|
hybridViewerStore.remoteRender();
|
|
63
62
|
},
|
|
64
63
|
});
|
|
65
|
-
const color = computed<
|
|
66
|
-
get: () => dataStyleStore.meshPointsColor(dataId.value) as
|
|
64
|
+
const color = computed<ColorRGBA | undefined>({
|
|
65
|
+
get: () => dataStyleStore.meshPointsColor(dataId.value) as ColorRGBA | undefined,
|
|
67
66
|
set: async (newValue) => {
|
|
68
67
|
if (newValue === undefined) {
|
|
69
68
|
return;
|
|
@@ -142,7 +141,7 @@ const vertex_attribute_color_map = computed({
|
|
|
142
141
|
hybridViewerStore.remoteRender();
|
|
143
142
|
},
|
|
144
143
|
});
|
|
145
|
-
const vertex_attribute_no_data_color = computed<
|
|
144
|
+
const vertex_attribute_no_data_color = computed<ColorRGBA>({
|
|
146
145
|
get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(dataId.value),
|
|
147
146
|
set: async (newValue) => {
|
|
148
147
|
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import ViewerContextMenuItem, {
|
|
3
3
|
type ItemProps,
|
|
4
4
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
|
-
import type {
|
|
5
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
6
6
|
import ViewerOptionsColorPicker from "@ogw_front/components/Viewer/Options/ColorPicker.vue";
|
|
7
7
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ const { itemProps } = defineProps<Props>();
|
|
|
14
14
|
|
|
15
15
|
const dataStyleStore = useDataStyleStore();
|
|
16
16
|
|
|
17
|
-
const backgroundColor = computed<
|
|
17
|
+
const backgroundColor = computed<ColorRGBA>({
|
|
18
18
|
get: () => dataStyleStore.sceneStyle.background_color,
|
|
19
19
|
set: async (color) => {
|
|
20
20
|
await dataStyleStore.setSceneBackgroundColor(color);
|
|
@@ -28,7 +28,7 @@ const backgroundColor = computed<RGBAColor>({
|
|
|
28
28
|
:index="itemProps.index"
|
|
29
29
|
:itemProps="itemProps"
|
|
30
30
|
tooltip="Background"
|
|
31
|
-
btnIcon="
|
|
31
|
+
btnIcon="ph-image"
|
|
32
32
|
>
|
|
33
33
|
<template #options>
|
|
34
34
|
<ViewerOptionsColorPicker v-model="backgroundColor" disabled-alpha />
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import ViewerContextMenuItem, {
|
|
3
3
|
type ItemProps,
|
|
4
4
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
|
-
import type {
|
|
5
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
6
6
|
import type { SceneFontFamily } from "@ogw_internal/stores/data_style/types";
|
|
7
7
|
import ViewerOptionsColorPicker from "@ogw_front/components/Viewer/Options/ColorPicker.vue";
|
|
8
8
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
@@ -23,7 +23,7 @@ const FONT_FAMILIES: { title: string; value: SceneFontFamily }[] = [
|
|
|
23
23
|
{ title: "Times", value: "times" },
|
|
24
24
|
];
|
|
25
25
|
|
|
26
|
-
const textColor = computed<
|
|
26
|
+
const textColor = computed<ColorRGBA>({
|
|
27
27
|
get: () => dataStyleStore.sceneStyle.text.color,
|
|
28
28
|
set: async (color) => {
|
|
29
29
|
await dataStyleStore.setSceneTextColor(color);
|
|
@@ -46,7 +46,7 @@ const fontFamily = computed<SceneFontFamily>({
|
|
|
46
46
|
:index="itemProps.index"
|
|
47
47
|
:itemProps="itemProps"
|
|
48
48
|
tooltip="Text"
|
|
49
|
-
btnIcon="
|
|
49
|
+
btnIcon="ph-text-aa"
|
|
50
50
|
>
|
|
51
51
|
<template #options>
|
|
52
52
|
<v-select
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import type {
|
|
3
3
|
AttributeItem,
|
|
4
4
|
AttributeName,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "@
|
|
8
|
-
import type {
|
|
5
|
+
ColorRGBA,
|
|
6
|
+
Opacity,
|
|
7
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
8
|
+
import type { AttributeRange, AttributeTimeStep } from "@ogw_front/types/attribute";
|
|
9
9
|
import {
|
|
10
10
|
type RangesPerData,
|
|
11
11
|
applyRangesPerData,
|
|
12
12
|
useBatchStyle,
|
|
13
13
|
} from "@ogw_front/composables/batch_style";
|
|
14
|
-
import type {
|
|
15
|
-
import type {
|
|
14
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
15
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
16
16
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
17
17
|
import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
|
|
18
18
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
@@ -37,9 +37,9 @@ const coloring_style_key = computed<string>({
|
|
|
37
37
|
hybridViewerStore.remoteRender();
|
|
38
38
|
},
|
|
39
39
|
});
|
|
40
|
-
const color = useBatchStyleModel<
|
|
40
|
+
const color = useBatchStyleModel<ColorRGBA>(
|
|
41
41
|
() => dataId,
|
|
42
|
-
(meshId) => dataStyleStore.meshPolyhedraColor(meshId) as
|
|
42
|
+
(meshId) => dataStyleStore.meshPolyhedraColor(meshId) as ColorRGBA | undefined,
|
|
43
43
|
(meshId, value) => dataStyleStore.setMeshPolyhedraColor(meshId, value),
|
|
44
44
|
);
|
|
45
45
|
const opacity = useBatchStyleModel<Opacity>(
|
|
@@ -96,7 +96,7 @@ const vertex_attribute_range = computed<AttributeRange>({
|
|
|
96
96
|
hybridViewerStore.remoteRender();
|
|
97
97
|
},
|
|
98
98
|
});
|
|
99
|
-
const vertex_attribute_color_map = computed<Map<string,
|
|
99
|
+
const vertex_attribute_color_map = computed<Map<string, ColorRGBA> | undefined>({
|
|
100
100
|
get: () => dataStyleStore.meshPolyhedraVertexAttributeColorMap(dataId),
|
|
101
101
|
set: async (newValue) => {
|
|
102
102
|
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
@@ -105,7 +105,7 @@ const vertex_attribute_color_map = computed<Map<string, RGBAColor> | undefined>(
|
|
|
105
105
|
hybridViewerStore.remoteRender();
|
|
106
106
|
},
|
|
107
107
|
});
|
|
108
|
-
const vertex_attribute_no_data_color = computed<
|
|
108
|
+
const vertex_attribute_no_data_color = computed<ColorRGBA>({
|
|
109
109
|
get: () => dataStyleStore.meshPolyhedraVertexAttributeNoDataColor(dataId),
|
|
110
110
|
set: async (newValue) => {
|
|
111
111
|
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
@@ -163,7 +163,7 @@ const polyhedron_attribute_range = computed<AttributeRange>({
|
|
|
163
163
|
hybridViewerStore.remoteRender();
|
|
164
164
|
},
|
|
165
165
|
});
|
|
166
|
-
const polyhedron_attribute_color_map = computed<Map<string,
|
|
166
|
+
const polyhedron_attribute_color_map = computed<Map<string, ColorRGBA> | undefined>({
|
|
167
167
|
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeColorMap(dataId),
|
|
168
168
|
set: async (newValue) => {
|
|
169
169
|
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
@@ -172,7 +172,7 @@ const polyhedron_attribute_color_map = computed<Map<string, RGBAColor> | undefin
|
|
|
172
172
|
hybridViewerStore.remoteRender();
|
|
173
173
|
},
|
|
174
174
|
});
|
|
175
|
-
const polyhedron_attribute_no_data_color = computed<
|
|
175
|
+
const polyhedron_attribute_no_data_color = computed<ColorRGBA>({
|
|
176
176
|
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeNoDataColor(dataId),
|
|
177
177
|
set: async (newValue) => {
|
|
178
178
|
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
@@ -6,7 +6,7 @@ import type { MeshId } from "@ogw_front/types/identifiers";
|
|
|
6
6
|
import SolidPolyhedra from "@ogw_front/assets/viewer_svgs/solid_polyhedra.svg";
|
|
7
7
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
8
8
|
import ViewerSolidSpecificPolyhedraColoring from "@ogw_front/components/Viewer/Solid/SpecificPolyhedraColoring.vue";
|
|
9
|
-
import type { Visibility } from "@
|
|
9
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
10
10
|
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
11
11
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
12
12
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|