game stuff
This commit is contained in:
parent
07da40dce7
commit
e75cd7406f
20 changed files with 1527 additions and 387 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue