entities test, scaling

This commit is contained in:
biglyderv 2024-11-25 14:14:20 -05:00
parent f5952f30eb
commit c210200bbe
3 changed files with 60 additions and 42 deletions

11
js/player.js Normal file
View file

@ -0,0 +1,11 @@
function Player() {
let pos = { x: Math.random() * 1000 - 50, y: Math.random() * 1000 - 50 };
let camera = { x: -pos.x, y: -pos.y };
let vel = { x: 0, y: 0 };
this.camera = camera;
this.pos = pos;
this.vel = vel;
this.rot = 0;
this.dir = 1;
}