@geode/opengeodeweb-front 0.0.24 → 1.0.0-rc.3
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/.github/workflows/CD.yml +5 -12
- package/.releaserc +12 -0
- package/components/CrsSelector.vue +3 -3
- package/components/Launcher.vue +2 -1
- package/components/Loading.vue +1 -1
- package/components/RemoteRenderingView.client.vue +15 -14
- package/components/ViewToolbar.vue +30 -0
- package/composables/api_fetch.js +1 -2
- package/package.json +12 -14
- package/protocols/vtk.js +8 -1
- package/stores/cloud.js +0 -1
- package/stores/viewer.js +62 -12
package/.github/workflows/CD.yml
CHANGED
|
@@ -8,16 +8,9 @@ jobs:
|
|
|
8
8
|
runs-on: ubuntu-latest
|
|
9
9
|
steps:
|
|
10
10
|
- uses: actions/checkout@v3
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
node-version: '16.x'
|
|
15
|
-
registry-url: 'https://registry.npmjs.org'
|
|
16
|
-
- run: npm ci
|
|
17
|
-
- run: |
|
|
18
|
-
git config --global user.email "contact@geode-solutions.com"
|
|
19
|
-
git config --global user.name "Geode-solutions"
|
|
20
|
-
- run: npm version patch
|
|
21
|
-
- run: npm publish --access public
|
|
11
|
+
- name: Semantic Release
|
|
12
|
+
uses: cycjimmy/semantic-release-action@v3
|
|
13
|
+
id: semantic
|
|
22
14
|
env:
|
|
23
|
-
|
|
15
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
16
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.releaserc
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
branches: [
|
|
3
|
+
{ name: "master" },
|
|
4
|
+
{ name: "next", channel: "next", prerelease: "rc" }
|
|
5
|
+
],
|
|
6
|
+
plugins: [
|
|
7
|
+
'@semantic-release/commit-analyzer',
|
|
8
|
+
'@semantic-release/release-notes-generator',
|
|
9
|
+
'@semantic-release/github',
|
|
10
|
+
'@semantic-release/npm'
|
|
11
|
+
]
|
|
12
|
+
}
|
|
@@ -29,12 +29,12 @@ watch(selected_crs, (new_value) => {
|
|
|
29
29
|
set_crs(crs)
|
|
30
30
|
})
|
|
31
31
|
|
|
32
|
-
function set_crs
|
|
32
|
+
function set_crs(crs_value) {
|
|
33
33
|
stepper_tree[variable_to_update] = crs_value
|
|
34
34
|
stepper_tree[variable_to_increment]++
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
function get_selected_crs
|
|
37
|
+
function get_selected_crs(crs_code) {
|
|
38
38
|
for (let i = 0; i <= crs_list.value.length; i++) {
|
|
39
39
|
if (crs_list.value[i]['code'] == crs_code) {
|
|
40
40
|
return crs_list.value[i]
|
|
@@ -42,7 +42,7 @@ function get_selected_crs (crs_code) {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
async function get_crs_table
|
|
45
|
+
async function get_crs_table() {
|
|
46
46
|
let params = new FormData()
|
|
47
47
|
params.append('geode_object', geode_object)
|
|
48
48
|
toggle_loading()
|
package/components/Launcher.vue
CHANGED
|
@@ -44,12 +44,13 @@ onMounted(() => {
|
|
|
44
44
|
}
|
|
45
45
|
})
|
|
46
46
|
|
|
47
|
-
async function submit_recaptcha
|
|
47
|
+
async function submit_recaptcha(token) {
|
|
48
48
|
try {
|
|
49
49
|
const response = await $fetch.raw(`/.netlify/functions/recaptcha?token=${token}`)
|
|
50
50
|
cloud_store.$patch({ is_captcha_validated: response.status == 200 })
|
|
51
51
|
recaptcha.reset()
|
|
52
52
|
} catch (error) {
|
|
53
|
+
console.error(error)
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
</script>
|
package/components/Loading.vue
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
We start our server only on demand... and this takes a few minutes before
|
|
13
13
|
you can use our free app.
|
|
14
14
|
<br>
|
|
15
|
-
This is aligned with
|
|
15
|
+
This is aligned with our energy sobriety policy. So be patient
|
|
16
16
|
<v-icon color="primary" size="20">
|
|
17
17
|
mdi-emoticon-excited-outline
|
|
18
18
|
</v-icon>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<div style="position: relative;">
|
|
3
|
+
<view-toolbar />
|
|
4
|
+
<v-col style="overflow: hidden; position: relative; z-index: 0; height: 100%; width: 100%" ref="viewer"
|
|
5
|
+
@click="get_x_y" @keydown.esc="app_store.toggle_picking_mode(false)">
|
|
6
|
+
</v-col>
|
|
7
|
+
</div>
|
|
5
8
|
</template>
|
|
6
9
|
|
|
7
10
|
<script setup>
|
|
@@ -10,8 +13,10 @@ import { useElementSize } from '@vueuse/core'
|
|
|
10
13
|
|
|
11
14
|
const viewer_store = use_viewer_store()
|
|
12
15
|
const { picking_mode } = storeToRefs(viewer_store)
|
|
16
|
+
const websocket_store = use_websocket_store()
|
|
17
|
+
const { client, is_client_created } = storeToRefs(websocket_store)
|
|
13
18
|
|
|
14
|
-
function get_x_y
|
|
19
|
+
function get_x_y(event) {
|
|
15
20
|
if (picking_mode.value === true) {
|
|
16
21
|
const { offsetX, offsetY } = event
|
|
17
22
|
viewer_store.set_picked_point(offsetX, offsetY)
|
|
@@ -19,14 +24,13 @@ function get_x_y (event) {
|
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
const props = defineProps({
|
|
22
|
-
viewId: { type: String, default: '-1' }
|
|
23
|
-
client: { type: Object, required: true }
|
|
27
|
+
viewId: { type: String, default: '-1' }
|
|
24
28
|
})
|
|
25
29
|
|
|
26
30
|
const viewer = ref(null)
|
|
27
31
|
const { width, height } = useElementSize(viewer)
|
|
28
32
|
|
|
29
|
-
function resize
|
|
33
|
+
function resize() {
|
|
30
34
|
view.getCanvasView().setSize(1, 1)
|
|
31
35
|
view.resize();
|
|
32
36
|
}
|
|
@@ -41,7 +45,7 @@ watch(width, value => {
|
|
|
41
45
|
watch(height, value => {
|
|
42
46
|
resize()
|
|
43
47
|
})
|
|
44
|
-
const {
|
|
48
|
+
const { viewId } = toRefs(props)
|
|
45
49
|
const connected = ref(false)
|
|
46
50
|
|
|
47
51
|
const view = vtkRemoteView.newInstance({ rpcWheelEvent: 'viewport.mouse.zoom.wheel' })
|
|
@@ -72,16 +76,13 @@ onMounted(async () => {
|
|
|
72
76
|
}
|
|
73
77
|
})
|
|
74
78
|
|
|
75
|
-
function connect
|
|
79
|
+
function connect() {
|
|
80
|
+
if (!is_client_created.value) { return }
|
|
81
|
+
console.log('connecting', client.value)
|
|
76
82
|
const session = client.value.getConnection().getSession()
|
|
77
83
|
view.setSession(session)
|
|
78
84
|
view.setViewId(viewId.value)
|
|
79
85
|
connected.value = true
|
|
80
86
|
view.render()
|
|
81
87
|
}
|
|
82
|
-
function handleClick (event) {
|
|
83
|
-
onClick(event)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
88
|
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-row dense :class="[$style.floatToolbar, 'flex-column']">
|
|
3
|
+
<v-col>
|
|
4
|
+
<v-tooltip location="left">
|
|
5
|
+
Reset camera
|
|
6
|
+
<template #activator="{ props }">
|
|
7
|
+
<v-btn @click.stop=reset_camera icon="mdi-crop-free" density="comfortable" v-bind="props" />
|
|
8
|
+
</template>
|
|
9
|
+
</v-tooltip>
|
|
10
|
+
</v-col>
|
|
11
|
+
</v-row>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
const viewer_store = use_viewer_store()
|
|
16
|
+
function reset_camera() {
|
|
17
|
+
viewer_store.reset_camera()
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style module>
|
|
22
|
+
.floatToolbar {
|
|
23
|
+
position: absolute;
|
|
24
|
+
z-index: 2;
|
|
25
|
+
right: 20px;
|
|
26
|
+
top: 20px;
|
|
27
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
28
|
+
border-radius: 16px;
|
|
29
|
+
}
|
|
30
|
+
</style>
|
package/composables/api_fetch.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function api_fetch (request_url, request_options, { request_error_function, response_function, response_error_function } = {}) {
|
|
2
2
|
const errors_store = use_errors_store()
|
|
3
3
|
const cloud_store = use_cloud_store()
|
|
4
|
-
|
|
5
4
|
return useFetch(request_url,
|
|
6
5
|
{
|
|
7
6
|
baseURL: cloud_store.geode_url,
|
package/package.json
CHANGED
|
@@ -1,29 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geode/opengeodeweb-front",
|
|
3
|
-
"private": false,
|
|
4
3
|
"scripts": {
|
|
5
|
-
"release:major": "npm version $(semver $npm_package_version -i major) && npm publish --tag latest",
|
|
6
|
-
"release:minor": "npm version $(semver $npm_package_version -i minor) && npm publish --tag latest",
|
|
7
|
-
"release:patch": "npm version $(semver $npm_package_version -i patch) && npm publish --tag latest",
|
|
8
|
-
"release:beta": "npm version $(semver $npm_package_version -i prerelease --preid $(npm whoami) ) && npm publish --tag rc",
|
|
9
4
|
"lint": "eslint --fix --ext .js,.vue --ignore-path .gitignore ."
|
|
10
5
|
},
|
|
11
6
|
"devDependencies": {
|
|
12
|
-
"nuxt": "^3.6.5",
|
|
13
7
|
"eslint": "^8.47.0",
|
|
14
8
|
"eslint-plugin-import": "^2.28.1",
|
|
15
9
|
"eslint-plugin-nuxt": "^4.0.0",
|
|
16
10
|
"eslint-plugin-prettier": "^5.0.0",
|
|
17
11
|
"eslint-plugin-prettier-vue": "^4.2.0",
|
|
18
12
|
"eslint-plugin-vue": "^9.17.0",
|
|
19
|
-
"eslint-plugin-vuetify": "^2.0.5"
|
|
13
|
+
"eslint-plugin-vuetify": "^2.0.5",
|
|
14
|
+
"nuxt": "^3.6.5"
|
|
20
15
|
},
|
|
21
16
|
"overrides": {
|
|
22
17
|
"vue": "latest"
|
|
23
18
|
},
|
|
24
19
|
"description": "OpenSource Vue/Vuetify framework for web applications",
|
|
25
20
|
"type": "module",
|
|
26
|
-
"version": "0.0.
|
|
21
|
+
"version": "1.0.0-rc.3",
|
|
27
22
|
"main": "./nuxt.config.js",
|
|
28
23
|
"dependencies": {
|
|
29
24
|
"@kitware/vtk.js": "^28.8.0",
|
|
@@ -44,14 +39,17 @@
|
|
|
44
39
|
"type": "git",
|
|
45
40
|
"url": "git+https://github.com/Geode-solutions/OpenGeodeWeb-Front.git"
|
|
46
41
|
},
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
"author": {
|
|
43
|
+
"name": "Geode-solutions",
|
|
44
|
+
"email": "contact@geode-solutions.com",
|
|
45
|
+
"url": "https://geode-solutions.com/"
|
|
46
|
+
},
|
|
52
47
|
"license": "MIT",
|
|
53
48
|
"bugs": {
|
|
54
49
|
"url": "https://github.com/Geode-solutions/OpenGeodeWeb-Front/issues"
|
|
55
50
|
},
|
|
56
|
-
"homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front
|
|
51
|
+
"homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
}
|
|
57
55
|
}
|
package/protocols/vtk.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
/* eslint-disable arrow-body-style */
|
|
2
|
-
|
|
2
|
+
function createMethods (session) {
|
|
3
3
|
return {
|
|
4
4
|
create_object_pipeline: (params) => session.call('create_object_pipeline', [params]),
|
|
5
5
|
create_visualization: () => session.call('create_visualization', []),
|
|
6
6
|
reset: () => session.call('reset'),
|
|
7
7
|
reset_camera: () => session.call('reset_camera', []),
|
|
8
8
|
toggle_object_visibility: (params) => session.call('toggle_object_visibility', [params]),
|
|
9
|
+
toggle_edge_visibility: (params) => session.call('toggle_edge_visibility', [params]),
|
|
10
|
+
toggle_point_visibility: (params) => session.call('toggle_point_visibility', [params]),
|
|
11
|
+
set_color: (params) => session.call('set_color', [params]),
|
|
12
|
+
set_vertex_attribute: (params) => session.call('set_vertex_attribute', [params]),
|
|
13
|
+
point_size: (params) => session.call('point_size', [params]),
|
|
9
14
|
apply_textures: (params) => session.call('apply_textures', [params]),
|
|
10
15
|
get_point_position: (params) => session.call('get_point_position', [params]),
|
|
11
16
|
update_data: (params) => session.call('update_data', [params])
|
|
12
17
|
};
|
|
13
18
|
}
|
|
19
|
+
|
|
20
|
+
export default createMethods
|
package/stores/cloud.js
CHANGED
package/stores/viewer.js
CHANGED
|
@@ -6,17 +6,17 @@ export const use_viewer_store = defineStore('viewer', {
|
|
|
6
6
|
picked_point: { x: null, y: null }
|
|
7
7
|
}),
|
|
8
8
|
actions: {
|
|
9
|
-
toggle_picking_mode
|
|
9
|
+
toggle_picking_mode(value) {
|
|
10
10
|
this.picking_mode = value
|
|
11
11
|
},
|
|
12
|
-
async set_picked_point
|
|
12
|
+
async set_picked_point(x, y) {
|
|
13
13
|
const response = await get_point_position({ x, y })
|
|
14
14
|
const { x: world_x, y: world_y } = response
|
|
15
15
|
this.picked_point.x = world_x
|
|
16
16
|
this.picked_point.y = world_y
|
|
17
17
|
this.picking_mode = false
|
|
18
18
|
},
|
|
19
|
-
async create_object_pipeline
|
|
19
|
+
async create_object_pipeline(params) {
|
|
20
20
|
const websocket_store = use_websocket_store()
|
|
21
21
|
if (websocket_store.client) {
|
|
22
22
|
use_websocket_store().client
|
|
@@ -25,7 +25,16 @@ export const use_viewer_store = defineStore('viewer', {
|
|
|
25
25
|
.catch(console.error);
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
async
|
|
28
|
+
async reset_camera() {
|
|
29
|
+
const websocket_store = use_websocket_store()
|
|
30
|
+
if (websocket_store.client) {
|
|
31
|
+
use_websocket_store().client
|
|
32
|
+
.getRemote()
|
|
33
|
+
.vtk.reset_camera()
|
|
34
|
+
.catch(console.error);
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
async toggle_object_visibility(params) {
|
|
29
38
|
const websocket_store = use_websocket_store()
|
|
30
39
|
if (websocket_store.client) {
|
|
31
40
|
use_websocket_store().client
|
|
@@ -34,7 +43,52 @@ export const use_viewer_store = defineStore('viewer', {
|
|
|
34
43
|
.catch(console.error);
|
|
35
44
|
}
|
|
36
45
|
},
|
|
37
|
-
async
|
|
46
|
+
async toggle_edge_visibility(params) {
|
|
47
|
+
const websocket_store = use_websocket_store()
|
|
48
|
+
if (websocket_store.client) {
|
|
49
|
+
use_websocket_store().client
|
|
50
|
+
.getRemote()
|
|
51
|
+
.vtk.toggle_edge_visibility(params)
|
|
52
|
+
.catch(console.error);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
async toggle_point_visibility(params) {
|
|
56
|
+
const websocket_store = use_websocket_store()
|
|
57
|
+
if (websocket_store.client) {
|
|
58
|
+
use_websocket_store().client
|
|
59
|
+
.getRemote()
|
|
60
|
+
.vtk.toggle_point_visibility(params)
|
|
61
|
+
.catch(console.error);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
async point_size(params) {
|
|
65
|
+
const websocket_store = use_websocket_store()
|
|
66
|
+
if (websocket_store.client) {
|
|
67
|
+
use_websocket_store().client
|
|
68
|
+
.getRemote()
|
|
69
|
+
.vtk.point_size(params)
|
|
70
|
+
.catch(console.error);
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
async set_color(params) {
|
|
74
|
+
const websocket_store = use_websocket_store()
|
|
75
|
+
if (websocket_store.client) {
|
|
76
|
+
use_websocket_store().client
|
|
77
|
+
.getRemote()
|
|
78
|
+
.vtk.set_color(params)
|
|
79
|
+
.catch(console.error);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
async set_vertex_attribute(params) {
|
|
83
|
+
const websocket_store = use_websocket_store()
|
|
84
|
+
if (websocket_store.client) {
|
|
85
|
+
use_websocket_store().client
|
|
86
|
+
.getRemote()
|
|
87
|
+
.vtk.set_vertex_attribute(params)
|
|
88
|
+
.catch(console.error);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
async apply_textures(params) {
|
|
38
92
|
const websocket_store = use_websocket_store()
|
|
39
93
|
if (websocket_store.client) {
|
|
40
94
|
websocket_store.$patch({ busy: true })
|
|
@@ -42,11 +96,10 @@ export const use_viewer_store = defineStore('viewer', {
|
|
|
42
96
|
.getRemote()
|
|
43
97
|
.vtk.apply_textures(params)
|
|
44
98
|
.catch(console.error);
|
|
45
|
-
|
|
46
99
|
websocket_store.$patch({ busy: false })
|
|
47
100
|
}
|
|
48
101
|
},
|
|
49
|
-
async get_point_position
|
|
102
|
+
async get_point_position(params) {
|
|
50
103
|
const websocket_store = use_websocket_store()
|
|
51
104
|
if (websocket_store.client) {
|
|
52
105
|
websocket_store.$patch({ busy: true })
|
|
@@ -54,12 +107,11 @@ export const use_viewer_store = defineStore('viewer', {
|
|
|
54
107
|
.getRemote()
|
|
55
108
|
.vtk.get_point_position(params)
|
|
56
109
|
.catch(console.error);
|
|
57
|
-
console.log('response', response)
|
|
58
110
|
websocket_store.$patch({ busy: false })
|
|
59
111
|
return response
|
|
60
112
|
}
|
|
61
113
|
},
|
|
62
|
-
async update_data
|
|
114
|
+
async update_data(params) {
|
|
63
115
|
const websocket_store = use_websocket_store()
|
|
64
116
|
if (websocket_store.client) {
|
|
65
117
|
websocket_store.$patch({ busy: true })
|
|
@@ -67,12 +119,11 @@ export const use_viewer_store = defineStore('viewer', {
|
|
|
67
119
|
.getRemote()
|
|
68
120
|
.vtk.update_data(params)
|
|
69
121
|
.catch(console.error);
|
|
70
|
-
console.log('response', response)
|
|
71
122
|
websocket_store.$patch({ busy: false })
|
|
72
123
|
return response
|
|
73
124
|
}
|
|
74
125
|
},
|
|
75
|
-
async reset
|
|
126
|
+
async reset() {
|
|
76
127
|
const websocket_store = use_websocket_store()
|
|
77
128
|
if (websocket_store.client) {
|
|
78
129
|
websocket_store.$patch({ busy: true })
|
|
@@ -80,7 +131,6 @@ export const use_viewer_store = defineStore('viewer', {
|
|
|
80
131
|
.getRemote()
|
|
81
132
|
.vtk.reset()
|
|
82
133
|
.catch(console.error);
|
|
83
|
-
console.log('response', response)
|
|
84
134
|
websocket_store.$patch({ busy: false })
|
|
85
135
|
return response
|
|
86
136
|
}
|