The fret placement was, slightly surprisingly, the absolute easiest part of everything. 99% of my time was spent on the math for producing the base fretboard shape (the fingerboard() function in fret_worker.js if you're curious). Between getting the mesh right and doing the math for radius, it was a bit of a beast, but it ended up working out well.