worker model load, remove, sync using cache

This commit is contained in:
Stewart Allen 2022-01-02 00:40:43 -05:00
commit b4966bbb6f
5 changed files with 54 additions and 26 deletions

View file

@ -53,6 +53,8 @@ mesh.group = class MeshGroup extends mesh.object {
model.group = undefined;
this.models.remove(model);
this.group.remove(model.mesh);
// trigger sync with worker
model.remove(true);
// auto-remove group when empty
if (this.group.children.length === 0) {
mesh.api.group.remove(this);