diff --git a/bundle/vue-three-d-mockup.esm.js b/bundle/vue-three-d-mockup.esm.js index 72333d8..d00e4e2 100644 --- a/bundle/vue-three-d-mockup.esm.js +++ b/bundle/vue-three-d-mockup.esm.js @@ -11,7 +11,10 @@ class MockupModel extends Group { this.goingHome = false; this.home = home; + this.reset(); + } + reset() { this.position.x = this.home.position.x; this.position.y = this.home.position.y; this.position.z = this.home.position.z; @@ -54,6 +57,7 @@ class MockupModel extends Group { setTimeout(() => { this.goingHome = false; + this.reset(); this.startFloat(); }, rT * 1000); } diff --git a/src/MockupModel.js b/src/MockupModel.js index 518ee61..71e9bb2 100644 --- a/src/MockupModel.js +++ b/src/MockupModel.js @@ -8,7 +8,10 @@ export default class MockupModel extends Group { this.goingHome = false; this.home = home; + this.reset(); + } + reset() { this.position.x = this.home.position.x; this.position.y = this.home.position.y; this.position.z = this.home.position.z; @@ -51,6 +54,7 @@ export default class MockupModel extends Group { setTimeout(() => { this.goingHome = false; + this.reset(); this.startFloat(); }, rT * 1000); }