twinstar6980/Twinning

Flash to PAM JSON Issue

Closed this issue · 1 comments

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):

2023-05-01.19-33-20.mp4

ZOMBIE_SKYCITY_ZOMBOSS.zip

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.