This commit is contained in:
schmelczerandras 2020-10-25 17:54:45 +01:00
parent a66fa63b4b
commit efa838a2ad
20 changed files with 1691 additions and 368 deletions

View file

@ -155,7 +155,12 @@ export class Game extends CommandReceiver {
const angle = Math.atan2(direction.y, direction.x);
e.className = 'other-player-arrow ' + team;
const { width, height } = this.overlay.getBoundingClientRect();
if (!this.renderer) {
return;
}
const width = this.renderer.canvasSize.x;
const height = this.renderer.canvasSize.y;
const aspectRatio = width / height;
const directionRatio = direction.x / direction.y;