ilusha

Hello,

I need two masks for an animation. As I know Spine supports only one clipping per skeleton. So I made two skeletons each has one clipping area. In the starling runtime, only one clipping plays as expected. I checked the asset in SkeletonViewer and it plays the animation correctly.

I sent the starling project and the spine project to esoteric email.

Animation assets: dewPart1, dewPart2

Thanks
Hình đại diện của thành viên
ilusha
  • Bài viết: 56

Mario

Cheers, I got the repro files. I'll post here once I found the issue.
Hình đại diện của thành viên
Mario

Mario
  • Bài viết: 2360

Mario

I've found the issue, but no way to properly fix it. It seems the SWC compiler does something terrible when compiling the source files, specifically Triangulator.as and SkeletonClipping.as. These are contained in spine-as3.swc, which we compile with default compiler options in release mode. For whatever reason, the clipping starts failing when referencing these classes through spine-as3.swc.

The only working solution at the moment is to take these two files and put them in your project's src/spine/ directory, while still linking to the spine-as3.swc file.
Hình đại diện của thành viên
Mario

Mario
  • Bài viết: 2360

ilusha

Thanks for the investigation. I'll check the solution later.

---

I added spine as3/starling src to the project instead of swc and it works correctly. Magic :)
Hình đại diện của thành viên
ilusha
  • Bài viết: 56

tenjarlaKC

hello,

how can i animate the end slot in clipping in spine..

Thanks.,
tenjarlaKC
  • Bài viết: 2

Erika

Hello tenjarlaKC, I recommend modifying the draw order, as long as the starting slot and the end slot are the same what's in the middle can change. Otherwise, you could also just create a copy of the clipping and switch to that when you want to have a different clipping end.
Hình đại diện của thành viên
Erika

Erikari
  • Bài viết: 2597

tenjarlaKC

Thanks Erikari,
modifying the draw order between starting slot and ending slot helped and it saves lots of time for me...

Thanks..
tenjarlaKC
  • Bài viết: 2

ilusha

Hi Mario,

I have found another issue with that example.
The asset "dewPart1" contains several animations: "initial.idel", "ant.walk".

If I change "ant.walk" to "initial.idel" with "skeleton.state.setAnimationByName(0, "initial.idel", true);" then the issue appears.
clippingIssue.png


Any ideas?)
Bạn không được cấp phép để xem tập tin đính kèm trong bài viết này.
Hình đại diện của thành viên
ilusha
  • Bài viết: 56

Mario

Could you open an issue for this? IIRC, you send the assets by email?
Hình đại diện của thành viên
Mario

Mario
  • Bài viết: 2360

ilusha

I opened an issue on git: [Starling] Clipping doesn't work · #1125

You are right: the as3 project and the spine project were sent on March 31. A couple of days ago I sent modified src file to reproduce the bug.
Hình đại diện của thành viên
ilusha
  • Bài viết: 56

Mario

Thanks, I'll investigate!
Hình đại diện của thành viên
Mario

Mario
  • Bài viết: 2360

ilusha

Many thanks to Mario! He found and fixed very annoying bug with clipping. Now the animation works correctly.
Hình đại diện của thành viên
ilusha
  • Bài viết: 56

Mario

Whoops, forgot to also update the forum post. The fix is in the latest 3.6, 3.7-beta branches! Thanks for reminding me!
Hình đại diện của thành viên
Mario

Mario
  • Bài viết: 2360

Mario

Whoops, forgot to also update the forum post. The fix is in the latest 3.6, 3.7-beta branches! Thanks for reminding me!
Hình đại diện của thành viên
Mario

Mario
  • Bài viết: 2360

ilusha

Something happened with those animations again)

They stopped to play correctly in the Starling runtime.
In the Spine editor dewPart1 and dewPart2 work correctly.

I downloaded the latest skeletonViewer.jar to check animations. And they also don't play.

The animation dewPart1 can't load with an exception:
com.badlogic.gdx.utils.SerializationException: Error reading animation: initial.idle
at com.esotericsoftware.spine.SkeletonJson.readSkeletonData(SkeletonJson.java:348)
at com.esotericsoftware.spine.SkeletonViewer.loadSkeleton(SkeletonViewer.java:207)
at com.esotericsoftware.spine.SkeletonViewer$UI$2.changed(SkeletonViewer.java:705)
at com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.handle(ChangeListener.java:28)
at com.badlogic.gdx.scenes.scene2d.Actor.notify(Actor.java:188)
at com.badlogic.gdx.scenes.scene2d.Actor.fire(Actor.java:152)
at com.badlogic.gdx.scenes.scene2d.ui.Button.setChecked(Button.java:131)
at com.badlogic.gdx.scenes.scene2d.ui.Button$1.clicked(Button.java:94)
at com.badlogic.gdx.scenes.scene2d.utils.ClickListener.touchUp(ClickListener.java:88)
at com.badlogic.gdx.scenes.scene2d.InputListener.handle(InputListener.java:59)
at com.badlogic.gdx.scenes.scene2d.Stage.touchUp(Stage.java:351)
at com.badlogic.gdx.InputMultiplexer.touchUp(InputMultiplexer.java:124)
at com.badlogic.gdx.backends.lwjgl.LwjglInput.processEvents(LwjglInput.java:360)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:221)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:128)
Caused by: java.lang.NullPointerException
at com.esotericsoftware.spine.SkeletonJson.readCurve(SkeletonJson.java:901)
at com.esotericsoftware.spine.SkeletonJson.readTimeline(SkeletonJson.java:883)
at com.esotericsoftware.spine.SkeletonJson.readAnimation(SkeletonJson.java:630)
at com.esotericsoftware.spine.SkeletonJson.readSkeletonData(SkeletonJson.java:346)
... 14 more
The animation dewPart2 loads but an ant stays on an initial position and doesn't go by a curve.
I'll send animations to the Esoteric Software email.

Thanks.
Hình đại diện của thành viên
ilusha
  • Bài viết: 56

Nate

@ilusha likely the version of Spine you used to export you data doesn't match the runtimes you are using. Eg, if you use the 3.8 runtimes, you must export with Spine 3.8.xx.
Hình đại diện của thành viên
Nate

Nate
  • Bài viết: 9985

Mario

@ilusha I've looked into your two files. dewPart1 plays in SkeletonViewer 3.8.80 from Skeleton Viewer. I've looked at the initial.idle animation in dewPart1 in both SkeletonViewer and the editor, and they are identical. The ant doesn't move and is not visible.

dewPart2 and the ant.magnification animation also play correctly in the 3.8.80 SkeletonViewer as well as the editor. The ant is being clipped against the rain drop, and walks from left to right.

Both animations also work correctly in my Starling setup. Could you please make sure you use the latest spine-startling.swc from our spine-runtimes repository from the 3.8 branch? Note that spine-startling.swc now also includes spine-as3.swc, so you do not have to add the spine-as3.swc separately to your project! If you still have spine-as3.swc in your project, just delete it.
Hình đại diện của thành viên
Mario

Mario
  • Bài viết: 2360


Quay về Bugs