Advertisement
Guest User

zoom

a guest
Apr 23rd, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function mapView(x, y) {
  2. if ((playerX == 0 && playerY == 0) || (x == 0 && y == 0)) return;
  3. mapConatiner.scrollLeft = mapZoom * (y / mapSize) - (document.body.clientWidth / 2) + 500;
  4. mapConatiner.scrollTop = mapZoom * (x / mapSize) - (document.body.clientHeight / 2) + 500;
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement