ara

Thanks for sharing the wonderful owl demo so that I could make my own version.
https://www.youtube.com/watch?list=PLwGl7Ikd_6GTpd2PnWqqIZVsqotxtrtaE&v=-V0CQa5Xaz8

I want to use this for streaming. I use OBS studio to open my html file as a widget, however it doesn't trace mousemove event anymore.My friend tells me its just because javascript runtime only works in explorer window.
Is there any other approach or spine runtime could take advantage of this technique, just like some '.exe' widget reading live2d file (https://github.com/a1928370421/Bongobs-Cat-Plugin)

---

Found some kit for showing skeleton on streaming.However still can't track mouse postion :think:

---

Nevermind, I make a small tool myself. :D
Аватара пользователя
ara
  • Сообщения: 59

Nate

Sorry I'm late to respond!

I would recommend using the Spine Web Player to do this. We've been improving it a lot lately, so you'll want to use version 4.0. The player handles loading and rendering the skeleton, so it's a lot less code.

We use the player like you want on our 404 error page:
http://esotericsoftware.com/404
You can see the code for how it's done here:
http://n4te.com/x/2007-UqBf.txt.nowrap
This uses data URIs to embed the skeleton JSON, atlas file, and atlas PNG but you could use regular URLs. The Animate function is like the Ola JavaScript library, it is used to smooth out the mouse movement. This code uses the a variable to adjust the mouse position in a circle, to make it so the vortex is always moving. You can remove this if you want it to look at the mouse like the owl.

If you made a tool, it would be interesting to know how it works. Did you use a game toolkit?
Аватара пользователя
Nate

Nate
  • Сообщения: 11399


Вернуться в Runtimes