mirror of
https://github.com/anatolykopyl/vue-three-d-mockup.git
synced 2026-03-26 12:55:08 +00:00
Reset everything
This commit is contained in:
@@ -11,7 +11,10 @@ class MockupModel extends Group {
|
|||||||
this.goingHome = false;
|
this.goingHome = false;
|
||||||
|
|
||||||
this.home = home;
|
this.home = home;
|
||||||
|
this.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
reset() {
|
||||||
this.position.x = this.home.position.x;
|
this.position.x = this.home.position.x;
|
||||||
this.position.y = this.home.position.y;
|
this.position.y = this.home.position.y;
|
||||||
this.position.z = this.home.position.z;
|
this.position.z = this.home.position.z;
|
||||||
@@ -54,6 +57,7 @@ class MockupModel extends Group {
|
|||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.goingHome = false;
|
this.goingHome = false;
|
||||||
|
this.reset();
|
||||||
this.startFloat();
|
this.startFloat();
|
||||||
}, rT * 1000);
|
}, rT * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ export default class MockupModel extends Group {
|
|||||||
this.goingHome = false;
|
this.goingHome = false;
|
||||||
|
|
||||||
this.home = home;
|
this.home = home;
|
||||||
|
this.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
reset() {
|
||||||
this.position.x = this.home.position.x;
|
this.position.x = this.home.position.x;
|
||||||
this.position.y = this.home.position.y;
|
this.position.y = this.home.position.y;
|
||||||
this.position.z = this.home.position.z;
|
this.position.z = this.home.position.z;
|
||||||
@@ -51,6 +54,7 @@ export default class MockupModel extends Group {
|
|||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.goingHome = false;
|
this.goingHome = false;
|
||||||
|
this.reset();
|
||||||
this.startFloat();
|
this.startFloat();
|
||||||
}, rT * 1000);
|
}, rT * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user