persist object scale / rotation / position

This commit is contained in:
Stewart Allen 2022-01-09 21:05:14 -05:00
commit 55b59d9cb1
7 changed files with 81 additions and 22 deletions

View file

@ -77,10 +77,8 @@ mesh.group = class MeshGroup extends mesh.object {
// auto-remove group when empty
if (this.group.children.length === 0) {
mesh.api.group.remove(this);
// update worker state
worker.object_destroy({id: this.id});
// update object store
mesh.db.space.remove(this.id);
// manage lifecycle with worker, mesh app caches, etc
this.destroy();
} else {
// update data store
mesh.db.space.put(this.id, this.models.map(m => m.id));