add delete/backspace to remove model. front view. no auto-select on add
This commit is contained in:
parent
d73cf48d90
commit
b4e9a8a87a
3 changed files with 24 additions and 7 deletions
|
|
@ -42,6 +42,13 @@ mesh.group = class MeshGroup extends mesh.object {
|
|||
|
||||
// @param model {MeshModel}
|
||||
remove(model) {
|
||||
// remove all models
|
||||
if (arguments.length === 0) {
|
||||
for (let m of this.models.slice()) {
|
||||
this.remove(m);
|
||||
}
|
||||
return;
|
||||
}
|
||||
model.group = undefined;
|
||||
this.models.remove(model);
|
||||
this.group.remove(model.mesh);
|
||||
|
|
|
|||
Loading…
Reference in a new issue