Skip to content

Commit

Permalink
Annotated problematic Game.width / Game.height calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
r-zander committed Jan 2, 2025
1 parent 5fed1f4 commit 2bab23a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/src/features/core/logic/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ export class Game implements IGame {
private backend: IBackend;

public get width(): number {
// FIXME Doesn't take browser zoom into consideration
return this.application.canvas.width / this.renderResolution;
}

public get height(): number {
// FIXME Doesn't take browser zoom into consideration
return this.application.canvas.height / this.renderResolution;
}

Expand Down

0 comments on commit 2bab23a

Please sign in to comment.