@geode/opengeodeweb-front 10.2.1 → 10.3.0

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 (83) hide show
  1. package/.github/workflows/manual_release.yml +11 -0
  2. package/app/components/Step.vue +2 -2
  3. package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +63 -19
  4. package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +65 -18
  5. package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +8 -15
  6. package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +8 -9
  7. package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +8 -8
  8. package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +6 -6
  9. package/app/components/Viewer/Generic/Model/EdgesOptions.vue +2 -2
  10. package/app/components/Viewer/Generic/Model/PointsOptions.vue +4 -4
  11. package/app/components/Viewer/Options/AttributeColorBar.vue +58 -0
  12. package/app/components/Viewer/Options/CellAttributeSelector.vue +51 -19
  13. package/app/components/Viewer/Options/ColorMapList.vue +216 -0
  14. package/app/components/Viewer/Options/ColorMapPicker.vue +168 -0
  15. package/app/components/Viewer/Options/ColoringTypeSelector.vue +46 -24
  16. package/app/components/Viewer/Options/EdgeAttributeSelector.vue +53 -41
  17. package/app/components/Viewer/Options/PolygonAttributeSelector.vue +52 -19
  18. package/app/components/Viewer/Options/PolyhedronAttributeSelector.vue +57 -20
  19. package/app/components/Viewer/Options/VertexAttributeSelector.vue +47 -15
  20. package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +38 -14
  21. package/app/components/Viewer/PolygonalSurface/SpecificPolygonsOptions.vue +74 -18
  22. package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +75 -17
  23. package/app/components/Viewer/TreeComponent.vue +26 -76
  24. package/app/stores/data_style.js +3 -3
  25. package/app/utils/colormap.js +5 -0
  26. package/app/utils/default_styles.js +36 -9
  27. package/internal/stores/data_style/mesh/cells/cell.js +153 -0
  28. package/internal/stores/data_style/mesh/cells/color.js +40 -0
  29. package/internal/stores/data_style/mesh/cells/common.js +23 -0
  30. package/internal/stores/data_style/mesh/cells/index.js +84 -0
  31. package/internal/stores/data_style/mesh/cells/textures.js +36 -0
  32. package/internal/stores/data_style/mesh/cells/vertex.js +153 -0
  33. package/internal/stores/data_style/mesh/cells/visibility.js +40 -0
  34. package/internal/stores/data_style/mesh/edges/color.js +40 -0
  35. package/internal/stores/data_style/mesh/edges/common.js +23 -0
  36. package/internal/stores/data_style/mesh/edges/edge.js +141 -0
  37. package/internal/stores/data_style/mesh/edges/index.js +88 -0
  38. package/internal/stores/data_style/mesh/edges/vertex.js +153 -0
  39. package/internal/stores/data_style/mesh/edges/visibility.js +40 -0
  40. package/internal/stores/data_style/mesh/edges/width.js +40 -0
  41. package/internal/stores/{mesh → data_style/mesh}/index.js +25 -23
  42. package/internal/stores/data_style/mesh/points/color.js +40 -0
  43. package/internal/stores/data_style/mesh/points/common.js +23 -0
  44. package/internal/stores/data_style/mesh/points/index.js +89 -0
  45. package/internal/stores/data_style/mesh/points/size.js +40 -0
  46. package/internal/stores/data_style/mesh/points/vertex.js +153 -0
  47. package/internal/stores/data_style/mesh/points/visibility.js +40 -0
  48. package/internal/stores/data_style/mesh/polygons/color.js +40 -0
  49. package/internal/stores/data_style/mesh/polygons/common.js +23 -0
  50. package/internal/stores/data_style/mesh/polygons/index.js +89 -0
  51. package/internal/stores/data_style/mesh/polygons/polygon.js +145 -0
  52. package/internal/stores/data_style/mesh/polygons/textures.js +40 -0
  53. package/internal/stores/data_style/mesh/polygons/vertex.js +153 -0
  54. package/internal/stores/data_style/mesh/polygons/visibility.js +40 -0
  55. package/internal/stores/data_style/mesh/polyhedra/color.js +40 -0
  56. package/internal/stores/data_style/mesh/polyhedra/common.js +23 -0
  57. package/internal/stores/data_style/mesh/polyhedra/index.js +83 -0
  58. package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +139 -0
  59. package/internal/stores/data_style/mesh/polyhedra/vertex.js +153 -0
  60. package/internal/stores/data_style/mesh/polyhedra/visibility.js +41 -0
  61. package/internal/stores/{model → data_style/model}/blocks.js +1 -1
  62. package/internal/stores/{model → data_style/model}/corners.js +1 -1
  63. package/internal/stores/{model → data_style/model}/edges.js +1 -1
  64. package/internal/stores/{model → data_style/model}/index.js +3 -3
  65. package/internal/stores/{model → data_style/model}/lines.js +1 -1
  66. package/internal/stores/{model → data_style/model}/points.js +1 -1
  67. package/internal/stores/{model → data_style/model}/surfaces.js +1 -1
  68. package/internal/stores/{data_style_state.js → data_style/state.js} +6 -3
  69. package/package.json +1 -1
  70. package/tests/integration/microservices/back/requirements.txt +1 -1
  71. package/tests/integration/microservices/viewer/requirements.txt +1 -1
  72. package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +18 -18
  73. package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +22 -16
  74. package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +1 -1
  75. package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +14 -12
  76. package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +16 -19
  77. package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +16 -19
  78. package/tests/vitest.config.js +3 -0
  79. package/internal/stores/mesh/cells.js +0 -175
  80. package/internal/stores/mesh/edges.js +0 -171
  81. package/internal/stores/mesh/points.js +0 -142
  82. package/internal/stores/mesh/polygons.js +0 -181
  83. package/internal/stores/mesh/polyhedra.js +0 -151
@@ -1,26 +1,37 @@
1
1
  <script setup>
2
2
  import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
3
3
  import { useGeodeStore } from "@ogw_front/stores/geode"
4
+ import ViewerOptionsAttributeColorBar from "@ogw_front/components/Viewer/Options/AttributeColorBar"
5
+
6
+ const geodeStore = useGeodeStore()
7
+
8
+ const polygon_attribute_name = defineModel("polygon_attribute_name", {
9
+ type: String,
10
+ })
11
+ const polygon_attribute_range = defineModel("polygon_attribute_range", {
12
+ type: Array,
13
+ })
14
+ const polygon_attribute_color_map = defineModel(
15
+ "polygon_attribute_color_map",
16
+ { type: String },
17
+ )
18
+ const polygon_attributes = ref([])
4
19
 
5
20
  const props = defineProps({
6
21
  id: { type: String, required: true },
7
22
  })
8
23
 
9
- const model = defineModel()
10
- const polygon_attribute_name = ref("")
11
- const polygon_attribute_names = ref([])
12
- const polygon_attribute = reactive({ name: polygon_attribute_name.value })
13
- const geodeStore = useGeodeStore()
14
-
15
- onMounted(() => {
16
- if (model.value != null) {
17
- polygon_attribute_name.value = model.value.name
18
- }
24
+ const rangeMin = computed({
25
+ get: () => polygon_attribute_range.value[0],
26
+ set: (val) => {
27
+ polygon_attribute_range.value = [val, polygon_attribute_range.value[1]]
28
+ },
19
29
  })
20
-
21
- watch(polygon_attribute_name, (value) => {
22
- polygon_attribute.name = value
23
- model.value = polygon_attribute
30
+ const rangeMax = computed({
31
+ get: () => polygon_attribute_range.value[1],
32
+ set: (val) => {
33
+ polygon_attribute_range.value = [polygon_attribute_range.value[0], val]
34
+ },
24
35
  })
25
36
 
26
37
  onMounted(() => {
@@ -30,23 +41,45 @@
30
41
  function getPolygonAttributes() {
31
42
  geodeStore.request(
32
43
  back_schemas.opengeodeweb_back.polygon_attribute_names,
33
- {
34
- id: props.id,
35
- },
44
+ { id: props.id },
36
45
  {
37
46
  response_function: (response) => {
38
- polygon_attribute_names.value = response.polygon_attribute_names
47
+ polygon_attributes.value = response.attributes
39
48
  },
40
49
  },
41
50
  )
42
51
  }
52
+
53
+ const currentAttribute = computed(() => {
54
+ return polygon_attributes.value.find(
55
+ (attr) => attr.attribute_name === polygon_attribute_name.value,
56
+ )
57
+ })
58
+
59
+ function resetRange() {
60
+ if (currentAttribute.value) {
61
+ polygon_attribute_range.value = [
62
+ currentAttribute.value.min_value,
63
+ currentAttribute.value.max_value,
64
+ ]
65
+ }
66
+ }
43
67
  </script>
44
68
 
45
69
  <template>
46
70
  <v-select
47
71
  v-model="polygon_attribute_name"
48
- :items="polygon_attribute_names"
72
+ :items="polygon_attributes.map((attribute) => attribute.attribute_name)"
73
+ item-title="attribute_name"
74
+ item-value="attribute_name"
49
75
  label="Select an attribute"
50
76
  density="compact"
51
77
  />
78
+ <ViewerOptionsAttributeColorBar
79
+ v-if="polygon_attribute_name"
80
+ v-model:minimum="rangeMin"
81
+ v-model:maximum="rangeMax"
82
+ v-model:colorMap="polygon_attribute_color_map"
83
+ @reset="resetRange"
84
+ />
52
85
  </template>
@@ -1,54 +1,91 @@
1
1
  <script setup>
2
2
  import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
3
3
  import { useGeodeStore } from "@ogw_front/stores/geode"
4
+ import ViewerOptionsAttributeColorBar from "@ogw_front/components/Viewer/Options/AttributeColorBar"
4
5
 
5
- const model = defineModel()
6
-
7
- const polyhedron_attribute_name = ref("")
6
+ const geodeStore = useGeodeStore()
8
7
 
9
- onMounted(() => {
10
- if (model.value != null) {
11
- polyhedron_attribute_name.value = model.value.name
12
- }
8
+ const polyhedron_attribute_name = defineModel("polyhedron_attribute_name", {
9
+ type: String,
13
10
  })
14
- const polyhedron_attribute = reactive({
15
- name: polyhedron_attribute_name.value,
16
- })
17
-
18
- watch(polyhedron_attribute_name, (value) => {
19
- polyhedron_attribute.name = value
20
- model.value = polyhedron_attribute
11
+ const polyhedron_attribute_range = defineModel("polyhedron_attribute_range", {
12
+ type: Array,
21
13
  })
14
+ const polyhedron_attribute_color_map = defineModel(
15
+ "polyhedron_attribute_color_map",
16
+ { type: String },
17
+ )
18
+ const polyhedron_attributes = ref([])
22
19
 
23
20
  const props = defineProps({
24
21
  id: { type: String, required: true },
25
22
  })
26
23
 
27
- const polyhedron_attribute_names = ref([])
28
- const geodeStore = useGeodeStore()
24
+ const rangeMin = computed({
25
+ get: () => polyhedron_attribute_range.value[0],
26
+ set: (val) => {
27
+ polyhedron_attribute_range.value = [
28
+ val,
29
+ polyhedron_attribute_range.value[1],
30
+ ]
31
+ },
32
+ })
33
+ const rangeMax = computed({
34
+ get: () => polyhedron_attribute_range.value[1],
35
+ set: (val) => {
36
+ polyhedron_attribute_range.value = [
37
+ polyhedron_attribute_range.value[0],
38
+ val,
39
+ ]
40
+ },
41
+ })
29
42
 
30
43
  onMounted(() => {
31
- getVertexAttributes()
44
+ getPolyhedronAttributes()
32
45
  })
33
46
 
34
- function getVertexAttributes() {
47
+ function getPolyhedronAttributes() {
35
48
  geodeStore.request(
36
49
  back_schemas.opengeodeweb_back.polyhedron_attribute_names,
37
50
  { id: props.id },
38
51
  {
39
52
  response_function: (response) => {
40
- polyhedron_attribute_names.value = response.polyhedron_attribute_names
53
+ polyhedron_attributes.value = response.attributes
41
54
  },
42
55
  },
43
56
  )
44
57
  }
58
+
59
+ const currentAttribute = computed(() => {
60
+ return polyhedron_attributes.value.find(
61
+ (attr) => attr.attribute_name === polyhedron_attribute_name.value,
62
+ )
63
+ })
64
+
65
+ function resetRange() {
66
+ if (currentAttribute.value) {
67
+ polyhedron_attribute_range.value = [
68
+ currentAttribute.value.min_value,
69
+ currentAttribute.value.max_value,
70
+ ]
71
+ }
72
+ }
45
73
  </script>
46
74
 
47
75
  <template>
48
76
  <v-select
49
77
  v-model="polyhedron_attribute_name"
50
- :items="polyhedron_attribute_names"
78
+ :items="polyhedron_attributes.map((attribute) => attribute.attribute_name)"
79
+ item-title="attribute_name"
80
+ item-value="attribute_name"
51
81
  label="Select an attribute"
52
82
  density="compact"
53
83
  />
84
+ <ViewerOptionsAttributeColorBar
85
+ v-if="polyhedron_attribute_name"
86
+ v-model:minimum="rangeMin"
87
+ v-model:maximum="rangeMax"
88
+ v-model:colorMap="polyhedron_attribute_color_map"
89
+ @reset="resetRange"
90
+ />
54
91
  </template>
@@ -1,28 +1,36 @@
1
1
  <script setup>
2
2
  import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
3
3
  import { useGeodeStore } from "@ogw_front/stores/geode"
4
+ import ViewerOptionsAttributeColorBar from "@ogw_front/components/Viewer/Options/AttributeColorBar"
4
5
 
5
6
  const geodeStore = useGeodeStore()
6
7
 
7
- const model = defineModel()
8
+ const vertex_attribute_name = defineModel("vertex_attribute_name", {
9
+ type: String,
10
+ })
11
+ const vertex_attribute_range = defineModel("vertex_attribute_range", {
12
+ type: Array,
13
+ })
14
+ const vertex_attribute_color_map = defineModel("vertex_attribute_color_map", {
15
+ type: String,
16
+ })
17
+ const vertex_attributes = ref([])
8
18
 
9
19
  const props = defineProps({
10
20
  id: { type: String, required: true },
11
21
  })
12
22
 
13
- const vertex_attribute_name = ref("")
14
- const vertex_attribute_names = ref([])
15
-
16
- onMounted(() => {
17
- if (model.value != null) {
18
- vertex_attribute_name.value = model.value.name
19
- }
23
+ const rangeMin = computed({
24
+ get: () => vertex_attribute_range.value[0],
25
+ set: (val) => {
26
+ vertex_attribute_range.value = [val, vertex_attribute_range.value[1]]
27
+ },
20
28
  })
21
- const vertex_attribute = reactive({ name: vertex_attribute_name.value })
22
-
23
- watch(vertex_attribute_name, (value) => {
24
- vertex_attribute.name = value
25
- model.value = vertex_attribute
29
+ const rangeMax = computed({
30
+ get: () => vertex_attribute_range.value[1],
31
+ set: (val) => {
32
+ vertex_attribute_range.value = [vertex_attribute_range.value[0], val]
33
+ },
26
34
  })
27
35
 
28
36
  onMounted(() => {
@@ -35,18 +43,42 @@
35
43
  { id: props.id },
36
44
  {
37
45
  response_function: (response) => {
38
- vertex_attribute_names.value = response.vertex_attribute_names
46
+ vertex_attributes.value = response.attributes
39
47
  },
40
48
  },
41
49
  )
42
50
  }
51
+
52
+ const currentAttribute = computed(() => {
53
+ return vertex_attributes.value.find(
54
+ (attr) => attr.attribute_name === vertex_attribute_name.value,
55
+ )
56
+ })
57
+
58
+ function resetRange() {
59
+ if (currentAttribute.value) {
60
+ vertex_attribute_range.value = [
61
+ currentAttribute.value.min_value,
62
+ currentAttribute.value.max_value,
63
+ ]
64
+ }
65
+ }
43
66
  </script>
44
67
 
45
68
  <template>
46
69
  <v-select
47
70
  v-model="vertex_attribute_name"
48
- :items="vertex_attribute_names"
71
+ :items="vertex_attributes.map((attribute) => attribute.attribute_name)"
72
+ item-title="attribute_name"
73
+ item-value="attribute_name"
49
74
  label="Select an attribute"
50
75
  density="compact"
51
76
  />
77
+ <ViewerOptionsAttributeColorBar
78
+ v-if="vertex_attribute_name"
79
+ v-model:minimum="rangeMin"
80
+ v-model:maximum="rangeMax"
81
+ v-model:colorMap="vertex_attribute_color_map"
82
+ @reset="resetRange"
83
+ />
52
84
  </template>
@@ -18,41 +18,63 @@
18
18
 
19
19
  const visibility = computed({
20
20
  get: () => dataStyleStore.meshPointsVisibility(id.value),
21
- set: (newValue) => {
22
- dataStyleStore.setMeshPointsVisibility(id.value, newValue)
21
+ set: async (newValue) => {
22
+ await dataStyleStore.setMeshPointsVisibility(id.value, newValue)
23
23
  hybridViewerStore.remoteRender()
24
24
  },
25
25
  })
26
26
  const size = computed({
27
27
  get: () => dataStyleStore.meshPointsSize(id.value),
28
- set: (newValue) => {
29
- dataStyleStore.setMeshPointsSize(id.value, newValue)
28
+ set: async (newValue) => {
29
+ await dataStyleStore.setMeshPointsSize(id.value, newValue)
30
30
  hybridViewerStore.remoteRender()
31
31
  },
32
32
  })
33
33
  const coloring_style_key = computed({
34
34
  get: () => dataStyleStore.meshPointsActiveColoring(id.value),
35
- set: (newValue) => {
36
- dataStyleStore.setMeshPointsActiveColoring(id.value, newValue)
35
+ set: async (newValue) => {
36
+ await dataStyleStore.setMeshPointsActiveColoring(id.value, newValue)
37
37
  hybridViewerStore.remoteRender()
38
38
  },
39
39
  })
40
40
  const color = computed({
41
41
  get: () => dataStyleStore.meshPointsColor(id.value),
42
- set: (newValue) => {
43
- dataStyleStore.setMeshPointsColor(id.value, newValue)
42
+ set: async (newValue) => {
43
+ await dataStyleStore.setMeshPointsColor(id.value, newValue)
44
44
  hybridViewerStore.remoteRender()
45
45
  },
46
46
  })
47
- const vertex_attribute = computed({
48
- get: () => dataStyleStore.meshPointsVertexAttribute(id.value),
49
- set: (newValue) => {
50
- dataStyleStore.setMeshPointsVertexAttribute(id.value, newValue)
47
+ const vertex_attribute_name = computed({
48
+ get: () => dataStyleStore.meshPointsVertexAttributeName(id.value),
49
+ set: async (newValue) => {
50
+ await dataStyleStore.setMeshPointsVertexAttributeName(id.value, newValue)
51
+ await dataStyleStore.updateMeshPointsVertexAttribute(id.value)
52
+ hybridViewerStore.remoteRender()
53
+ },
54
+ })
55
+ const vertex_attribute_range = computed({
56
+ get: () => dataStyleStore.meshPointsVertexAttributeRange(id.value),
57
+ set: async (newValue) => {
58
+ await dataStyleStore.setMeshPointsVertexAttributeRange(
59
+ id.value,
60
+ newValue[0],
61
+ newValue[1],
62
+ )
63
+ await dataStyleStore.updateMeshPointsVertexAttribute(id.value)
64
+ hybridViewerStore.remoteRender()
65
+ },
66
+ })
67
+ const vertex_attribute_color_map = computed({
68
+ get: () => dataStyleStore.meshPointsVertexAttributeColorMap(id.value),
69
+ set: async (newValue) => {
70
+ await dataStyleStore.setMeshPointsVertexAttributeColorMap(
71
+ id.value,
72
+ newValue,
73
+ )
51
74
  hybridViewerStore.remoteRender()
52
75
  },
53
76
  })
54
77
  </script>
55
-
56
78
  <template>
57
79
  <ViewerContextMenuItem
58
80
  :itemProps="props.itemProps"
@@ -85,7 +107,9 @@
85
107
  :id="id"
86
108
  v-model:coloring_style_key="coloring_style_key"
87
109
  v-model:color="color"
88
- v-model:vertex_attribute="vertex_attribute"
110
+ v-model:vertex_attribute_name="vertex_attribute_name"
111
+ v-model:vertex_attribute_range="vertex_attribute_range"
112
+ v-model:vertex_attribute_color_map="vertex_attribute_color_map"
89
113
  />
90
114
  </v-col>
91
115
  </v-row>
@@ -19,43 +19,95 @@
19
19
 
20
20
  const visibility = computed({
21
21
  get: () => dataStyleStore.meshPolygonsVisibility(id.value),
22
- set: (newValue) => {
23
- dataStyleStore.setMeshPolygonsVisibility(id.value, newValue)
22
+ set: async (newValue) => {
23
+ await dataStyleStore.setMeshPolygonsVisibility(id.value, newValue)
24
24
  hybridViewerStore.remoteRender()
25
25
  },
26
26
  })
27
27
  const coloring_style_key = computed({
28
28
  get: () => dataStyleStore.meshPolygonsActiveColoring(id.value),
29
- set: (newValue) => {
30
- dataStyleStore.setMeshPolygonsActiveColoring(id.value, newValue)
29
+ set: async (newValue) => {
30
+ await dataStyleStore.setMeshPolygonsActiveColoring(id.value, newValue)
31
31
  hybridViewerStore.remoteRender()
32
32
  },
33
33
  })
34
34
  const color = computed({
35
35
  get: () => dataStyleStore.meshPolygonsColor(id.value),
36
- set: (newValue) => {
37
- dataStyleStore.setMeshPolygonsColor(id.value, newValue)
36
+ set: async (newValue) => {
37
+ await dataStyleStore.setMeshPolygonsColor(id.value, newValue)
38
38
  hybridViewerStore.remoteRender()
39
39
  },
40
40
  })
41
41
  const textures = computed({
42
42
  get: () => dataStyleStore.meshPolygonsTextures(id.value),
43
- set: (newValue) => {
44
- dataStyleStore.setMeshPolygonsTextures(id.value, newValue)
43
+ set: async (newValue) => {
44
+ await dataStyleStore.setMeshPolygonsTextures(id.value, newValue)
45
45
  hybridViewerStore.remoteRender()
46
46
  },
47
47
  })
48
- const vertex_attribute = computed({
49
- get: () => dataStyleStore.meshPolygonsVertexAttribute(id.value),
50
- set: (newValue) => {
51
- dataStyleStore.setMeshPolygonsVertexAttribute(id.value, newValue)
48
+ const vertex_attribute_name = computed({
49
+ get: () => dataStyleStore.meshPolygonsVertexAttributeName(id.value),
50
+ set: async (newValue) => {
51
+ await dataStyleStore.setMeshPolygonsVertexAttributeName(
52
+ id.value,
53
+ newValue,
54
+ )
55
+ await dataStyleStore.updateMeshPolygonsVertexAttribute(id.value)
52
56
  hybridViewerStore.remoteRender()
53
57
  },
54
58
  })
55
- const polygon_attribute = computed({
56
- get: () => dataStyleStore.meshPolygonsPolygonAttribute(id.value),
57
- set: (newValue) => {
58
- dataStyleStore.setMeshPolygonsPolygonAttribute(id.value, newValue)
59
+ const vertex_attribute_range = computed({
60
+ get: () => dataStyleStore.meshPolygonsVertexAttributeRange(id.value),
61
+ set: async (newValue) => {
62
+ await dataStyleStore.setMeshPolygonsVertexAttributeRange(
63
+ id.value,
64
+ newValue[0],
65
+ newValue[1],
66
+ )
67
+ await dataStyleStore.updateMeshPolygonsVertexAttribute(id.value)
68
+ hybridViewerStore.remoteRender()
69
+ },
70
+ })
71
+ const vertex_attribute_color_map = computed({
72
+ get: () => dataStyleStore.meshPolygonsVertexAttributeColorMap(id.value),
73
+ set: async (newValue) => {
74
+ await dataStyleStore.setMeshPolygonsVertexAttributeColorMap(
75
+ id.value,
76
+ newValue,
77
+ )
78
+ hybridViewerStore.remoteRender()
79
+ },
80
+ })
81
+ const polygon_attribute_name = computed({
82
+ get: () => dataStyleStore.meshPolygonsPolygonAttributeName(id.value),
83
+ set: async (newValue) => {
84
+ await dataStyleStore.setMeshPolygonsPolygonAttributeName(
85
+ id.value,
86
+ newValue,
87
+ )
88
+ await dataStyleStore.updateMeshPolygonsPolygonAttribute(id.value)
89
+ hybridViewerStore.remoteRender()
90
+ },
91
+ })
92
+ const polygon_attribute_range = computed({
93
+ get: () => dataStyleStore.meshPolygonsPolygonAttributeRange(id.value),
94
+ set: async (newValue) => {
95
+ await dataStyleStore.setMeshPolygonsPolygonAttributeRange(
96
+ id.value,
97
+ newValue[0],
98
+ newValue[1],
99
+ )
100
+ await dataStyleStore.updateMeshPolygonsPolygonAttribute(id.value)
101
+ hybridViewerStore.remoteRender()
102
+ },
103
+ })
104
+ const polygon_attribute_color_map = computed({
105
+ get: () => dataStyleStore.meshPolygonsPolygonAttributeColorMap(id.value),
106
+ set: async (newValue) => {
107
+ await dataStyleStore.setMeshPolygonsPolygonAttributeColorMap(
108
+ id.value,
109
+ newValue,
110
+ )
59
111
  hybridViewerStore.remoteRender()
60
112
  },
61
113
  })
@@ -75,8 +127,12 @@
75
127
  v-model:coloring_style_key="coloring_style_key"
76
128
  v-model:color="color"
77
129
  v-model:textures="textures"
78
- v-model:vertex_attribute="vertex_attribute"
79
- v-model:polygon_attribute="polygon_attribute"
130
+ v-model:vertex_attribute_name="vertex_attribute_name"
131
+ v-model:vertex_attribute_range="vertex_attribute_range"
132
+ v-model:vertex_attribute_color_map="vertex_attribute_color_map"
133
+ v-model:polygon_attribute_name="polygon_attribute_name"
134
+ v-model:polygon_attribute_range="polygon_attribute_range"
135
+ v-model:polygon_attribute_color_map="polygon_attribute_color_map"
80
136
  />
81
137
  </template>
82
138
  </template>
@@ -19,41 +19,93 @@
19
19
 
20
20
  const visibility = computed({
21
21
  get: () => dataStyleStore.meshPolyhedraVisibility(id.value),
22
- set: (newValue) => {
23
- dataStyleStore.setMeshPolyhedraVisibility(id.value, newValue)
22
+ set: async (newValue) => {
23
+ await dataStyleStore.setMeshPolyhedraVisibility(id.value, newValue)
24
24
  hybridViewerStore.remoteRender()
25
25
  },
26
26
  })
27
27
  const coloring_style_key = computed({
28
28
  get: () => dataStyleStore.meshPolyhedraActiveColoring(id.value),
29
- set: (newValue) => {
30
- dataStyleStore.setMeshPolyhedraActiveColoring(id.value, newValue)
29
+ set: async (newValue) => {
30
+ await dataStyleStore.setMeshPolyhedraActiveColoring(id.value, newValue)
31
31
  hybridViewerStore.remoteRender()
32
32
  },
33
33
  })
34
34
  const color = computed({
35
35
  get: () => dataStyleStore.meshPolyhedraColor(id.value),
36
- set: (newValue) => {
37
- dataStyleStore.setMeshPolyhedraColor(id.value, newValue)
36
+ set: async (newValue) => {
37
+ await dataStyleStore.setMeshPolyhedraColor(id.value, newValue)
38
38
  hybridViewerStore.remoteRender()
39
39
  },
40
40
  })
41
- const vertex_attribute = computed({
42
- get: () => dataStyleStore.meshPolyhedraVertexAttribute(id.value),
43
- set: (newValue) => {
44
- dataStyleStore.setMeshPolyhedraVertexAttribute(id.value, newValue)
41
+ const vertex_attribute_name = computed({
42
+ get: () => dataStyleStore.meshPolyhedraVertexAttributeName(id.value),
43
+ set: async (newValue) => {
44
+ await dataStyleStore.setMeshPolyhedraVertexAttributeName(
45
+ id.value,
46
+ newValue,
47
+ )
48
+ await dataStyleStore.updateMeshPolyhedraVertexAttribute(id.value)
45
49
  hybridViewerStore.remoteRender()
46
50
  },
47
51
  })
48
- const polyhedron_attribute = computed({
49
- get: () => dataStyleStore.meshPolyhedraPolyhedronAttribute(id.value),
50
- set: (newValue) => {
51
- dataStyleStore.setMeshPolyhedraPolyhedronAttribute(id.value, newValue)
52
+ const vertex_attribute_range = computed({
53
+ get: () => dataStyleStore.meshPolyhedraVertexAttributeRange(id.value),
54
+ set: async (newValue) => {
55
+ await dataStyleStore.setMeshPolyhedraVertexAttributeRange(
56
+ id.value,
57
+ newValue[0],
58
+ newValue[1],
59
+ )
60
+ await dataStyleStore.updateMeshPolyhedraVertexAttribute(id.value)
61
+ hybridViewerStore.remoteRender()
62
+ },
63
+ })
64
+ const vertex_attribute_color_map = computed({
65
+ get: () => dataStyleStore.meshPolyhedraVertexAttributeColorMap(id.value),
66
+ set: async (newValue) => {
67
+ await dataStyleStore.setMeshPolyhedraVertexAttributeColorMap(
68
+ id.value,
69
+ newValue,
70
+ )
71
+ hybridViewerStore.remoteRender()
72
+ },
73
+ })
74
+ const polyhedron_attribute_name = computed({
75
+ get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeName(id.value),
76
+ set: async (newValue) => {
77
+ await dataStyleStore.setMeshPolyhedraPolyhedronAttributeName(
78
+ id.value,
79
+ newValue,
80
+ )
81
+ await dataStyleStore.updateMeshPolyhedraPolyhedronAttribute(id.value)
82
+ hybridViewerStore.remoteRender()
83
+ },
84
+ })
85
+ const polyhedron_attribute_range = computed({
86
+ get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeRange(id.value),
87
+ set: async (newValue) => {
88
+ await dataStyleStore.setMeshPolyhedraPolyhedronAttributeRange(
89
+ id.value,
90
+ newValue[0],
91
+ newValue[1],
92
+ )
93
+ await dataStyleStore.updateMeshPolyhedraPolyhedronAttribute(id.value)
94
+ hybridViewerStore.remoteRender()
95
+ },
96
+ })
97
+ const polyhedron_attribute_color_map = computed({
98
+ get: () =>
99
+ dataStyleStore.meshPolyhedraPolyhedronAttributeColorMap(id.value),
100
+ set: async (newValue) => {
101
+ await dataStyleStore.setMeshPolyhedraPolyhedronAttributeColorMap(
102
+ id.value,
103
+ newValue,
104
+ )
52
105
  hybridViewerStore.remoteRender()
53
106
  },
54
107
  })
55
108
  </script>
56
-
57
109
  <template>
58
110
  <ViewerContextMenuItem
59
111
  :itemProps="props.itemProps"
@@ -67,8 +119,14 @@
67
119
  :id="id"
68
120
  v-model:coloring_style_key="coloring_style_key"
69
121
  v-model:color="color"
70
- v-model:vertex_attribute="vertex_attribute"
71
- v-model:polyhedron_attribute="polyhedron_attribute"
122
+ v-model:vertex_attribute_name="vertex_attribute_name"
123
+ v-model:vertex_attribute_range="vertex_attribute_range"
124
+ v-model:vertex_attribute_color_map="vertex_attribute_color_map"
125
+ v-model:polyhedron_attribute_name="polyhedron_attribute_name"
126
+ v-model:polyhedron_attribute_range="polyhedron_attribute_range"
127
+ v-model:polyhedron_attribute_color_map="
128
+ polyhedron_attribute_color_map
129
+ "
72
130
  />
73
131
  </template>
74
132
  </template>