Hello! I'm working on a project to embed previously-exported Spine animations onto a website, but I'm running into a few issues with inconsistent transparency display between browsers.
The Spine models I'm working with were exported from Spine 3.4.02, with premultiplied alpha disabled. I'd prefer not to reexport these models unless I really have to. I'm using the 3.7 version of the spine-player.js file, since 3.8 requires .skel files that I don't have.
When using the Spine Web Player to view these models with alpha turned off, they display perfectly fine in both Firefox and Chrome. (example: On the other hand, if I turn alpha on, there's a white "glow" around the edges from anti-aliasing. (example:
As well, if I attempt to export the canvas to an image (i.e. via .toDataUrl), some sections of the image appear with a strange, inverted color scheme. This is not visible on the canvas itself; only in the exported image, and this behavior only happens in Firefox and not in Chrome. I'm not very familiar with WebGL, but I suspect this is something to do with undefined behavior as a result of alpha multiplication. (example:
So, my questions:
- Given that I'm working with models from Spine 3.4, is the web player the best option for embedding them? I've tried with the 3.5 version of the widget as well, but it looks like these issues also appear here.
- Furthermore, is this a problem with version compatibility, the way the viewer is handling transparency, or is it an issue with the exported Spine files?
- What's the best way for me to get these files to display correctly with transparent background and for the canvas to save properly as individual images?
Thanks for the help. Sorry if this is a little scattered - I'm afraid I'm not familiar with this software. Happy to provide more information as needed.