Sprite System: support variable durations per frame
(Sorry for the dual engine-editor feature request, but given this would highly impact CX, I thought the discussion could start here?)
Hi! When working with frame animated sprites, most art packages will allow the artist to set unique durations for each frame, letting animators add frames where they're needed, and just hold on a frame when they need a pause. It'd be great if the PlayCanvas sprite system could be updated to accommodate this somewhere.
Given that frames can and often are reused during an animation though, and often with different timings, it probably can't just be added at the Frame level. For the most programming flexibility, it should probably be an additional array on the Sprite object, or rather conceptually the Sprite should probably be upgraded from frameKeys: [key] to frames: [{key, duration}]. In GUI terms, I can imagine the frames array editor for Sprites gaining the duration value along side the current frame key name, but given that you can't draw the animations in Play Canvas, I suspect the better investment is in supporting easily importing this data from the art source.
This does then call into question what to do with the current Frames Per Second value in the Sprite Controller's Clip. Conceptually that could turn into a speed multiplier, but there already is a Component level one, and that's probably the more useful one. For my money, I'd probably just deprecate that, and do a best effort at back propagating that to the sprites when you load a project that has the old property; my take is whatever could be done to make that value forwards compatible would ultimately just lead to future UX confusion.