Last active
November 4, 2021 17:23
-
-
Save 10maurycy10/d2f14357c7e6ae477d092bcafaa3476b to your computer and use it in GitHub Desktop.
clean up darrows map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
save = 'PUT YOUR MAP HERE'//replace contence of string with map | |
save = JSON.parse(save) | |
for (i in save.obstacles) { | |
save.obstacles[i].width = Math.round(save.obstacles[i].width/100)*100 | |
save.obstacles[i].height = Math.round(save.obstacles[i].height/100)*100 | |
save.obstacles[i].x = Math.round(save.obstacles[i].x/100)*100 | |
save.obstacles[i].y = Math.round(save.obstacles[i].y/100)*100 | |
} | |
console.log(JSON.stringify(save)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment