3 ms·
There aren't really any assets though. I just create the svgs dynamically. Maybe I need to place some strategic `Math.round` calls here and there, never thought
by gereleth 4y ago
There aren't really any assets though. I just create the svgs dynamically. Maybe I need to place some strategic `Math.round` calls here and there, never thought of this =).
- ranman 4y agoYeah so if you can math.round or math.floor them a bit the paths are a lot cleaner - if you're dynamically creating them anyway though then I don't know that it gains you much performance. It might gain some performance on render for larger maps? Not sure. Didn't get a chance to look at your source.
- gereleth 4y agoThe file to look at would be this Tile component: https://github.com/gereleth/hexapipes/blob/main/src/lib/puzzle/Tile.svelte https://github.com/gereleth/hexapipes/blob/main/src/lib/puzz... My svg handling was very much "learn as I go". An earlier version even had circles instead of hexagons because they're simpler to do. There's a cool playthrough video of that version: https://www.youtube.com/watch?v=vlpPr485NUY https://www.youtube.com/watch?v=vlpPr485NUY