Reset everything

This commit is contained in:
2022-01-29 23:26:57 +03:00
parent 4239d5716b
commit 08417278e9
2 changed files with 8 additions and 0 deletions

View File

@@ -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);
} }

View File

@@ -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);
} }