• Runtimes
  • Regarding Spine-ts Canvas Widget

  • Modificato
Related Discussions
...

For my needs, I can see myself using the Widget code to display multiple Spine canvas elements per page, each doing their own thing and using their own json files. Unfortunately, it seems this configuration wants one and only one atlas file per div. What if a skeleton has a gazillion interchangeable parts and for organization's sake or due to limitations of just how big Spine can generate atlas files I end up needing three or four atlas files? Is the convenient Widget option then off the table? Is it particularly hard to load multiple canvas elements using the old non-Widget methods each with different json files? I'm wondering just how much I have to re-instantiate each time with the longer non-Widget route.

Overall, I'll try not to let it be a problem. But overtime, the amount of stuff that can go on a skeleton will grow because I'm building a web game where each user will need their own json file to know what's equipped to their character's skeleton. Of course I want to have and load as few atlas files as possible, but someday I may end up with a surplus of equippable items that pushes over ti more than one atlas file and if I set my whole site up to use Widgets I don't want to find myself in a mess.

First, I'd highly recommend not to use the widget for a game. But if you absolutely must, there's an option to specify multiple atlas pages for a single widget, see spine-runtimes/spine-ts at master.

Thankyou!

It is not so much inside a game itself that I will be using the Widget, rather, just in spaces where a user's character will be seen by itself in a basic idle animation with next to no interactivity. (These will be most often seen next to forum posts to represent a user as an avatar or a public facing character sheet outside the game with some stats, etc.) With each user having their own json file (or, that's the plan right now, anyway), the site will be able remember each user's character's equipped clothing parts (or I could store this data elsewhere and make it render these parts dynamically, but I want to try Widgets with multiple json files first). I'll test a few things for speeds sake.

I've seen similar setups out of Japan use Flash but I wanted to try something new with just Canvas that won't require third party plugins that don't render well or at all on mobile devices. :coffee: Spine should be really great for this.

Ah, yeah, that makes sense! Let us know how it went. I love seeing the widget in real products 🙂