game stuff

This commit is contained in:
Zutatensuppe 2020-11-25 22:03:35 +01:00
parent 07da40dce7
commit e75cd7406f
20 changed files with 1527 additions and 387 deletions

View file

@ -9,7 +9,7 @@ export default class Camera {
this.height = canvas.height
this.zoom = 1
this.minZoom = .2
this.minZoom = .1
this.maxZoom = 6
this.zoomStep = .05
}
@ -44,11 +44,11 @@ export default class Camera {
}
zoomOut() {
return this.setZoom(this.zoom - this.zoomStep)
return this.setZoom(this.zoom - this.zoomStep * this.zoom)
}
zoomIn() {
return this.setZoom(this.zoom + this.zoomStep)
return this.setZoom(this.zoom + this.zoomStep * this.zoom)
}
/**