fix matrix cache corruption during reload. center models on import
This commit is contained in:
parent
96ad1c669e
commit
f53a9752f8
4 changed files with 34 additions and 19 deletions
|
|
@ -103,10 +103,10 @@ mesh.model = class MeshModel extends mesh.object {
|
|||
meh.renderOrder = 1;
|
||||
// center vertices then restore mesh object position
|
||||
// still this doesn't work. scale broken for bounding boxes
|
||||
// let mid = meh.getBoundingBox().mid;
|
||||
// geo.moveMesh(-mid.x, -mid.y, -mid.x);
|
||||
// geo.computeBoundingBox();
|
||||
// this.move(mid.x, mid.y, mid.x);
|
||||
let { mid } = meh.getBoundingBox();
|
||||
geo.moveMesh(-mid.x, -mid.y, -mid.z);
|
||||
geo.computeBoundingBox();
|
||||
this.move(mid.x, mid.y, mid.z);
|
||||
// sets fallback opacity for wireframe toggle
|
||||
this.opacity(1);
|
||||
// this ref allows clicks to be traced to models and groups
|
||||
|
|
|
|||
Loading…
Reference in a new issue