Added a build process

This commit is contained in:
2022-01-29 19:13:36 +03:00
parent 31a1a3c3f4
commit a7459b7557
9 changed files with 539 additions and 16 deletions

View File

@@ -4,6 +4,19 @@ export default class MockupModel extends Group {
constructor() {
super();
this.home = {
position: {
x: 0,
y: 0,
z: 0,
},
rotation: {
x: 0,
y: 0,
z: 0,
},
};
this.speed = {
x: 0,
y: 0,
@@ -19,13 +32,14 @@ export default class MockupModel extends Group {
floatAnim() {
const maxSpeed = 0.1;
const acceleration = 0.01;
if (this.position.y < -2) {
this.acceleration.y = 0.01;
this.acceleration.y = acceleration;
}
if (this.position.y > 2) {
this.acceleration.y = -0.01;
this.acceleration.y = -acceleration;
}
this.speed.y = Math.min(this.speed.y + this.acceleration.y, maxSpeed);