Skip to content

Commit 15c19f0

Browse files
committed
att vertex attribute
1 parent bce4ef8 commit 15c19f0

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

protocols/vtk.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ function createMethods (session) {
88
toggle_object_visibility: (params) => session.call('toggle_object_visibility', [params]),
99
toggle_edge_visibility: (params) => session.call('toggle_edge_visibility', [params]),
1010
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]),
1113
point_size: (params) => session.call('point_size', [params]),
1214
apply_textures: (params) => session.call('apply_textures', [params]),
1315
get_point_position: (params) => session.call('get_point_position', [params]),

stores/viewer.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,24 @@ export const use_viewer_store = defineStore('viewer', {
7070
.catch(console.error);
7171
}
7272
},
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+
},
7391
async apply_textures(params) {
7492
const websocket_store = use_websocket_store()
7593
if (websocket_store.client) {

0 commit comments

Comments
 (0)