@geode/opengeodeweb-front 10.44.0-rc.3 → 10.44.0-rc.4

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.
Files changed (106) hide show
  1. package/.build/server/utils/microservices.js +9 -85
  2. package/.build/server/utils/microservices_process.js +85 -0
  3. package/app/components/ClippingPlanes.vue +16 -82
  4. package/app/components/DragAndDrop.vue +1 -74
  5. package/app/components/ThresholdCard.vue +205 -0
  6. package/app/components/ThresholdFilter.vue +77 -216
  7. package/app/components/ViewToolbar.vue +15 -231
  8. package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +209 -0
  9. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +3 -191
  10. package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +228 -0
  11. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +3 -210
  12. package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +211 -0
  13. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +3 -192
  14. package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +234 -0
  15. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +3 -215
  16. package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +221 -0
  17. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +3 -203
  18. package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +2 -18
  19. package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +145 -0
  20. package/app/components/Viewer/Generic/Model/CornersOptions.vue +13 -294
  21. package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +173 -0
  22. package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +218 -0
  23. package/app/components/Viewer/Generic/Model/LinesOptions.vue +13 -425
  24. package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +229 -0
  25. package/app/components/Viewer/Options/AttributeSelector.vue +26 -133
  26. package/app/components/Viewer/Options/ColoringTypeSelector.vue +36 -74
  27. package/app/components/Viewer/Options/NoDataColorInfo.vue +56 -0
  28. package/app/components/Viewer/Solid/SpecificPolyhedraColoring.vue +217 -0
  29. package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +4 -199
  30. package/app/components/Viewer/Surface/PolygonsColoring.vue +231 -0
  31. package/app/components/Viewer/Surface/PolygonsOptions.vue +3 -213
  32. package/app/composables/attribute_selector.ts +126 -0
  33. package/app/composables/clipping_slices.ts +166 -0
  34. package/app/composables/view_toolbar_options.ts +126 -0
  35. package/app/composables/view_toolbar_tool_options.ts +115 -0
  36. package/app/composables/view_toolbar_tools.ts +108 -0
  37. package/app/composables/virtual_tree.ts +20 -138
  38. package/app/composables/virtual_tree_flatten.ts +86 -0
  39. package/app/composables/virtual_tree_types.ts +81 -0
  40. package/app/stores/app.ts +8 -55
  41. package/app/stores/app_helpers/registry.ts +69 -0
  42. package/app/stores/menu.ts +1 -124
  43. package/app/stores/menu_helpers/menus_data.ts +127 -0
  44. package/app/stores/viewer.ts +17 -78
  45. package/app/stores/viewer_helpers/actions.ts +68 -0
  46. package/app/stores/viewer_helpers/request.ts +61 -0
  47. package/app/utils/clipping_planes.ts +4 -132
  48. package/app/utils/clipping_planes_scene.ts +131 -0
  49. package/app/utils/coloring_styles.ts +101 -0
  50. package/app/utils/default_styles/mesh_components.ts +168 -0
  51. package/app/utils/default_styles/meshes.ts +13 -153
  52. package/app/utils/default_styles/model_components.ts +170 -0
  53. package/app/utils/default_styles/models.ts +16 -153
  54. package/app/utils/drag_and_drop.ts +80 -0
  55. package/app/utils/model_component_coloring.ts +46 -0
  56. package/app/utils/threshold.ts +33 -0
  57. package/app/utils/threshold_sources.ts +51 -0
  58. package/internal/stores/data_style/mesh/cells/cell.ts +27 -150
  59. package/internal/stores/data_style/mesh/cells/cell_attribute.ts +74 -0
  60. package/internal/stores/data_style/mesh/cells/cell_config.ts +152 -0
  61. package/internal/stores/data_style/mesh/cells/vertex.ts +26 -157
  62. package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +80 -0
  63. package/internal/stores/data_style/mesh/cells/vertex_config.ts +152 -0
  64. package/internal/stores/data_style/mesh/edges/edge.ts +27 -150
  65. package/internal/stores/data_style/mesh/edges/edge_attribute.ts +74 -0
  66. package/internal/stores/data_style/mesh/edges/edge_config.ts +152 -0
  67. package/internal/stores/data_style/mesh/edges/vertex.ts +26 -157
  68. package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +80 -0
  69. package/internal/stores/data_style/mesh/edges/vertex_config.ts +152 -0
  70. package/internal/stores/data_style/mesh/points/vertex.ts +26 -157
  71. package/internal/stores/data_style/mesh/points/vertex_attribute.ts +80 -0
  72. package/internal/stores/data_style/mesh/points/vertex_config.ts +152 -0
  73. package/internal/stores/data_style/mesh/polygons/polygon.ts +27 -152
  74. package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +80 -0
  75. package/internal/stores/data_style/mesh/polygons/polygon_config.ts +148 -0
  76. package/internal/stores/data_style/mesh/polygons/vertex.ts +26 -157
  77. package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +80 -0
  78. package/internal/stores/data_style/mesh/polygons/vertex_config.ts +152 -0
  79. package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +27 -160
  80. package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +82 -0
  81. package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +157 -0
  82. package/internal/stores/data_style/mesh/polyhedra/vertex.ts +26 -157
  83. package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +80 -0
  84. package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +152 -0
  85. package/internal/stores/data_style/model/blocks/apply_coloring.ts +173 -0
  86. package/internal/stores/data_style/model/blocks/coloring_groups.ts +18 -0
  87. package/internal/stores/data_style/model/blocks/index.ts +12 -140
  88. package/internal/stores/data_style/model/common.ts +10 -119
  89. package/internal/stores/data_style/model/common_mutations.ts +184 -0
  90. package/internal/stores/data_style/model/lines/apply_coloring.ts +154 -0
  91. package/internal/stores/data_style/model/lines/coloring_groups.ts +18 -0
  92. package/internal/stores/data_style/model/lines/index.ts +10 -134
  93. package/internal/stores/data_style/model/surfaces/apply_coloring.ts +186 -0
  94. package/internal/stores/data_style/model/surfaces/coloring_groups.ts +18 -0
  95. package/internal/stores/data_style/model/surfaces/index.ts +16 -160
  96. package/internal/stores/data_style/model/visibility.ts +3 -156
  97. package/internal/stores/data_style/model/visibility_dispatch.ts +160 -0
  98. package/internal/stores/data_style/state.ts +1 -181
  99. package/internal/stores/data_style/state_shared.ts +191 -0
  100. package/internal/stores/hybrid_viewer/camera.ts +7 -161
  101. package/internal/stores/hybrid_viewer/camera_helpers.ts +120 -0
  102. package/internal/stores/hybrid_viewer/camera_orientation.ts +60 -0
  103. package/internal/stores/hybrid_viewer/filters.ts +54 -11
  104. package/package.json +1 -1
  105. package/server/utils/microservices.ts +10 -109
  106. package/server/utils/microservices_process.ts +127 -0
@@ -1,15 +1,10 @@
1
1
  <script setup lang="ts">
2
- import {
3
- type RangesPerData,
4
- applyRangesPerData,
5
- useBatchStyle,
6
- } from "@ogw_front/composables/batch_style";
7
2
  import ViewerContextMenuItem, {
8
3
  type ItemProps,
9
4
  } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
10
- import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
11
- import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
5
+ import ViewerGenericMeshPolyhedraColoring from "@ogw_front/components/Viewer/Generic/Mesh/PolyhedraColoring.vue";
12
6
  import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
7
+ import { useBatchStyle } from "@ogw_front/composables/batch_style";
13
8
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
14
9
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
15
10
 
@@ -36,179 +31,6 @@ const visibility = computed<boolean>({
36
31
  hybridViewerStore.remoteRender();
37
32
  },
38
33
  });
39
- const coloring_style_key = computed<string>({
40
- get: () => dataStyleStore.meshPolyhedraActiveColoring(id.value),
41
- set: async (newValue) => {
42
- await applyBatchStyle(id.value, (targetId: string) =>
43
- dataStyleStore.setMeshPolyhedraActiveColoring(targetId, newValue),
44
- );
45
- hybridViewerStore.remoteRender();
46
- },
47
- });
48
- const color = computed<RGBAColor | undefined>({
49
- get: () => dataStyleStore.meshPolyhedraColor(id.value) as RGBAColor | undefined,
50
- set: async (newValue) => {
51
- if (newValue === undefined) {
52
- return;
53
- }
54
- await applyBatchStyle(id.value, (targetId: string) =>
55
- dataStyleStore.setMeshPolyhedraColor(targetId, newValue),
56
- );
57
- hybridViewerStore.remoteRender();
58
- },
59
- });
60
- const vertex_attribute_name = computed<string | undefined>({
61
- get: () => dataStyleStore.meshPolyhedraVertexAttributeName(id.value),
62
- set: async (newValue) => {
63
- if (newValue === undefined) {
64
- return;
65
- }
66
- await applyBatchStyle(id.value, (targetId: string) =>
67
- Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeName(targetId, newValue)),
68
- );
69
- hybridViewerStore.remoteRender();
70
- },
71
- });
72
-
73
- const vertex_attribute_time_step = computed<number | undefined>({
74
- get: () => dataStyleStore.meshPolyhedraVertexAttributeTimeStep(id.value),
75
- set: async (newValue) => {
76
- if (newValue === undefined) {
77
- return;
78
- }
79
- await applyBatchStyle(id.value, (targetId: string) =>
80
- Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeTimeStep(targetId, newValue)),
81
- );
82
- hybridViewerStore.remoteRender();
83
- },
84
- });
85
- const vertex_attribute_item = computed<string | undefined>({
86
- get: () => dataStyleStore.meshPolyhedraVertexAttributeItem(id.value),
87
- set: async (newValue) => {
88
- await applyBatchStyle(id.value, (targetId: string) =>
89
- Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeItem(targetId, newValue)),
90
- );
91
- hybridViewerStore.remoteRender();
92
- },
93
- });
94
- const vertex_attribute_range = computed<[number, number] | undefined>({
95
- get: () => dataStyleStore.meshPolyhedraVertexAttributeRange(id.value),
96
- set: async (newValue) => {
97
- const [minimum, maximum] = newValue;
98
- if (minimum === undefined || maximum === undefined) {
99
- return;
100
- }
101
- await applyBatchStyle(id.value, (targetId: string) =>
102
- Promise.resolve(
103
- dataStyleStore.setMeshPolyhedraVertexAttributeRange(targetId, minimum, maximum),
104
- ),
105
- );
106
- hybridViewerStore.remoteRender();
107
- },
108
- });
109
- const vertex_attribute_color_map = computed<Map<string, RGBAColor>>({
110
- get: () => dataStyleStore.meshPolyhedraVertexAttributeColorMap(id.value),
111
- set: async (newValue) => {
112
- await applyBatchStyle(id.value, (targetId: string) =>
113
- Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeColorMap(targetId, newValue)),
114
- );
115
- hybridViewerStore.remoteRender();
116
- },
117
- });
118
- const vertex_attribute_no_data_color = computed<RGBAColor>({
119
- get: () => dataStyleStore.meshPolyhedraVertexAttributeNoDataColor(id.value),
120
- set: async (newValue) => {
121
- await applyBatchStyle(id.value, (targetId: string) =>
122
- dataStyleStore.setMeshPolyhedraVertexAttributeNoDataColor(targetId, newValue),
123
- );
124
- hybridViewerStore.remoteRender();
125
- },
126
- });
127
- const polyhedron_attribute_name = computed<string | undefined>({
128
- get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeName(id.value),
129
- set: async (newValue) => {
130
- if (newValue === undefined) {
131
- return;
132
- }
133
- await applyBatchStyle(id.value, (targetId: string) =>
134
- Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeName(targetId, newValue)),
135
- );
136
- hybridViewerStore.remoteRender();
137
- },
138
- });
139
-
140
- const polyhedron_attribute_time_step = computed<number | undefined>({
141
- get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeTimeStep(id.value),
142
- set: async (newValue) => {
143
- if (newValue === undefined) {
144
- return;
145
- }
146
- await applyBatchStyle(id.value, (targetId: string) =>
147
- Promise.resolve(
148
- dataStyleStore.setMeshPolyhedraPolyhedronAttributeTimeStep(targetId, newValue),
149
- ),
150
- );
151
- hybridViewerStore.remoteRender();
152
- },
153
- });
154
- const polyhedron_attribute_item = computed<string | undefined>({
155
- get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeItem(id.value),
156
- set: async (newValue) => {
157
- await applyBatchStyle(id.value, (targetId: string) =>
158
- Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeItem(targetId, newValue)),
159
- );
160
- hybridViewerStore.remoteRender();
161
- },
162
- });
163
- const polyhedron_attribute_range = computed<[number, number] | undefined>({
164
- get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeRange(id.value),
165
- set: async (newValue) => {
166
- const [minimum, maximum] = newValue;
167
- if (minimum === undefined || maximum === undefined) {
168
- return;
169
- }
170
- await applyBatchStyle(id.value, (targetId: string) =>
171
- Promise.resolve(
172
- dataStyleStore.setMeshPolyhedraPolyhedronAttributeRange(targetId, minimum, maximum),
173
- ),
174
- );
175
- hybridViewerStore.remoteRender();
176
- },
177
- });
178
- const polyhedron_attribute_color_map = computed<Map<string, RGBAColor>>({
179
- get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeColorMap(id.value),
180
- set: async (newValue) => {
181
- await applyBatchStyle(id.value, (targetId: string) =>
182
- Promise.resolve(
183
- dataStyleStore.setMeshPolyhedraPolyhedronAttributeColorMap(targetId, newValue),
184
- ),
185
- );
186
- hybridViewerStore.remoteRender();
187
- },
188
- });
189
- const polyhedron_attribute_no_data_color = computed<RGBAColor>({
190
- get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeNoDataColor(id.value),
191
- set: async (newValue) => {
192
- await applyBatchStyle(id.value, (targetId: string) =>
193
- dataStyleStore.setMeshPolyhedraPolyhedronAttributeNoDataColor(targetId, newValue),
194
- );
195
- hybridViewerStore.remoteRender();
196
- },
197
- });
198
-
199
- async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
200
- await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
201
- dataStyleStore.setMeshPolyhedraVertexAttributeRange(targetId, minimum, maximum),
202
- );
203
- hybridViewerStore.remoteRender();
204
- }
205
-
206
- async function setPolyhedronAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
207
- await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
208
- dataStyleStore.setMeshPolyhedraPolyhedronAttributeRange(targetId, minimum, maximum),
209
- );
210
- hybridViewerStore.remoteRender();
211
- }
212
34
  </script>
213
35
 
214
36
  <template>
@@ -226,29 +48,7 @@ async function setPolyhedronAttributeRangesPerData(ranges: RangesPerData): Promi
226
48
  />
227
49
  <template v-if="visibility">
228
50
  <v-divider />
229
- <ViewerOptionsColoringTypeSelector
230
- :id="id"
231
- v-model:coloring_style_key="coloring_style_key"
232
- v-model:color="color"
233
- v-model:vertex_attribute_name="vertex_attribute_name"
234
- v-model:vertex_attribute_item="vertex_attribute_item"
235
- v-model:vertex_attribute_range="vertex_attribute_range"
236
- @vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
237
- v-model:vertex_attribute_color_map="vertex_attribute_color_map"
238
- v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
239
- v-model:vertex_attribute_time_step="vertex_attribute_time_step"
240
- v-model:polyhedron_attribute_name="polyhedron_attribute_name"
241
- v-model:polyhedron_attribute_item="polyhedron_attribute_item"
242
- v-model:polyhedron_attribute_range="polyhedron_attribute_range"
243
- @polyhedron_attribute_ranges_per_data="setPolyhedronAttributeRangesPerData"
244
- v-model:polyhedron_attribute_color_map="polyhedron_attribute_color_map"
245
- v-model:polyhedron_attribute_no_data_color="polyhedron_attribute_no_data_color"
246
- v-model:polyhedron_attribute_time_step="polyhedron_attribute_time_step"
247
- :capabilities="{
248
- vertex: { available: true, hasColorMap: true },
249
- polyhedron: { available: true, hasColorMap: true },
250
- }"
251
- />
51
+ <ViewerGenericMeshPolyhedraColoring :id="id" />
252
52
  </template>
253
53
  </template>
254
54
  </ViewerContextMenuItem>
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
+ import { MODEL_VERTEX_COLORING } from "@ogw_front/utils/model_component_coloring";
2
3
  import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
3
4
  import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
4
5
  import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size.vue";
5
6
  import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
6
- import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
7
7
  import { useDataStyleStore } from "@ogw_front/stores/data_style";
8
8
  import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
9
9
 
@@ -203,23 +203,7 @@ const vertexAttributeNoDataColor = computed<RGBAColor | undefined>({
203
203
  },
204
204
  });
205
205
 
206
- const capabilities = {
207
- color: { available: true },
208
- textures: { available: false },
209
- vertex: { available: true },
210
- edge: { available: false },
211
- cell: { available: false },
212
- polygon: { available: false },
213
- polyhedron: { available: false },
214
- };
215
-
216
- const backSchemas = back_schemas.opengeodeweb_back;
217
- const attributeSchemas = {
218
- vertex: {
219
- names: backSchemas.model_component_vertex_attribute_names,
220
- range: backSchemas.model_component_vertex_attribute_range,
221
- },
222
- };
206
+ const { capabilities, schemas: attributeSchemas } = MODEL_VERTEX_COLORING;
223
207
  </script>
224
208
 
225
209
  <template>
@@ -0,0 +1,145 @@
1
+ <script setup lang="ts">
2
+ import { MODEL_VERTEX_COLORING } from "@ogw_front/utils/model_component_coloring";
3
+ import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
4
+ import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
5
+ import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
6
+ import { useDataStyleStore } from "@ogw_front/stores/data_style";
7
+ import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
8
+
9
+ interface Props {
10
+ modelId: string;
11
+ cornerId?: string;
12
+ activeTab?: string;
13
+ }
14
+
15
+ const { modelId, cornerId = undefined, activeTab = undefined } = defineProps<Props>();
16
+
17
+ const dataStyleStore = useDataStyleStore();
18
+ const hybridViewerStore = useHybridViewerStore();
19
+
20
+ const cornerComponentIds = computed<string[]>(() => (cornerId !== undefined && [cornerId]) || []);
21
+
22
+ const cornerVisibility = computed<boolean | undefined>({
23
+ get: () => dataStyleStore.modelCornerVisibility(modelId, cornerId) as boolean | undefined,
24
+ set: async (newValue) => {
25
+ if (newValue === undefined || cornerId === undefined) {
26
+ return;
27
+ }
28
+ await dataStyleStore.setModelCornersVisibility(modelId, [cornerId], newValue);
29
+ hybridViewerStore.remoteRender();
30
+ },
31
+ });
32
+
33
+ const cornerColor = computed<RGBAColor | undefined>({
34
+ get: () => dataStyleStore.modelCornerColor(modelId, cornerId) as RGBAColor | undefined,
35
+ set: async (color) => {
36
+ if (cornerId === undefined) {
37
+ return;
38
+ }
39
+ await dataStyleStore.setModelCornersColor(modelId, [cornerId], color);
40
+ hybridViewerStore.remoteRender();
41
+ },
42
+ });
43
+
44
+ const cornerActiveColoring = computed<string | undefined>({
45
+ get: () => dataStyleStore.modelCornerActiveColoring(modelId, cornerId) as string | undefined,
46
+ set: async (coloringType) => {
47
+ if (cornerId === undefined || typeof coloringType !== "string") {
48
+ return;
49
+ }
50
+ await dataStyleStore.setModelCornersActiveColoring(modelId, [cornerId], coloringType);
51
+ hybridViewerStore.remoteRender();
52
+ },
53
+ });
54
+
55
+ // Individual Attributes
56
+ const vertexAttributeName = computed<string | undefined>({
57
+ get: () => dataStyleStore.modelCornersVertexAttributeName(modelId, cornerId),
58
+ set: async (newValue) => {
59
+ if (cornerId === undefined || newValue === undefined) {
60
+ return;
61
+ }
62
+ await dataStyleStore.setModelCornersVertexAttributeName(modelId, [cornerId], newValue);
63
+ hybridViewerStore.remoteRender();
64
+ },
65
+ });
66
+
67
+ const vertexAttributeTimeStep = computed<number | undefined>({
68
+ get: () => dataStyleStore.modelCornersVertexAttributeTimeStep(modelId, cornerId),
69
+ set: async (newValue) => {
70
+ if (cornerId === undefined || newValue === undefined) {
71
+ return;
72
+ }
73
+ await dataStyleStore.setModelCornersVertexAttributeTimeStep(modelId, [cornerId], newValue);
74
+ hybridViewerStore.remoteRender();
75
+ },
76
+ });
77
+
78
+ const vertexAttributeItem = computed<string | undefined>({
79
+ get: () => dataStyleStore.modelCornersVertexAttributeItem(modelId, cornerId),
80
+ set: async (newValue) => {
81
+ if (cornerId === undefined) {
82
+ return;
83
+ }
84
+ await dataStyleStore.setModelCornersVertexAttributeItem(modelId, [cornerId], newValue);
85
+ hybridViewerStore.remoteRender();
86
+ },
87
+ });
88
+
89
+ const vertexAttributeRange = computed<[number, number] | undefined>({
90
+ get: () => dataStyleStore.modelCornersVertexAttributeRange(modelId, cornerId),
91
+ set: async (newValue) => {
92
+ const [minimum, maximum] = newValue;
93
+ if (cornerId === undefined || minimum === undefined || maximum === undefined) {
94
+ return;
95
+ }
96
+ await dataStyleStore.setModelCornersVertexAttributeRange(modelId, [cornerId], minimum, maximum);
97
+ hybridViewerStore.remoteRender();
98
+ },
99
+ });
100
+
101
+ const vertexAttributeColorMap = computed<ColorMap | undefined>({
102
+ get: () => dataStyleStore.modelCornersVertexAttributeColorMap(modelId, cornerId),
103
+ set: async (newValue) => {
104
+ if (cornerId === undefined) {
105
+ return;
106
+ }
107
+ await dataStyleStore.setModelCornersVertexAttributeColorMap(modelId, [cornerId], newValue);
108
+ hybridViewerStore.remoteRender();
109
+ },
110
+ });
111
+
112
+ const vertexAttributeNoDataColor = computed<RGBAColor>({
113
+ get: () => dataStyleStore.modelCornersVertexAttributeNoDataColor(modelId, cornerId),
114
+ set: async (newValue) => {
115
+ if (cornerId === undefined) {
116
+ return;
117
+ }
118
+ await dataStyleStore.setModelCornersVertexAttributeNoDataColor(modelId, [cornerId], newValue);
119
+ hybridViewerStore.remoteRender();
120
+ },
121
+ });
122
+
123
+ const { capabilities, schemas: attributeSchemas } = MODEL_VERTEX_COLORING;
124
+ </script>
125
+
126
+ <template>
127
+ <div v-show="!activeTab || activeTab === 'component'" data-testid="modelComponentOptions">
128
+ <VisibilitySwitch v-model="cornerVisibility" />
129
+ <ViewerOptionsColoringTypeSelector
130
+ :id="modelId"
131
+ :componentIds="cornerComponentIds"
132
+ v-model:coloring_style_key="cornerActiveColoring"
133
+ v-model:color="cornerColor"
134
+ v-model:vertex_attribute_name="vertexAttributeName"
135
+ v-model:vertex_attribute_item="vertexAttributeItem"
136
+ v-model:vertex_attribute_range="vertexAttributeRange"
137
+ v-model:vertex_attribute_color_map="vertexAttributeColorMap"
138
+ v-model:vertex_attribute_no_data_color="vertexAttributeNoDataColor"
139
+ v-model:vertex_attribute_time_step="vertexAttributeTimeStep"
140
+ :capabilities="capabilities"
141
+ :schemas="attributeSchemas"
142
+ :allowRandom="true"
143
+ />
144
+ </div>
145
+ </template>