Hacker News new | ask | show | jobs
by danbruc 897 days ago
SVG also has functions for hit testing [1][2] but I have no experience or at least memories of using them. So no idea if they could be useful and performant enough. But given that interactive SVGs might require finding the object under the mouse cursor as it moves, I would expect this to be reasonable performant, but it might of course still be too slow when used while drawing hundreds or thousands of objects.

[1] https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometry...

[2] https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometry...