Download latest build or Corona and new Spine runtimes, and enjoy Mesh attachments in action.
Beware it’s in open beta. Test well before shipping to production.
Download latest build or Corona and new Spine runtimes, and enjoy Mesh attachments in action.
Beware it’s in open beta. Test well before shipping to production.
Fantastic work, can’t wait to try some tests.
Thanks. Also, big thanks to [member=‘Esoteric Software’]. However, Corona being first user of Spine Lua runtime, there are a lot of problem there connected to mesh manipulations. That code never had chance to be properly tested before today, really.
There is open issue on Spine’s github to fix it https://github.com/EsotericSoftware/spine-runtimes/issues/601
I will help as much as I can (I already am, as you can see from the issue)
How is support for Corona mesh going? The runtime hasn’t been updated in some time.
Everything on our side is working. I understand that Spine has various runtimes and that the Lua one is being worked on. But that’s a question for Esoteric.
Rob
The Lua and Corona Spine runtimes have now been updated to support all Spine features up to the Spine editor version 3.4.02, which is the latest non-beta Spine release. This means you can use meshes, linked meshes, paths, etc and it will work with Corona.
You rock!
Please accept my virtual hug.
I want to kiss you :wub:
Spine is such an important part in most of my future apps so I´m super happy.
Exciting! Looking forward to taking it for a test run.
Found time to get into Mesh animations in Spine. Seeing some great early results.
Question vlads or anyone up with the Corona runtime. If you print to the terminal during skeleton:createImage it outputs the number of attachments in the spine object being created. But printing in skeleton:createMesh causes the terminal to output the attachments endlessly. I don’t know how skeleton:createMesh works but is that normal?
To be more specific, the current code outputs every attachment in the spine object endlessly in the terminal.
function skeleton:createMesh (attachment, meshParameters) print("mesh = ", "examples/spineboy/images/" .. attachment.name .. ".png") local mesh = display.newMesh(meshParameters) mesh.fill = {type="image", filename="examples/spineboy/images/" .. attachment.name .. ".png"} return mesh end
Hello,
Thank you for adding meshes support. It is fantastic!
I’ve been playing with the new spine runtime. With the spine-boy-mesh example I had no problems, but when I try the “raptor” example some error occurs. Maybe I’m missing something, but it might be a bug of the beta version. Did anybody try to load this example? This is the error:
ERROR: Runtime error /Users/pauors/Documents/01 Projectes/spine-corona/spine-lua/MeshAttachment.lua:88: attempt to perform arithmetic on local 'vy' (a nil value) stack traceback: /Users/pauors/Documents/01 Projectes/spine-corona/spine-lua/MeshAttachment.lua:88: in function 'computeWorldVertices' /Users/pauors/Documents/01 Projectes/spine-corona/spine-corona/spine.lua:225: in function 'updateWorldTransform' /Users/pauors/Documents/01 Projectes/spine-corona/examples/raptor/raptor.lua:47: in function \</Users/pauors/Documents/01 Projectes/spine-corona/examples/raptor/raptor.lua:38\> ?: in function \<?:169\>
Now we are animating our own character. Let’s see how it works. Thank you.
Pau Ors
Hello, [member=‘pau7’] and [member=‘kilopop’]! There is an open bug on spine-runtime repo to fix Lua runtimes. Corona is first Lua runtime to ever support meshes, so there are some issues with it. Comments to that bug also contain some hacks to make Raptor example works.
I will take a look on why meshes are constantly being re-created. Anyway. I would suggest to avoid using meshes intensively - they are computationally expensive. Use in moderation.
Hey guys, just so you know if you are using the latest version of Spine the mesh support will not work. They are in the process of updating the runtimes. If you rollback the version of Spine you are using to the version before (you can do this in the menu) it should work.
It seems they’ve changed the name of the “ffd” container in the output JSON files to be called “deform” in the latest version of Spine. It is pretty easy to make it work again - just go to SkeletonJson.lua file in the spine-lua folder and change row 469
from
local ffd = map["ffd"]
to
local ffd = map["deform"]
Now even the newest version of spine should work with meshes again.
You that have successfully used meshes - which version of Spine were you using?
I’m using version 3.2.01 and it worked.
Okay, I got it working with the newest version (3.3.07). I did have to do the change that yanko_popov suggested above, not use the shear tool in Spine, and override the createMesh function to load from my image sheet, and now it’s working perfectly.
Does anyone know if the shear tool will eventually be supported? My animator really wants to use it…
Hi @ChunkyApps just finished watching the latest CoronaGeek episode where you showed a very cool sample of using meshes in Spine, would it be possible that you can share your sample? A couple of years ago I did a module for implementing Spine animations in Corona (SpineHelper) but I think your example is way a lot simpler than the one I did