Rooms, items and some player stuff

This commit is contained in:
2021-11-04 20:58:37 +01:00
parent 36bb9264b3
commit a745ff299e
277 changed files with 14665 additions and 5 deletions

View File

@@ -0,0 +1,28 @@
export class Vec3 {
constructor(values = {
x: 0,
y: 0,
z: 0
}) {
this.x = values.x;
this.y = values.y;
this.z = values.z;
}
add(vector) {
this.x += vector.x;
this.y += vector.y;
this.z += vector.z;
}
multiply(vector) {
this.x *= vector.x;
this.y *= vector.y;
this.z *= vector.z;
}
clone() {
return new Vec3({
x: this.x,
y: this.y,
z: this.z
});
}
}