fix bounding box update for model changes. add menu for it
This commit is contained in:
parent
fc1cc15bfe
commit
a6b85d4a59
4 changed files with 8 additions and 1 deletions
|
|
@ -191,6 +191,7 @@ function ui_build() {
|
|||
h.button({ _: 'analyze', disabled: true }),
|
||||
h.button({ _: 'repair', onclick: api.tool.repair }),
|
||||
h.div({ class: "vsep" }),
|
||||
h.button({ _: 'bounds', onclick() { api.selection.boundsBox({toggle:true}) } }),
|
||||
h.button({ _: 'gridlines', onclick() { api.grid() } }),
|
||||
h.button({ _: 'wireframe', onclick() { api.wireframe() } }),
|
||||
]),
|
||||
|
|
|
|||
|
|
@ -227,6 +227,11 @@ mesh.model = class MeshModel extends mesh.object {
|
|||
this.removed = 'complete';
|
||||
}
|
||||
}
|
||||
|
||||
updateBoundsBox() {
|
||||
mesh.util.defer(this.group.deferUBB);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ mesh.object = class MeshObject {
|
|||
|
||||
constructor(id) {
|
||||
this.id = id || mesh.util.uuid();
|
||||
this.deferUBB = () => { this.updateBoundsBox() };
|
||||
worker.object_create({id: this.id, type: this.type});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue