mirror of
https://github.com/rastapasta/mapscii.git
synced 2024-11-22 08:03:07 +01:00
✋ implementing zoom level based map movement
This commit is contained in:
parent
ae9507d4e3
commit
61be4181fd
@ -156,10 +156,10 @@ module.exports = class Termap
|
||||
when "k" then @rotation += 15
|
||||
when "l" then @rotation -= 15
|
||||
|
||||
when "left" then @center.lon -= 1
|
||||
when "right" then @center.lon += 1
|
||||
when "up" then @center.lat += 1
|
||||
when "down" then @center.lat -= 1
|
||||
when "left" then @center.lon -= 8/Math.pow(2, @zoom)
|
||||
when "right" then @center.lon += 8/Math.pow(2, @zoom)
|
||||
when "up" then @center.lat += 6/Math.pow(2, @zoom)
|
||||
when "down" then @center.lat -= 6/Math.pow(2, @zoom)
|
||||
|
||||
else
|
||||
null
|
||||
|
Loading…
Reference in New Issue
Block a user