@geode/opengeodeweb-front 9.12.0 → 9.12.1-rc.1
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/components/Step.vue +10 -0
- package/components/Viewer/Generic/Mesh/EdgesOptions.vue +7 -6
- package/components/Viewer/Generic/Mesh/PointsOptions.vue +11 -10
- package/components/Viewer/Generic/Mesh/PolygonsOptions.vue +14 -14
- package/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +6 -6
- package/components/Viewer/PointSet/SpecificPointsOptions.vue +11 -10
- package/components/Viewer/Tree/ObjectTree.vue +1 -1
- package/composables/api_fetch.js +1 -3
- package/composables/viewer_call.js +1 -3
- package/internal_stores/data_style_state.js +2 -1
- package/internal_stores/mesh/edges.js +39 -36
- package/internal_stores/mesh/index.js +13 -8
- package/internal_stores/mesh/points.js +66 -79
- package/internal_stores/mesh/polygons.js +80 -88
- package/internal_stores/mesh/polyhedra.js +111 -99
- package/internal_stores/model/blocks.js +0 -2
- package/internal_stores/model/corners.js +0 -2
- package/internal_stores/model/lines.js +0 -2
- package/internal_stores/model/surfaces.js +0 -2
- package/package.json +2 -2
- package/stores/data_base.js +1 -3
- package/stores/data_style.js +7 -5
- package/stores/infra.js +4 -6
- package/stores/treeview.js +7 -0
- package/tests/integration/data/uploads/test.og_psf3d +0 -0
- package/tests/integration/data/uploads/test.og_rgd3d +0 -0
- package/tests/integration/microservices/back/requirements.txt +1 -1
- package/tests/integration/microservices/viewer/requirements.txt +1 -1
- package/tests/integration/setup.js +111 -0
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +77 -0
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +79 -0
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +78 -0
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +78 -0
- package/tests/integration/utils.js +35 -0
- package/tests/unit/utils/validate_schema.nuxt.test.js +1 -2
- package/tests/vitest.config.js +1 -0
- package/utils/local.js +42 -43
- package/tests/integration/data/fake_id/edged_curve.vtp +0 -20
- package/tests/integration/stores/DataStyle/mesh/Edges.nuxt.test.js +0 -215
|
@@ -2,105 +2,75 @@ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schem
|
|
|
2
2
|
const mesh_polygons_schemas = viewer_schemas.opengeodeweb_viewer.mesh.polygons
|
|
3
3
|
|
|
4
4
|
export function useMeshPolygonsStyle() {
|
|
5
|
-
/** State **/
|
|
6
5
|
const dataStyleStore = useDataStyleStore()
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return dataStyleStore.styles[id].polygons.visibility
|
|
11
|
-
}
|
|
12
|
-
function polygonsActiveColoring(id) {
|
|
13
|
-
return dataStyleStore.styles[id].polygons.coloring.active
|
|
14
|
-
}
|
|
15
|
-
function polygonsColor(id) {
|
|
16
|
-
return dataStyleStore.styles[id].polygons.coloring.color
|
|
17
|
-
}
|
|
18
|
-
function polygonsTextures(id) {
|
|
19
|
-
return dataStyleStore.styles[id].polygons.coloring.textures
|
|
20
|
-
}
|
|
21
|
-
function polygonsPolygonAttribute(id) {
|
|
22
|
-
return dataStyleStore.styles[id].polygons.coloring.polygon
|
|
23
|
-
}
|
|
24
|
-
function polygonsVertexAttribute(id) {
|
|
25
|
-
return dataStyleStore.styles[id].polygons.coloring.vertex
|
|
7
|
+
function meshPolygonsStyle(id) {
|
|
8
|
+
return dataStyleStore.getStyle(id).polygons
|
|
26
9
|
}
|
|
27
10
|
|
|
28
|
-
|
|
29
|
-
|
|
11
|
+
function meshPolygonsVisibility(id) {
|
|
12
|
+
return meshPolygonsStyle(id).visibility
|
|
13
|
+
}
|
|
14
|
+
function setMeshPolygonsVisibility(id, visibility) {
|
|
15
|
+
const polygons_style = meshPolygonsStyle(id)
|
|
30
16
|
return viewer_call(
|
|
31
|
-
{
|
|
32
|
-
schema: mesh_polygons_schemas.visibility,
|
|
33
|
-
params: { id, visibility },
|
|
34
|
-
},
|
|
17
|
+
{ schema: mesh_polygons_schemas.visibility, params: { id, visibility } },
|
|
35
18
|
{
|
|
36
19
|
response_function: () => {
|
|
37
|
-
|
|
20
|
+
polygons_style.visibility = visibility
|
|
38
21
|
console.log(
|
|
39
|
-
|
|
40
|
-
dataStyleStore.styles[id].polygons.visibility,
|
|
22
|
+
`${setMeshPolygonsVisibility.name} ${id} ${meshPolygonsVisibility(id)}`,
|
|
41
23
|
)
|
|
42
24
|
},
|
|
43
25
|
},
|
|
44
26
|
)
|
|
45
27
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
setPolygonsColor(id, dataStyleStore.styles[id].polygons.coloring.color)
|
|
50
|
-
} else if (type == "textures") {
|
|
51
|
-
const textures = dataStyleStore.styles[id].polygons.coloring.textures
|
|
52
|
-
if (textures !== null) setPolygonsTextures(id, textures)
|
|
53
|
-
} else if (type == "vertex") {
|
|
54
|
-
const vertex = dataStyleStore.styles[id].polygons.coloring.vertex
|
|
55
|
-
if (vertex !== null) {
|
|
56
|
-
console.log("vertex", vertex)
|
|
57
|
-
setPolygonsVertexAttribute(id, vertex)
|
|
58
|
-
}
|
|
59
|
-
} else if (type == "polygon") {
|
|
60
|
-
const polygon = dataStyleStore.styles[id].polygons.coloring.polygon
|
|
61
|
-
if (polygon !== null) setPolygonsPolygonAttribute(id, polygon)
|
|
62
|
-
} else throw new Error("Unknown polygons coloring type: " + type)
|
|
63
|
-
dataStyleStore.styles[id].polygons.coloring.active = type
|
|
64
|
-
console.log(
|
|
65
|
-
"setPolygonsActiveColoring",
|
|
66
|
-
dataStyleStore.styles[id].polygons.coloring.active,
|
|
67
|
-
)
|
|
28
|
+
|
|
29
|
+
function meshPolygonsColor(id) {
|
|
30
|
+
return meshPolygonsStyle(id).coloring.color
|
|
68
31
|
}
|
|
69
|
-
function
|
|
32
|
+
function setMeshPolygonsColor(id, color) {
|
|
33
|
+
const coloring_style = meshPolygonsStyle(id).coloring
|
|
70
34
|
return viewer_call(
|
|
71
|
-
{
|
|
72
|
-
schema: mesh_polygons_schemas.color,
|
|
73
|
-
params: { id, color },
|
|
74
|
-
},
|
|
35
|
+
{ schema: mesh_polygons_schemas.color, params: { id, color } },
|
|
75
36
|
{
|
|
76
37
|
response_function: () => {
|
|
77
|
-
|
|
38
|
+
coloring_style.color = color
|
|
78
39
|
console.log(
|
|
79
|
-
|
|
80
|
-
dataStyleStore.styles[id].polygons.coloring.color,
|
|
40
|
+
`${setMeshPolygonsColor.name} ${id} ${JSON.stringify(meshPolygonsColor(id))}`,
|
|
81
41
|
)
|
|
82
42
|
},
|
|
83
43
|
},
|
|
84
44
|
)
|
|
85
45
|
}
|
|
86
|
-
|
|
46
|
+
|
|
47
|
+
function meshPolygonsTextures(id) {
|
|
48
|
+
return meshPolygonsStyle(id).coloring.textures
|
|
49
|
+
}
|
|
50
|
+
function setMeshPolygonsTextures(id, textures) {
|
|
51
|
+
const coloring_style = meshPolygonsStyle(id).coloring
|
|
87
52
|
return viewer_call(
|
|
88
53
|
{
|
|
89
|
-
schema:
|
|
54
|
+
schema: mesh_polygons_schemas.apply_textures,
|
|
90
55
|
params: { id, textures },
|
|
91
56
|
},
|
|
92
57
|
{
|
|
93
58
|
response_function: () => {
|
|
94
|
-
|
|
59
|
+
coloring_style.textures = textures
|
|
95
60
|
console.log(
|
|
96
|
-
|
|
97
|
-
dataStyleStore.styles[id].polygons.coloring.textures,
|
|
61
|
+
`${setMeshPolygonsTextures.name} ${id} ${meshPolygonsTextures(id)}`,
|
|
98
62
|
)
|
|
99
63
|
},
|
|
100
64
|
},
|
|
101
65
|
)
|
|
102
66
|
}
|
|
103
|
-
|
|
67
|
+
|
|
68
|
+
function meshPolygonsVertexAttribute(id) {
|
|
69
|
+
return meshPolygonsStyle(id).coloring.vertex
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function setMeshPolygonsVertexAttribute(id, vertex_attribute) {
|
|
73
|
+
const coloring_style = meshPolygonsStyle(id).coloring
|
|
104
74
|
return viewer_call(
|
|
105
75
|
{
|
|
106
76
|
schema: mesh_polygons_schemas.vertex_attribute,
|
|
@@ -108,16 +78,20 @@ export function useMeshPolygonsStyle() {
|
|
|
108
78
|
},
|
|
109
79
|
{
|
|
110
80
|
response_function: () => {
|
|
111
|
-
|
|
81
|
+
coloring_style.vertex = vertex_attribute
|
|
112
82
|
console.log(
|
|
113
|
-
|
|
114
|
-
dataStyleStore.styles[id].polygons.coloring.vertex,
|
|
83
|
+
`${setMeshPolygonsVertexAttribute.name} ${id} ${meshPolygonsVertexAttribute(id)}`,
|
|
115
84
|
)
|
|
116
85
|
},
|
|
117
86
|
},
|
|
118
87
|
)
|
|
119
88
|
}
|
|
120
|
-
|
|
89
|
+
|
|
90
|
+
function meshPolygonsPolygonAttribute(id) {
|
|
91
|
+
return meshPolygonsStyle(id).coloring.polygon
|
|
92
|
+
}
|
|
93
|
+
function setMeshPolygonsPolygonAttribute(id, polygon_attribute) {
|
|
94
|
+
const coloring_style = meshPolygonsStyle(id).coloring
|
|
121
95
|
return viewer_call(
|
|
122
96
|
{
|
|
123
97
|
schema: mesh_polygons_schemas.polygon_attribute,
|
|
@@ -125,37 +99,55 @@ export function useMeshPolygonsStyle() {
|
|
|
125
99
|
},
|
|
126
100
|
{
|
|
127
101
|
response_function: () => {
|
|
128
|
-
|
|
129
|
-
polygon_attribute
|
|
102
|
+
coloring_style.polygon = polygon_attribute
|
|
130
103
|
console.log(
|
|
131
|
-
|
|
132
|
-
dataStyleStore.styles[id].polygons.coloring.polygon,
|
|
104
|
+
`${setMeshPolygonsPolygonAttribute.name} ${id} ${meshPolygonsPolygonAttribute(id)}`,
|
|
133
105
|
)
|
|
134
106
|
},
|
|
135
107
|
},
|
|
136
108
|
)
|
|
137
109
|
}
|
|
138
110
|
|
|
139
|
-
function
|
|
111
|
+
function meshPolygonsActiveColoring(id) {
|
|
112
|
+
return meshPolygonsStyle(id).coloring.active
|
|
113
|
+
}
|
|
114
|
+
function setMeshPolygonsActiveColoring(id, type) {
|
|
115
|
+
const coloring = meshPolygonsStyle(id).coloring
|
|
116
|
+
coloring.active = type
|
|
117
|
+
console.log(
|
|
118
|
+
`${setMeshPolygonsActiveColoring.name} ${id} ${meshPolygonsActiveColoring(id)}`,
|
|
119
|
+
)
|
|
120
|
+
if (type === "color") {
|
|
121
|
+
return setMeshPolygonsColor(id, coloring.color)
|
|
122
|
+
} else if (type === "textures" && coloring.textures !== null) {
|
|
123
|
+
return setMeshPolygonsTextures(id, coloring.textures)
|
|
124
|
+
} else if (type === "vertex" && coloring.vertex !== null) {
|
|
125
|
+
return setMeshPolygonsVertexAttribute(id, coloring.vertex)
|
|
126
|
+
} else if (type === "polygon" && coloring.polygon !== null) {
|
|
127
|
+
return setMeshPolygonsPolygonAttribute(id, coloring.polygon)
|
|
128
|
+
} else throw new Error("Unknown polygons coloring type: " + type)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function applyMeshPolygonsStyle(id, style) {
|
|
140
132
|
return Promise.all([
|
|
141
|
-
|
|
142
|
-
|
|
133
|
+
setMeshPolygonsVisibility(id, style.visibility),
|
|
134
|
+
setMeshPolygonsActiveColoring(id, style.coloring.active),
|
|
143
135
|
])
|
|
144
136
|
}
|
|
145
137
|
|
|
146
138
|
return {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
139
|
+
meshPolygonsVisibility,
|
|
140
|
+
meshPolygonsActiveColoring,
|
|
141
|
+
meshPolygonsColor,
|
|
142
|
+
meshPolygonsTextures,
|
|
143
|
+
meshPolygonsPolygonAttribute,
|
|
144
|
+
meshPolygonsVertexAttribute,
|
|
145
|
+
setMeshPolygonsVisibility,
|
|
146
|
+
setMeshPolygonsActiveColoring,
|
|
147
|
+
setMeshPolygonsColor,
|
|
148
|
+
setMeshPolygonsTextures,
|
|
149
|
+
setMeshPolygonsVertexAttribute,
|
|
150
|
+
setMeshPolygonsPolygonAttribute,
|
|
151
|
+
applyMeshPolygonsStyle,
|
|
160
152
|
}
|
|
161
153
|
}
|
|
@@ -1,138 +1,150 @@
|
|
|
1
|
+
// Third party imports
|
|
1
2
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
2
3
|
const mesh_polyhedra_schemas = viewer_schemas.opengeodeweb_viewer.mesh.polyhedra
|
|
3
4
|
|
|
4
5
|
export function useMeshPolyhedraStyle() {
|
|
5
|
-
/** State **/
|
|
6
6
|
const dataStyleStore = useDataStyleStore()
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return dataStyleStore.styles[id].polyhedra.visibility
|
|
11
|
-
}
|
|
12
|
-
function polyhedraActiveColoring(id) {
|
|
13
|
-
return dataStyleStore.styles[id].polyhedra.coloring.active
|
|
14
|
-
}
|
|
15
|
-
function polyhedraColor(id) {
|
|
16
|
-
return dataStyleStore.styles[id].polyhedra.coloring.color
|
|
17
|
-
}
|
|
18
|
-
function polyhedraVertexAttribute(id) {
|
|
19
|
-
return dataStyleStore.styles[id].polyhedra.coloring.vertex
|
|
20
|
-
}
|
|
21
|
-
function polyhedraPolygonAttribute(id) {
|
|
22
|
-
return dataStyleStore.styles[id].polyhedra.coloring.polygon
|
|
23
|
-
}
|
|
24
|
-
function polyhedraPolyhedronAttribute(id) {
|
|
25
|
-
return dataStyleStore.styles[id].polyhedra.coloring.polyhedron
|
|
8
|
+
function meshPolyhedraStyle(id) {
|
|
9
|
+
return dataStyleStore.getStyle(id).polyhedra
|
|
26
10
|
}
|
|
27
11
|
|
|
28
|
-
|
|
29
|
-
|
|
12
|
+
function meshPolyhedraVisibility(id) {
|
|
13
|
+
return meshPolyhedraStyle(id).visibility
|
|
14
|
+
}
|
|
15
|
+
function setMeshPolyhedraVisibility(id, visibility) {
|
|
16
|
+
const polyhedra_style = meshPolyhedraStyle(id)
|
|
30
17
|
return viewer_call(
|
|
31
|
-
{
|
|
32
|
-
schema: mesh_polyhedra_schemas.visibility,
|
|
33
|
-
params: { id, visibility },
|
|
34
|
-
},
|
|
18
|
+
{ schema: mesh_polyhedra_schemas.visibility, params: { id, visibility } },
|
|
35
19
|
{
|
|
36
20
|
response_function: () => {
|
|
37
|
-
|
|
21
|
+
polyhedra_style.visibility = visibility
|
|
38
22
|
console.log(
|
|
39
|
-
|
|
40
|
-
dataStyleStore.styles[id].polyhedra.visibility,
|
|
23
|
+
`${setMeshPolyhedraVisibility.name} ${id} ${meshPolyhedraVisibility(id)}`,
|
|
41
24
|
)
|
|
42
25
|
},
|
|
43
26
|
},
|
|
44
27
|
)
|
|
45
28
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
setPolyhedraColor(id, dataStyleStore.styles[id].polyhedra.coloring.color)
|
|
49
|
-
else if (type == "vertex") {
|
|
50
|
-
const vertex = dataStyleStore.styles[id].polyhedra.coloring.vertex
|
|
51
|
-
if (vertex !== null) setPolyhedraVertexAttribute(id, vertex)
|
|
52
|
-
} else if (type == "polyhedron") {
|
|
53
|
-
const polyhedron = dataStyleStore.styles[id].polyhedra.coloring.polyhedron
|
|
54
|
-
if (polyhedron !== null) setPolyhedraPolyhedronAttribute(id, polyhedron)
|
|
55
|
-
} else throw new Error("Unknown polyhedra coloring type: " + type)
|
|
56
|
-
dataStyleStore.styles[id].polyhedra.coloring.active = type
|
|
57
|
-
console.log(
|
|
58
|
-
"setPolyhedraActiveColoring",
|
|
59
|
-
dataStyleStore.styles[id].polyhedra.coloring.active,
|
|
60
|
-
)
|
|
29
|
+
function meshPolyhedraActiveColoring(id) {
|
|
30
|
+
return meshPolyhedraStyle(id).coloring.active
|
|
61
31
|
}
|
|
62
|
-
function
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
response_function: () => {
|
|
70
|
-
dataStyleStore.styles[id].polyhedra.coloring.color = color
|
|
71
|
-
console.log(
|
|
72
|
-
"setPolyhedraColor",
|
|
73
|
-
dataStyleStore.styles[id].polyhedra.coloring.color,
|
|
74
|
-
)
|
|
75
|
-
},
|
|
76
|
-
},
|
|
32
|
+
function setMeshPolyhedraActiveColoring(id, type) {
|
|
33
|
+
const coloring = meshPolyhedraStyle(id).coloring
|
|
34
|
+
coloring.active = type
|
|
35
|
+
console.log(
|
|
36
|
+
`${setMeshPolyhedraActiveColoring.name} ${id} ${meshPolyhedraActiveColoring(id)}`,
|
|
77
37
|
)
|
|
38
|
+
if (type === "color") {
|
|
39
|
+
return setMeshPolyhedraColor(id, coloring.color)
|
|
40
|
+
// } else if (type === "vertex" && coloring.vertex !== null) {
|
|
41
|
+
// return setPolyhedraVertexAttribute(id, coloring.vertex)
|
|
42
|
+
// } else if (type === "polyhedron" && coloring.polyhedron !== null) {
|
|
43
|
+
// return setPolyhedraPolyhedronAttribute(id, coloring.polyhedron)
|
|
44
|
+
} else throw new Error("Unknown mesh polyhedra coloring type: " + type)
|
|
78
45
|
}
|
|
79
46
|
|
|
80
|
-
function
|
|
81
|
-
return
|
|
82
|
-
{
|
|
83
|
-
schema: mesh_polyhedra_schemas.vertex_attribute,
|
|
84
|
-
params: { id, ...vertex_attribute },
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
response_function: () => {
|
|
88
|
-
dataStyleStore.styles[id].polyhedra.coloring.vertex = vertex_attribute
|
|
89
|
-
console.log(
|
|
90
|
-
"setPolyhedraVertexAttribute",
|
|
91
|
-
dataStyleStore.styles[id].polyhedra.coloring.vertex,
|
|
92
|
-
)
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
)
|
|
47
|
+
function meshPolyhedraColor(id) {
|
|
48
|
+
return meshPolyhedraStyle(id).coloring.color
|
|
96
49
|
}
|
|
97
|
-
|
|
98
|
-
|
|
50
|
+
function setMeshPolyhedraColor(id, color) {
|
|
51
|
+
const coloring = meshPolyhedraStyle(id).coloring
|
|
99
52
|
return viewer_call(
|
|
100
|
-
{
|
|
101
|
-
schema: mesh_polyhedra_schemas.polyhedron_attribute,
|
|
102
|
-
params: { id, ...polyhedron_attribute },
|
|
103
|
-
},
|
|
53
|
+
{ schema: mesh_polyhedra_schemas.color, params: { id, color } },
|
|
104
54
|
{
|
|
105
55
|
response_function: () => {
|
|
106
|
-
|
|
107
|
-
polyhedron_attribute
|
|
56
|
+
coloring.color = color
|
|
108
57
|
console.log(
|
|
109
|
-
|
|
110
|
-
dataStyleStore.styles[id].polyhedra.coloring.polyhedron,
|
|
58
|
+
`${setMeshPolyhedraColor.name} ${id} ${JSON.stringify(meshPolyhedraColor(id))}`,
|
|
111
59
|
)
|
|
112
60
|
},
|
|
113
61
|
},
|
|
114
62
|
)
|
|
115
63
|
}
|
|
116
64
|
|
|
117
|
-
function
|
|
65
|
+
// function polyhedraVertexAttribute(id) {
|
|
66
|
+
// return meshPolyhedraStyle(id).coloring.vertex
|
|
67
|
+
// }
|
|
68
|
+
// function setPolyhedraVertexAttribute(id, vertex_attribute) {
|
|
69
|
+
// const coloring_style = meshPolyhedraStyle(id).coloring
|
|
70
|
+
// return viewer_call(
|
|
71
|
+
// {
|
|
72
|
+
// schema: mesh_polyhedra_schemas.vertex_attribute,
|
|
73
|
+
// params: { id, ...vertex_attribute },
|
|
74
|
+
// },
|
|
75
|
+
// {
|
|
76
|
+
// response_function: () => {
|
|
77
|
+
// coloring_style.vertex = vertex_attribute
|
|
78
|
+
// console.log(
|
|
79
|
+
// `${setPolyhedraVertexAttribute.name} ${polyhedraVertexAttribute(id)}`,
|
|
80
|
+
// )
|
|
81
|
+
// },
|
|
82
|
+
// },
|
|
83
|
+
// )
|
|
84
|
+
// }
|
|
85
|
+
|
|
86
|
+
// function polyhedraPolygonAttribute(id) {
|
|
87
|
+
// return meshPolyhedraStyle(id).coloring.polygon
|
|
88
|
+
// }
|
|
89
|
+
// function setPolyhedraPolygonAttribute(id, polygon_attribute) {
|
|
90
|
+
// const coloring_style = meshPolyhedraStyle(id).coloring
|
|
91
|
+
// return viewer_call(
|
|
92
|
+
// {
|
|
93
|
+
// schema: mesh_polyhedra_schemas.polygon_attribute,
|
|
94
|
+
// params: { id, ...polygon_attribute },
|
|
95
|
+
// },
|
|
96
|
+
// {
|
|
97
|
+
// response_function: () => {
|
|
98
|
+
// coloring_style.polygon = polygon_attribute
|
|
99
|
+
// console.log(
|
|
100
|
+
// `${setPolyhedraPolygonAttribute.name} ${polyhedraPolygonAttribute(id)}`,
|
|
101
|
+
// )
|
|
102
|
+
// },
|
|
103
|
+
// },
|
|
104
|
+
// )
|
|
105
|
+
// }
|
|
106
|
+
|
|
107
|
+
// function polyhedraPolyhedronAttribute(id) {
|
|
108
|
+
// return meshPolyhedraStyle(id).coloring.polyhedron
|
|
109
|
+
// }
|
|
110
|
+
// function setPolyhedraPolyhedronAttribute(id, polyhedron_attribute) {
|
|
111
|
+
// const coloring = meshPolyhedraStyle(id).coloring
|
|
112
|
+
// return viewer_call(
|
|
113
|
+
// {
|
|
114
|
+
// schema: mesh_polyhedra_schemas.polyhedron_attribute,
|
|
115
|
+
// params: { id, ...polyhedron_attribute },
|
|
116
|
+
// },
|
|
117
|
+
// {
|
|
118
|
+
// response_function: () => {
|
|
119
|
+
// coloring.polyhedron = polyhedron_attribute
|
|
120
|
+
// console.log(
|
|
121
|
+
// `${setPolyhedraPolyhedronAttribute.name} ${polyhedraPolyhedronAttribute(id)}`,
|
|
122
|
+
// )
|
|
123
|
+
// },
|
|
124
|
+
// },
|
|
125
|
+
// )
|
|
126
|
+
// }
|
|
127
|
+
|
|
128
|
+
function applyMeshPolyhedraStyle(id, style) {
|
|
118
129
|
return Promise.all([
|
|
119
|
-
|
|
120
|
-
|
|
130
|
+
setMeshPolyhedraVisibility(id, style.visibility),
|
|
131
|
+
setMeshPolyhedraActiveColoring(id, style.coloring.active),
|
|
121
132
|
])
|
|
122
133
|
}
|
|
123
134
|
|
|
124
135
|
return {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
polyhedraVertexAttribute,
|
|
129
|
-
|
|
130
|
-
polyhedraPolyhedronAttribute,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
applyMeshPolyhedraStyle,
|
|
137
|
+
meshPolyhedraActiveColoring,
|
|
138
|
+
meshPolyhedraColor,
|
|
139
|
+
// polyhedraVertexAttribute,
|
|
140
|
+
meshPolyhedraVisibility,
|
|
141
|
+
// polyhedraPolyhedronAttribute,
|
|
142
|
+
// polyhedraPolygonAttribute,
|
|
143
|
+
setMeshPolyhedraActiveColoring,
|
|
144
|
+
setMeshPolyhedraColor,
|
|
145
|
+
// setPolyhedraPolyhedronAttribute,
|
|
146
|
+
// setPolyhedraPolygonAttribute,
|
|
147
|
+
// setPolyhedraVertexAttribute,
|
|
148
|
+
setMeshPolyhedraVisibility,
|
|
137
149
|
}
|
|
138
150
|
}
|
package/package.json
CHANGED
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"overrides": {
|
|
39
39
|
"vue": "latest"
|
|
40
40
|
},
|
|
41
|
-
"description": "OpenSource Vue/Vuetify framework for web applications",
|
|
41
|
+
"description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
|
|
42
42
|
"type": "module",
|
|
43
|
-
"version": "9.12.
|
|
43
|
+
"version": "9.12.1-rc.1",
|
|
44
44
|
"main": "./nuxt.config.js",
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@geode/opengeodeweb-back": "latest",
|
package/stores/data_base.js
CHANGED
|
@@ -5,10 +5,8 @@ export const useDataBaseStore = defineStore("dataBase", () => {
|
|
|
5
5
|
const treeview_store = useTreeviewStore()
|
|
6
6
|
const hybridViewerStore = useHybridViewerStore()
|
|
7
7
|
|
|
8
|
-
/** State **/
|
|
9
8
|
const db = reactive({})
|
|
10
9
|
|
|
11
|
-
/** Getters **/
|
|
12
10
|
function itemMetaDatas(id) {
|
|
13
11
|
return db[id]
|
|
14
12
|
}
|
|
@@ -41,13 +39,13 @@ export const useDataBaseStore = defineStore("dataBase", () => {
|
|
|
41
39
|
return null
|
|
42
40
|
}
|
|
43
41
|
|
|
44
|
-
/** Actions **/
|
|
45
42
|
async function registerObject(id) {
|
|
46
43
|
return viewer_call({
|
|
47
44
|
schema: viewer_schemas.opengeodeweb_viewer.generic.register,
|
|
48
45
|
params: { id },
|
|
49
46
|
})
|
|
50
47
|
}
|
|
48
|
+
|
|
51
49
|
async function addItem(
|
|
52
50
|
id,
|
|
53
51
|
value = {
|
package/stores/data_style.js
CHANGED
|
@@ -12,14 +12,16 @@ export const useDataStyleStore = defineStore("dataStyle", () => {
|
|
|
12
12
|
/** Actions **/
|
|
13
13
|
function addDataStyle(id, geode_object, object_type) {
|
|
14
14
|
dataStyleState.styles[id] = getDefaultStyle(geode_object)
|
|
15
|
+
const promise_array = []
|
|
15
16
|
if (object_type === "mesh") {
|
|
16
|
-
|
|
17
|
+
promise_array.push(meshStyleStore.applyMeshDefaultStyle(id))
|
|
17
18
|
} else if (object_type === "model") {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
promise_array.push(modelStyleStore.setMeshComponentsDefaultStyle(id))
|
|
20
|
+
promise_array.push(modelStyleStore.applyModelDefaultStyle(id))
|
|
21
|
+
} else {
|
|
22
|
+
throw new Error("Unknown object type")
|
|
22
23
|
}
|
|
24
|
+
return Promise.all(promise_array)
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
function setVisibility(id, visibility) {
|
package/stores/infra.js
CHANGED
|
@@ -50,13 +50,11 @@ export const useInfraStore = defineStore("infra", {
|
|
|
50
50
|
if (this.app_mode == appMode.appMode.DESKTOP) {
|
|
51
51
|
const viewer_store = useViewerStore()
|
|
52
52
|
const geode_store = useGeodeStore()
|
|
53
|
-
const back_port = await
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
const [back_port, viewer_port] = await Promise.all([
|
|
54
|
+
window.electronAPI.run_back(),
|
|
55
|
+
window.electronAPI.run_viewer(),
|
|
56
|
+
])
|
|
56
57
|
geode_store.$patch({ default_local_port: back_port })
|
|
57
|
-
const viewer_port = await window.electronAPI.run_viewer(
|
|
58
|
-
viewer_store.default_local_port,
|
|
59
|
-
)
|
|
60
58
|
viewer_store.$patch({ default_local_port: viewer_port })
|
|
61
59
|
} else if (this.app_mode == appMode.appMode.CLOUD) {
|
|
62
60
|
const { data, error } = await useFetch(this.lambda_url, {
|
package/stores/treeview.js
CHANGED
|
@@ -15,9 +15,16 @@ export const useTreeviewStore = defineStore("treeview", () => {
|
|
|
15
15
|
function addItem(geodeObject, displayed_name, id, object_type) {
|
|
16
16
|
dataStyleStore.addDataStyle(id, geodeObject, object_type)
|
|
17
17
|
const child = { title: displayed_name, id, object_type }
|
|
18
|
+
|
|
18
19
|
for (let i = 0; i < items.value.length; i++) {
|
|
19
20
|
if (items.value[i].title === geodeObject) {
|
|
20
21
|
items.value[i].children.push(child)
|
|
22
|
+
items.value[i].children.sort((a, b) =>
|
|
23
|
+
a.title.localeCompare(b.title, undefined, {
|
|
24
|
+
numeric: true,
|
|
25
|
+
sensitivity: "base",
|
|
26
|
+
}),
|
|
27
|
+
)
|
|
21
28
|
selection.value.push(child)
|
|
22
29
|
return
|
|
23
30
|
}
|
|
Binary file
|
|
Binary file
|