06 Oct 2017

Paint biomes on the polygon map:

Terrain type:

Note: this project is partly to experiment with implementation techniques. I wanted to try building a ui with Vue.js (good fit for html/svg) but drawing the map with canvas (hard to find information about using it with Vue, because it’s not a great fit). I wanted to try point-to-polygon libraries. I wanted to get my mouse/touch drag code working with a polygon mesh. I am happy with how things went, but I am not 100% sure that the way I used vue+canvas is free of gotchas. I’m also appalled at the size of the compiled file (372k), and need to figure out what’s using most of the space. (Update: turned out to be Vue, and the point-to-polygon library)

Still unimplemented: keyboard shortcuts (need to be put on the window and not on the elements, so vue is no help) ; setter for the json (if you paste in a new json it should parse it and update the map, but what happens if the json is malformed?)