Setup formatting

This commit is contained in:
schmelczerandras 2020-10-07 16:40:21 +02:00
parent d34f25295c
commit dd850d11d1
45 changed files with 230 additions and 190 deletions

View file

@ -23,12 +23,12 @@ export class Camera extends GameObject {
this._viewArea.topLeft = vec2.fromValues(
this.center.x - this._viewArea.size.x / 2,
this.center.y + this._viewArea.size.y / 2
this.center.y + this._viewArea.size.y / 2,
);
this._viewArea.size = vec2.fromValues(
Math.sqrt(Camera.inViewAreaSize * canvasAspectRatio),
Math.sqrt(Camera.inViewAreaSize / canvasAspectRatio)
Math.sqrt(Camera.inViewAreaSize / canvasAspectRatio),
);
c.renderer.setViewArea(this._viewArea.topLeft, this._viewArea.size);

View file

@ -26,7 +26,7 @@ export class GameObjectContainer extends CommandReceiver {
this.addObject(this.camera);
},
[StepCommand.type]: (c: StepCommand) => {
[StepCommand.type]: (_: StepCommand) => {
if (this.player) {
this.camera.center = this.player.position;
}