add model renaming

This commit is contained in:
Stewart Allen 2022-01-20 17:40:10 -05:00
commit 3df81d48c7
4 changed files with 33 additions and 1 deletions

View file

@ -195,6 +195,12 @@ mesh.model = class MeshModel extends mesh.object {
this.normals({refresh: true});
}
rename(file) {
this.file = file;
// persist in db so it can be restored on page load
mapp.db.space.put(this.id, { file, mesh: this.attributes.position.array });
}
get group() {
return this._group;
}