two.js
two.js copied to clipboard
Interactive Support only for SVG Renderer?
I am sorry if the question is trivial. In the docs, I only see one example featuring mouse event response through svg element. Does two.js only have interactive support for svg renderer? Thanks!
That is correct. There isn't hit-test logic built into Two.js yet. So, at the moment the only manner I'd through SVG.
This ticket will serve as a good thread to start tracking features on hit test logic.
I described in issue #209 a two.js hit test demo I wrote some time ago (it can be tested here).
It takes advantage of rbush for efficiency and is renderer agnostic. HTH.
Thanks for sharing. That's a great point of reference and looks like it could be a good avenue to implement not just hit testing but frustum culling as well.