EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.
http://esotericsoftware.com/
Other
4.43k stars 2.92k forks source link

Spine.js SkeletonJson issues #360

Closed superness closed 8 years ago

superness commented 9 years ago

Couple of issues with SkeletonJson in Spine.js

line 2044: duration = Math.max(duration, timeline.frames[timeline.frameCount * 3 - 3]); line 2105: duration = Math.max(duration, timeline.frames[timeline.frameCount - 1]);

both of these timeline.frameCount calls should be getFrameCount()

The next issue is a little less defined. Had lots of issues with timeline vertices array not having values set and being seen as NaN later on (causing animations to fail). I didn't find the root cause.. but it seems to be related to starting at 'offset' in timelines and not setting 0 for the first 'offset' values.

superness commented 9 years ago

If I have some spine animations that are messed up are you guys interested in looking at them? They load up correctly in Skeleton Viewer: http://esotericsoftware.com/spine-skeleton-viewer

lucap86 commented 9 years ago

Same issues for me, many problems with meshes.

trying with goblin-mesh spine example and spinejs runtime. goblins-mesh.zip

skeletron viewer shows it correctly but in the canvas spear has completely wrong verticles spear

dcalogue commented 8 years ago

this is probably too late, but you can check my branch [https://github.com/dcalogue/spine-runtimes]

I fixed the mesh animations and used them in a shipped project

lucap86 commented 8 years ago

This totally fix the problem for me! thank you very much dcalogue you are a monster ;)

https://github.com/EsotericSoftware/spine-runtimes/compare/master...dcalogue:bugFixing

badlogic commented 8 years ago

This will be fixed in the upcoming 3.4.0 update of the spine-js runtime. See https://github.com/EsotericSoftware/spine-runtimes/issues/613