-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Spine 4.0 Plugin Support #85
Conversation
@mvaligursky had to redo the PR so it was up to date with the 4.1 support. |
If I modify the json file version of the owl demo and use 4.1 library, the owl demo works without modification. If I use the 4.0 library, no errors, but nothing displays. To reproduce, modify
In the owl40.html modify the 43 nd line:
|
Make the owl track the cursor position.
cleanup
For version 4.0, it looks like textures are accessed through the "page" property. For RegionAttachment and MeshAttachment we need to make the following adjustments. The following:
Becomes:
|
To support 4.0, textures are stored under the page property.
Update version support details and provide more information.
Ready for review, please be sure to check out the Owl demo. If two raptor demos is confusing, I can remove the 4.0 version. |
One area of improvement that needs an engine / graphics expert. The grey outline makes me think the pre-multiplied alpha is wrong. The plugin just assumes this is: material.blendType = pc.BLEND_PREMULTIPLIED; I've seen data files that have a "pma" attribute for textures, which we could read and honour. Thing is, this is something that I get wrong all the time. It could just be that its on a grey background. I don't know. The first screenshot above is from the original spine demo, outlines are nice and crisp. In that demo they are using an alphaTest threshold of 0.5, I don't know what the equivalent or how that is achieved in PlayCanvas Engine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top contribution, much appreciated!
Add Spine 4.0 Plugin Support
Replaces: #78
Fixes a gap in the support matrix.
I confirm I have read the contributing guidelines and signed the Contributor License Agreement.