@geode/opengeodeweb-front 9.9.0 → 9.10.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.
Files changed (85) hide show
  1. package/assets/viewer_svgs/edged_curve_edges.svg +67 -0
  2. package/assets/viewer_svgs/edged_curve_points.svg +95 -0
  3. package/assets/viewer_svgs/grid_2d_cells.svg +78 -0
  4. package/assets/viewer_svgs/grid_2d_edges.svg +71 -0
  5. package/assets/viewer_svgs/grid_2d_points.svg +108 -0
  6. package/assets/viewer_svgs/grid_3d_cells.svg +76 -0
  7. package/assets/viewer_svgs/grid_3d_edges.svg +72 -0
  8. package/assets/viewer_svgs/grid_3d_facets.svg +102 -0
  9. package/assets/viewer_svgs/grid_3d_points.svg +172 -0
  10. package/assets/viewer_svgs/point_set_points.svg +86 -0
  11. package/assets/viewer_svgs/solid_edges.svg +96 -0
  12. package/assets/viewer_svgs/solid_facets.svg +119 -0
  13. package/assets/viewer_svgs/solid_points.svg +134 -0
  14. package/assets/viewer_svgs/solid_polyhedra.svg +103 -0
  15. package/assets/viewer_svgs/surface_edges.svg +73 -0
  16. package/assets/viewer_svgs/surface_points.svg +115 -0
  17. package/assets/viewer_svgs/surface_triangles.svg +92 -0
  18. package/components/ContextMenu.vue +123 -0
  19. package/components/ContextMenuItem.vue +90 -0
  20. package/components/HybridRenderingView.vue +41 -0
  21. package/components/VeaseViewToolbar.vue +107 -0
  22. package/components/Viewer/BreadCrumb.vue +61 -0
  23. package/components/Viewer/EdgedCurve/EdgesOptions.vue +14 -0
  24. package/components/Viewer/EdgedCurve/PointsOptions.vue +14 -0
  25. package/components/Viewer/Generic/Mesh/EdgesOptions.vue +48 -0
  26. package/components/Viewer/Generic/Mesh/PointsOptions.vue +73 -0
  27. package/components/Viewer/Generic/Mesh/PolygonsOptions.vue +65 -0
  28. package/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +58 -0
  29. package/components/Viewer/Generic/Model/EdgesOptions.vue +29 -0
  30. package/components/Viewer/Generic/Model/PointsOptions.vue +53 -0
  31. package/components/Viewer/Grid/2D/CellsOptions.vue +15 -0
  32. package/components/Viewer/Grid/2D/EdgesOptions.vue +14 -0
  33. package/components/Viewer/Grid/2D/PointsOptions.vue +14 -0
  34. package/components/Viewer/Grid/3D/CellsOptions.vue +15 -0
  35. package/components/Viewer/Grid/3D/EdgesOptions.vue +14 -0
  36. package/components/Viewer/Grid/3D/FacetsOptions.vue +15 -0
  37. package/components/Viewer/Grid/3D/PointsOptions.vue +14 -0
  38. package/components/Viewer/HybridSolid/EdgesOptions.vue +14 -0
  39. package/components/Viewer/HybridSolid/PointsOptions.vue +14 -0
  40. package/components/Viewer/HybridSolid/PolygonsOptions.vue +14 -0
  41. package/components/Viewer/HybridSolid/PolyhedraOptions.vue +14 -0
  42. package/components/Viewer/Options/ColorPicker.vue +25 -0
  43. package/components/Viewer/Options/ColoringTypeSelector.vue +125 -0
  44. package/components/Viewer/Options/PolygonAttributeSelector.vue +59 -0
  45. package/components/Viewer/Options/PolyhedronAttributeSelector.vue +63 -0
  46. package/components/Viewer/Options/TextureItem.vue +116 -0
  47. package/components/Viewer/Options/TexturesSelector.vue +67 -0
  48. package/components/Viewer/Options/VertexAttributeSelector.vue +60 -0
  49. package/components/Viewer/Options/VisibilitySwitch.vue +14 -0
  50. package/components/Viewer/PointSet/PointsOptions.vue +14 -0
  51. package/components/Viewer/PointSet/SpecificPointsOptions.vue +74 -0
  52. package/components/Viewer/PolygonalSurface/EdgesOptions.vue +14 -0
  53. package/components/Viewer/PolygonalSurface/PointsOptions.vue +14 -0
  54. package/components/Viewer/PolygonalSurface/PolygonsOptions.vue +14 -0
  55. package/components/Viewer/Solid/EdgesOptions.vue +14 -0
  56. package/components/Viewer/Solid/PointsOptions.vue +14 -0
  57. package/components/Viewer/Solid/PolygonsOptions.vue +14 -0
  58. package/components/Viewer/Solid/PolyhedraOptions.vue +14 -0
  59. package/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +15 -0
  60. package/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +15 -0
  61. package/components/Viewer/Tree/ObjectTree.vue +170 -0
  62. package/components/Viewer/TreeComponent.vue +93 -0
  63. package/components/Viewer/TreeObject.vue +100 -0
  64. package/components/Viewer/TriangulatedSurface/EdgesOptions.vue +14 -0
  65. package/components/Viewer/TriangulatedSurface/PointsOptions.vue +14 -0
  66. package/components/Viewer/TriangulatedSurface/TrianglesOptions.vue +15 -0
  67. package/internal_stores/data_style_state.js +18 -0
  68. package/internal_stores/mesh/edges.js +106 -0
  69. package/internal_stores/mesh/index.js +50 -0
  70. package/internal_stores/mesh/points.js +131 -0
  71. package/internal_stores/mesh/polygons.js +159 -0
  72. package/internal_stores/mesh/polyhedra.js +136 -0
  73. package/internal_stores/model/blocks.js +60 -0
  74. package/internal_stores/model/corners.js +63 -0
  75. package/internal_stores/model/edges.js +47 -0
  76. package/internal_stores/model/index.js +154 -0
  77. package/internal_stores/model/lines.js +81 -0
  78. package/internal_stores/model/points.js +61 -0
  79. package/internal_stores/model/surfaces.js +60 -0
  80. package/package.json +1 -1
  81. package/stores/data_base.js +148 -0
  82. package/stores/data_style.js +57 -0
  83. package/stores/hybrid_viewer.js +193 -0
  84. package/stores/menu.js +182 -0
  85. package/stores/treeview.js +64 -0
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <template class="menu-item" :style="itemStyle">
3
+ <v-tooltip
4
+ :location="props.itemProps.tooltip_location"
5
+ :origin="props.itemProps.tooltip_origin"
6
+ >
7
+ <template v-slot:activator="{ props }">
8
+ <v-btn
9
+ icon
10
+ :active="display_options"
11
+ @click.stop="toggleOptions"
12
+ v-bind="props"
13
+ >
14
+ <v-img :src="btn_image" height="35" width="35" />
15
+ </v-btn>
16
+ </template>
17
+ <span>{{ props.tooltip }}</span>
18
+ </v-tooltip>
19
+ <div v-if="display_options" class="menu-options pa-0" @click.stop>
20
+ <v-card
21
+ @click.stop
22
+ :title="props.tooltip"
23
+ class="bg-primary"
24
+ width="320"
25
+ max-height="500"
26
+ :ripple="false"
27
+ >
28
+ <v-card-text class="bg-primary">
29
+ <slot name="options" />
30
+ </v-card-text>
31
+ </v-card>
32
+ </div>
33
+ </template>
34
+ </template>
35
+
36
+ <script setup>
37
+ const props = defineProps({
38
+ itemProps: { type: Object, required: true },
39
+ tooltip: { type: String, required: true },
40
+ btn_image: { type: String, required: true },
41
+ })
42
+
43
+ const display_options = ref(false)
44
+
45
+ function toggleOptions() {
46
+ display_options.value = !display_options.value
47
+ }
48
+ </script>
49
+
50
+ <style scoped>
51
+ .menu-item {
52
+ position: absolute;
53
+ display: flex;
54
+ flex-direction: column;
55
+ align-items: center;
56
+ justify-content: center;
57
+ cursor: pointer;
58
+ transition:
59
+ transform 0.3s ease,
60
+ opacity 0.3s ease;
61
+ }
62
+
63
+ .menu-options {
64
+ position: absolute;
65
+ top: 50%;
66
+ left: 430%;
67
+ transform: translateX(-50%);
68
+ display: flex;
69
+ flex-direction: column;
70
+ background-color: white;
71
+ border: 1px solid #ccc;
72
+ border-radius: 8px;
73
+ z-index: 10;
74
+ box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
75
+ min-width: 150px;
76
+ max-width: 320px;
77
+ padding: 8px 0;
78
+ overflow: hidden;
79
+ }
80
+
81
+ .menu-options ::v-deep(v-list-item) {
82
+ padding: 10px 16px;
83
+ white-space: nowrap; /* Empêche les retours à la ligne */
84
+ }
85
+
86
+ .menu-options ::v-deep(v-list-item:hover) {
87
+ background-color: #f5f5f5;
88
+ cursor: pointer;
89
+ }
90
+ </style>
@@ -0,0 +1,41 @@
1
+ <template>
2
+ <ClientOnly>
3
+ <div style="position: relative; width: 100%; height: calc(100vh - 75px)">
4
+ <VeaseViewToolbar />
5
+ <slot name="ui"></slot>
6
+ <v-col
7
+ ref="viewer"
8
+ style="
9
+ overflow: hidden;
10
+ position: relative;
11
+ z-index: 0;
12
+ height: 100%;
13
+ width: 100%;
14
+ "
15
+ class="pa-0"
16
+ @click="get_x_y"
17
+ @keydown.esc="viewer_store.toggle_picking_mode(false)"
18
+ />
19
+ </div>
20
+ </ClientOnly>
21
+ </template>
22
+
23
+ <script setup>
24
+ const container = useTemplateRef("viewer")
25
+ const hybridViewerStore = useHybridViewerStore()
26
+
27
+ const { windowWidth, windowHeight } = useWindowSize()
28
+ const { width, height } = useElementSize(container)
29
+
30
+ watch([windowWidth, windowHeight, height, width], () => {
31
+ hybridViewerStore.resize(width.value, height.value)
32
+ })
33
+
34
+ onMounted(async () => {
35
+ if (import.meta.client) {
36
+ await hybridViewerStore.initHybridViewer()
37
+ await nextTick()
38
+ hybridViewerStore.setContainer(container)
39
+ }
40
+ })
41
+ </script>
@@ -0,0 +1,107 @@
1
+ <template>
2
+ <v-container :class="[$style.floatToolbar, 'pa-0']" width="auto">
3
+ <v-row
4
+ v-for="camera_option in camera_options"
5
+ :key="camera_option.icon"
6
+ dense
7
+ >
8
+ <v-col>
9
+ <v-btn
10
+ density="comfortable"
11
+ icon
12
+ @click.stop="camera_option.action"
13
+ v-tooltip:left="camera_option.tooltip"
14
+ >
15
+ <v-icon :icon="camera_option.icon" size="32" />
16
+ </v-btn>
17
+ </v-col>
18
+ </v-row>
19
+ </v-container>
20
+ <Screenshot :show_dialog="take_screenshot" @close="take_screenshot = false" />
21
+ <ZScaling
22
+ v-if="showZScaling"
23
+ v-model="zScale"
24
+ :width="400"
25
+ @close="handleZScalingClose"
26
+ />
27
+ </template>
28
+
29
+ <script setup>
30
+ import schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
31
+
32
+ const hybridViewerStore = useHybridViewerStore()
33
+ const take_screenshot = ref(false)
34
+ const showZScaling = ref(false)
35
+ const grid_scale = ref(false)
36
+ const zScale = ref(hybridViewerStore.zScale)
37
+
38
+ watch(
39
+ () => hybridViewerStore.zScale,
40
+ (newVal) => {
41
+ zScale.value = newVal
42
+ },
43
+ )
44
+
45
+ const handleZScalingClose = async () => {
46
+ await hybridViewerStore.setZScaling(zScale.value)
47
+ showZScaling.value = false
48
+ }
49
+
50
+ const camera_options = [
51
+ {
52
+ tooltip: "Reset camera",
53
+ icon: "mdi-cube-scan",
54
+ action: () => {
55
+ const { genericRenderWindow } = storeToRefs(hybridViewerStore)
56
+ const renderWindow = genericRenderWindow.value.value.getRenderWindow()
57
+ const renderer = renderWindow.getRenderers()[0]
58
+ renderer.resetCamera()
59
+ renderWindow.render()
60
+ hybridViewerStore.syncRemoteCamera()
61
+ },
62
+ },
63
+ {
64
+ tooltip: "Take a screenshot",
65
+ icon: "mdi-camera",
66
+ action: () => {
67
+ take_screenshot.value = !take_screenshot.value
68
+ },
69
+ },
70
+ {
71
+ tooltip: "Toggle grid scale",
72
+ icon: "mdi-ruler-square",
73
+ action: () => {
74
+ viewer_call(
75
+ {
76
+ schema: schemas.opengeodeweb_viewer.viewer.grid_scale,
77
+ params: {
78
+ visibility: !grid_scale.value,
79
+ },
80
+ },
81
+ {
82
+ response_function: () => {
83
+ grid_scale.value = !grid_scale.value
84
+ },
85
+ },
86
+ )
87
+ },
88
+ },
89
+ {
90
+ tooltip: "Z Scaling Control",
91
+ icon: "mdi-sort",
92
+ action: () => {
93
+ showZScaling.value = !showZScaling.value
94
+ },
95
+ },
96
+ ]
97
+ </script>
98
+
99
+ <style module>
100
+ .floatToolbar {
101
+ position: absolute;
102
+ z-index: 2;
103
+ right: 20px;
104
+ top: 20px;
105
+ background-color: rgba(0, 0, 0, 0);
106
+ }
107
+ </style>
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <v-breadcrumbs class="mb-n10 breadcrumb-container">
3
+ <div class="d-flex align-center gap-2 ml-2 mt-2 mb-1">
4
+ <v-menu v-if="treeviewStore.isAdditionnalTreeDisplayed" offset-y>
5
+ <template v-slot:activator="{ props }">
6
+ <v-btn
7
+ icon
8
+ variant="text"
9
+ size="medium"
10
+ v-bind="props"
11
+ @click="goBackToFileTree"
12
+ >
13
+ <v-icon size="large">mdi-file-tree</v-icon>
14
+ </v-btn>
15
+ <span class="text-h5 font-weight-bold">/</span>
16
+ <v-icon size="x-large">
17
+ {{
18
+ selectedTree && selectedTree.icon
19
+ ? selectedTree.icon
20
+ : "mdi-shape-outline"
21
+ }}
22
+ </v-icon>
23
+ <span class="text-subtitle-1 font-weight-regular align-center mt-1">
24
+ Model Explorer ({{ metaDatas.displayed_name }})
25
+ </span>
26
+ </template>
27
+ </v-menu>
28
+
29
+ <div v-else class="d-flex align-center gap-2">
30
+ <v-icon size="large">mdi-file-tree</v-icon>
31
+ <span class="text-subtitle-1 font-weight-regular align-center mt-1">
32
+ Objects
33
+ </span>
34
+ </div>
35
+ </div>
36
+ </v-breadcrumbs>
37
+ </template>
38
+
39
+ <script setup>
40
+ const treeviewStore = use_treeview_store()
41
+
42
+ const selectedTree = computed(() => treeviewStore.selectedTree)
43
+
44
+ const goBackToFileTree = () => {
45
+ treeviewStore.displayFileTree()
46
+ }
47
+
48
+ const model_id = computed(() => treeviewStore.model_id)
49
+
50
+ const metaDatas = computed(() =>
51
+ useDataBaseStore().itemMetaDatas(model_id.value),
52
+ )
53
+ </script>
54
+
55
+ <style scoped>
56
+ .breadcrumb-container {
57
+ max-width: 100%;
58
+ overflow: hidden;
59
+ white-space: nowrap;
60
+ }
61
+ </style>
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <ViewerGenericMeshEdgesOptions
3
+ :itemProps="props.itemProps"
4
+ :btn_image="EdgedCurveEdges"
5
+ />
6
+ </template>
7
+
8
+ <script setup>
9
+ import EdgedCurveEdges from "@ogw_f/assets/viewer_svgs/edged_curve_edges.svg"
10
+
11
+ const props = defineProps({
12
+ itemProps: { type: Object, required: true },
13
+ })
14
+ </script>
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <ViewerGenericMeshPointsOptions
3
+ :itemProps="props.itemProps"
4
+ :btn_image="EdgedCurvePoints"
5
+ />
6
+ </template>
7
+
8
+ <script setup>
9
+ import EdgedCurvePoints from "@ogw_f/assets/viewer_svgs/edged_curve_points.svg"
10
+
11
+ const props = defineProps({
12
+ itemProps: { type: Object, required: true },
13
+ })
14
+ </script>
@@ -0,0 +1,48 @@
1
+ <template>
2
+ <ContextMenuItem
3
+ :itemProps="props.itemProps"
4
+ tooltip="Edges options"
5
+ :btn_image="props.btn_image"
6
+ >
7
+ <template #options>
8
+ <ViewerOptionsVisibilitySwitch v-model="visibility" />
9
+ <template v-if="visibility">
10
+ <ViewerOptionsColoringTypeSelector
11
+ :id="id"
12
+ v-model:coloring_style_key="coloring_style_key"
13
+ v-model:color="color"
14
+ />
15
+ </template>
16
+ </template>
17
+ </ContextMenuItem>
18
+ </template>
19
+
20
+ <script setup>
21
+ const props = defineProps({
22
+ itemProps: { type: Object, required: true },
23
+ btn_image: { type: String, required: true },
24
+ })
25
+
26
+ const id = toRef(() => props.itemProps.id)
27
+
28
+ const dataStyleStore = useDataStyleStore()
29
+
30
+ const visibility = computed({
31
+ get: () => dataStyleStore.edgesVisibility(id.value),
32
+ set: (newValue) => dataStyleStore.setEdgesVisibility(id.value, newValue),
33
+ })
34
+ const size = computed({
35
+ get: () => dataStyleStore.edgesSize(id.value),
36
+ set: (newValue) => dataStyleStore.setEdgesSize(id.value, newValue),
37
+ })
38
+ const coloring_style_key = computed({
39
+ get: () => dataStyleStore.edgesActiveColoring(id.value),
40
+ set: (newValue) => {
41
+ dataStyleStore.setEdgesActiveColoring(id.value, newValue)
42
+ },
43
+ })
44
+ const color = computed({
45
+ get: () => dataStyleStore.edgesColor(id.value),
46
+ set: (newValue) => dataStyleStore.setEdgesColor(id.value, newValue),
47
+ })
48
+ </script>
@@ -0,0 +1,73 @@
1
+ <template>
2
+ <ViewerContextMenuItem
3
+ :itemProps="props.itemProps"
4
+ tooltip="Points options"
5
+ :btn_image="props.btn_image"
6
+ >
7
+ <template #options>
8
+ <ViewerOptionsVisibilitySwitch v-model="visibility" />
9
+ <template v-if="visibility">
10
+ <v-row class="pa-0" align="center">
11
+ <v-divider />
12
+ <v-col cols="auto" justify="center">
13
+ <v-icon size="30" icon="mdi-ruler" v-tooltip:left="'Size'" />
14
+ </v-col>
15
+ <v-col justify="center">
16
+ <v-slider
17
+ v-model="size"
18
+ hide-details
19
+ min="0"
20
+ max="20"
21
+ step="2"
22
+ thumb-color="black"
23
+ ticks
24
+ />
25
+ </v-col>
26
+ </v-row>
27
+ <v-row>
28
+ <v-col>
29
+ <ViewerOptionsColoringTypeSelector
30
+ :id="id"
31
+ v-model:coloring_style_key="coloring_style_key"
32
+ v-model:color="color"
33
+ />
34
+ </v-col>
35
+ </v-row>
36
+ </template>
37
+ </template>
38
+ </ViewerContextMenuItem>
39
+ </template>
40
+
41
+ <script setup>
42
+ const dataStyleStore = useDataStyleStore()
43
+
44
+ const props = defineProps({
45
+ itemProps: { type: Object, required: true },
46
+ btn_image: { type: String, required: true },
47
+ })
48
+
49
+ const id = toRef(() => props.itemProps.id)
50
+
51
+ const visibility = computed({
52
+ get: () => dataStyleStore.pointsVisibility(id.value),
53
+ set: (newValue) => dataStyleStore.setPointsVisibility(id.value, newValue),
54
+ })
55
+ const size = computed({
56
+ get: () => dataStyleStore.pointsSize(id.value),
57
+ set: (newValue) => dataStyleStore.setPointsSize(id.value, newValue),
58
+ })
59
+ const coloring_style_key = computed({
60
+ get: () => dataStyleStore.pointsActiveColoring(id.value),
61
+ set: (newValue) =>
62
+ dataStyleStore.setPointsActiveColoring(id.value, newValue),
63
+ })
64
+ const color = computed({
65
+ get: () => dataStyleStore.pointsColor(id.value),
66
+ set: (newValue) => dataStyleStore.setPointsColor(id.value, newValue),
67
+ })
68
+ const vertex_attribute = computed({
69
+ get: () => dataStyleStore.pointsVertexAttribute(id.value),
70
+ set: (newValue) =>
71
+ dataStyleStore.setPointsVertexAttribute(id.value, newValue),
72
+ })
73
+ </script>
@@ -0,0 +1,65 @@
1
+ <template>
2
+ <ContextMenuItem
3
+ :itemProps="props.itemProps"
4
+ :tooltip="props.tooltip"
5
+ :btn_image="props.btn_image"
6
+ >
7
+ <template #options>
8
+ <ViewerOptionsVisibilitySwitch v-model="visibility" />
9
+ <template v-if="visibility">
10
+ <ViewerOptionsColoringTypeSelector
11
+ :id="id"
12
+ v-model:coloring_style_key="coloring_style_key"
13
+ v-model:color="color"
14
+ v-model:textures="textures"
15
+ v-model:vertex_attribute="vertex_attribute"
16
+ v-model:polygon_attribute="polygon_attribute"
17
+ />
18
+ </template>
19
+ </template>
20
+ </ContextMenuItem>
21
+ </template>
22
+
23
+ <script setup>
24
+ const dataStyleStore = useDataStyleStore()
25
+
26
+ const props = defineProps({
27
+ itemProps: { type: Object, required: true },
28
+ btn_image: { type: String, required: true },
29
+ tooltip: { type: String, required: false, default: "Polygons options" },
30
+ })
31
+
32
+ const id = toRef(() => props.itemProps.id)
33
+
34
+ const visibility = computed({
35
+ get: () => dataStyleStore.polygonsVisibility(id.value),
36
+ set: (newValue) => dataStyleStore.setPolygonsVisibility(id.value, newValue),
37
+ })
38
+ const coloring_style_key = computed({
39
+ get: () => dataStyleStore.polygonsActiveColoring(id.value),
40
+ set: (newValue) =>
41
+ dataStyleStore.setPolygonsActiveColoring(id.value, newValue),
42
+ })
43
+ const color = computed({
44
+ get: () => dataStyleStore.polygonsColor(id.value),
45
+ set: (newValue) => dataStyleStore.setPolygonsColor(id.value, newValue),
46
+ })
47
+ const textures = computed({
48
+ get: () => dataStyleStore.polygonsTextures(id.value),
49
+ set: (newValue) => dataStyleStore.setPolygonsTextures(id.value, newValue),
50
+ })
51
+ const vertex_attribute = computed({
52
+ get: () => dataStyleStore.polygonsVertexAttribute(id.value),
53
+ set: (newValue) => {
54
+ console.log("setPolygonsVertexAttribute", id.value, newValue)
55
+ dataStyleStore.setPolygonsVertexAttribute(id.value, newValue)
56
+ },
57
+ })
58
+ const polygon_attribute = computed({
59
+ get: () => dataStyleStore.polygonsPolygonAttribute(id.value),
60
+ set: (newValue) => {
61
+ console.log("setPolygonsPolygonAttribute", id.value, newValue)
62
+ dataStyleStore.setPolygonsPolygonAttribute(id.value, newValue)
63
+ },
64
+ })
65
+ </script>
@@ -0,0 +1,58 @@
1
+ <template>
2
+ <ContextMenuItem
3
+ :itemProps="props.itemProps"
4
+ :tooltip="props.tooltip"
5
+ :btn_image="props.btn_image"
6
+ >
7
+ <template #options>
8
+ <ViewerOptionsVisibilitySwitch v-model="visibility" />
9
+
10
+ <template v-if="visibility">
11
+ <ViewerOptionsColoringTypeSelector
12
+ :id="id"
13
+ v-model:coloring_style_key="coloring_style_key"
14
+ v-model:color="color"
15
+ v-model:vertex_attribute="vertex_attribute"
16
+ v-model:polyhedron_attribute="polyhedron_attribute"
17
+ />
18
+ </template>
19
+ </template>
20
+ </ContextMenuItem>
21
+ </template>
22
+
23
+ <script setup>
24
+ const dataStyleStore = useDataStyleStore()
25
+
26
+ const props = defineProps({
27
+ itemProps: { type: Object, required: true },
28
+ btn_image: { type: String, required: true },
29
+ tooltip: { type: String, required: false, default: "Polyhedra options" },
30
+ })
31
+
32
+ const id = toRef(() => props.itemProps.id)
33
+
34
+ const visibility = computed({
35
+ get: () => dataStyleStore.polyhedraVisibility(id.value),
36
+ set: (newValue) =>
37
+ dataStyleStore.setPolyhedraVisibility(id.value, newValue),
38
+ })
39
+ const coloring_style_key = computed({
40
+ get: () => dataStyleStore.polyhedraActiveColoring(id.value),
41
+ set: (newValue) =>
42
+ dataStyleStore.setPolyhedraActiveColoring(id.value, newValue),
43
+ })
44
+ const color = computed({
45
+ get: () => dataStyleStore.polyhedraColor(id.value),
46
+ set: (newValue) => dataStyleStore.setPolyhedraColor(id.value, newValue),
47
+ })
48
+ const vertex_attribute = computed({
49
+ get: () => dataStyleStore.polyhedraVertexAttribute(id.value),
50
+ set: (newValue) =>
51
+ dataStyleStore.setPolyhedraVertexAttribute(id.value, newValue),
52
+ })
53
+ const polyhedron_attribute = computed({
54
+ get: () => dataStyleStore.polyhedraPolyhedronAttribute(id.value),
55
+ set: (newValue) =>
56
+ dataStyleStore.setPolyhedraPolyhedronAttribute(id.value, newValue),
57
+ })
58
+ </script>
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <ContextMenuItem
3
+ :itemProps="itemProps"
4
+ tooltip="Edges options"
5
+ :btn_image="SurfaceEdges"
6
+ >
7
+ <template #options>
8
+ <ViewerOptionsVisibilitySwitch v-model="visibility" />
9
+ </template>
10
+ </ContextMenuItem>
11
+ </template>
12
+
13
+ <script setup>
14
+ import SurfaceEdges from "@ogw_f/assets/viewer_svgs/surface_edges.svg"
15
+
16
+ const props = defineProps({
17
+ itemProps: { type: Object, required: true },
18
+ btn_image: { type: String, required: true },
19
+ })
20
+
21
+ const id = toRef(() => props.itemProps.id)
22
+ const dataStyleStore = useDataStyleStore()
23
+
24
+ const visibility = computed({
25
+ get: () => dataStyleStore.modelEdgesVisibility(id.value),
26
+ set: (newValue) =>
27
+ dataStyleStore.setModelEdgesVisibility(id.value, newValue),
28
+ })
29
+ </script>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <ContextMenuItem
3
+ :itemProps="props.itemProps"
4
+ tooltip="Points options"
5
+ :btn_image="SurfacePoints"
6
+ >
7
+ <template #options>
8
+ <ViewerOptionsVisibilitySwitch v-model="visibility" />
9
+ <template v-if="visibility">
10
+ <v-row class="pa-0" align="center">
11
+ <v-divider />
12
+ <v-col cols="auto" justify="center">
13
+ <v-icon size="30" icon="mdi-ruler" v-tooltip:left="'Size'" />
14
+ </v-col>
15
+ <v-col justify="center">
16
+ <v-slider
17
+ v-model="size"
18
+ hide-details
19
+ min="0"
20
+ max="20"
21
+ step="2"
22
+ thumb-color="black"
23
+ ticks
24
+ />
25
+ </v-col>
26
+ </v-row>
27
+ </template>
28
+ </template>
29
+ </ContextMenuItem>
30
+ </template>
31
+
32
+ <script setup>
33
+ import SurfacePoints from "@ogw_f/assets/viewer_svgs/surface_points.svg"
34
+
35
+ const dataStyleStore = useDataStyleStore()
36
+
37
+ const props = defineProps({
38
+ itemProps: { type: Object, required: true },
39
+ btn_image: { type: String, required: true },
40
+ })
41
+
42
+ const id = toRef(() => props.itemProps.id)
43
+
44
+ const visibility = computed({
45
+ get: () => dataStyleStore.modelPointsVisibility(id.value),
46
+ set: (newValue) =>
47
+ dataStyleStore.setModelPointsVisibility(id.value, newValue),
48
+ })
49
+ const size = computed({
50
+ get: () => dataStyleStore.modelPointsSize(id.value),
51
+ set: (newValue) => dataStyleStore.setModelPointsSize(id.value, newValue),
52
+ })
53
+ </script>
@@ -0,0 +1,15 @@
1
+ <template>
2
+ <ViewerGenericMeshPolygonsOptions
3
+ :itemProps="props.itemProps"
4
+ :btn_image="Grid2D_Cells"
5
+ tooltip="Cells options"
6
+ />
7
+ </template>
8
+
9
+ <script setup>
10
+ import Grid2D_Cells from "@ogw_f/assets/viewer_svgs/grid_2d_cells.svg"
11
+
12
+ const props = defineProps({
13
+ itemProps: { type: Object, required: true },
14
+ })
15
+ </script>
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <ViewerGenericMeshEdgesOptions
3
+ :itemProps="props.itemProps"
4
+ :btn_image="Grid2D_Edges"
5
+ />
6
+ </template>
7
+
8
+ <script setup>
9
+ import Grid2D_Edges from "@ogw_f/assets/viewer_svgs/grid_2d_edges.svg"
10
+
11
+ const props = defineProps({
12
+ itemProps: { type: Object, required: true },
13
+ })
14
+ </script>