• Runtimes
  • [JS/TS] Bind DOM event on spine bones

Hi guys, I would like to use some Spine animations in my Vue project and wonder if I could have some interactions on the Spine's bone which may trigger a DOM event; e.g.: Binding a Click event on the tail of a Spine dragon that will display a modal with some dynamic content got from API in JS code. Is it possible?

My first thought was just binding a click event on the spine player canvas, get the cursor pointer and the bone coordinates, then detect whether the bone area got clicked. But I would like to know if there is any other solutions that might be more simple. Thank you!

Related Discussions
...
  • Modificato

Thank you Nate, that's great, I will check it 🙂