add grid lines toggling
This commit is contained in:
parent
70d2d9e613
commit
798bf1750d
4 changed files with 18 additions and 3 deletions
|
|
@ -267,6 +267,14 @@ let api = mesh.api = {
|
|||
));
|
||||
},
|
||||
|
||||
grid(state = {toggle:true}) {
|
||||
if (state.toggle) {
|
||||
space.platform.showGrid(!space.platform.isGridVisible());
|
||||
} else {
|
||||
space.platform.showGrid(state);
|
||||
}
|
||||
},
|
||||
|
||||
wireframe(state = {toggle:true}, opt = {opacity:0.15}) {
|
||||
for (let m of api.model.list()) {
|
||||
m.wireframe(state, opt);
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ function ui_build() {
|
|||
h.button({ _: 'analyze', disabled: true }),
|
||||
h.button({ _: 'repair', onclick: api.tool.repair }),
|
||||
h.div({ class: "vsep" }),
|
||||
h.button({ _: 'gridlines', onclick() { api.grid() } }),
|
||||
h.button({ _: 'wireframe', onclick() { api.wireframe() } }),
|
||||
]),
|
||||
]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue