twinstar6980 / Twinning

https://github.com/twinstar6980/Twinning.Documentation
GNU General Public License v3.0
59 stars 12 forks source link

Flash to PAM JSON Issue #12

Closed Haruma-VN closed 1 year ago

Haruma-VN commented 1 year ago

I decode the pam to pam.json normally, later convert to Flash. This is a strange issue because the tool cannot convert Flash to pam.json, below is the video and PAM (Also this PAM is from PvZ2C RSB):

https://user-images.githubusercontent.com/114157573/235452322-27115d9a-9c55-4305-9ffd-4710a2df1c43.mp4

ZOMBIE_SKYCITY_ZOMBOSS.zip

twinstar6980 commented 1 year ago

This BUG is caused by the presence of trailing empty frames (not containing the element layer) in the main sprite of PAM. In this case, the XFL converted from JSON will lose the trailing empty frames, resulting in an error when converting XFL to JSON.

This issue is now fixed and introduces a breaking update: for each sprite component, an empty layer (named "0") is added at the bottom of the sprite layer list, which always starts from the first frame At first, last for N frames, take N as the real frame number of the sprite (thus, you should not insert components after N frames when editing XFL, which will cause conversion errors).

In addition, another bug has been fixed: when pam's frame_rate=24 (the default frame rate of xfl considered by adobe), after adobe-animate saves the project file, the conversion fails due to the absence of the frameRate attribute in xfl; now it will be correctly obtained The default value is 24 as the frame rate value.

If you haven't another question, please close this issue.