Closed mourner closed 5 years ago
how does this look?
It looks great! BRB, going to try it out :p
You know what, just reading from the page it's obvious that this works. And manually modifying the original coordinates array that was passed (or this.coords
I guess) seems most sensible to me too: iterative changes means interacting with the raw array anyway.
So I'll just wait until this and d3-delaunay
merges and update my Voronoi stippling notebook then :)
Cool! Before you can use it, d3-delaunay
will probably also need an equivalent change, since currently it doesn't hold onto the delaunay
object, extracting the triangulation info and throwing it out.
Closes #36. @JobLeonard how does this look?
I opted for the simplest approach possible that wouldn't complicate the API much. So now the constructor only allocates all necessary arrays (except for hull which is small but of undetermined size before triangulation), while all the work happens in
update
:Also removes any explicit release of the temporary arrays because it doesn't seem too useful. If needed, this could be handled on the app side by GC: