pixijs / animate

PixiJS runtime library for content from Adobe Animate CC
https://pixijs.io/animate/
MIT License
217 stars 33 forks source link

MovieClip timescale #47

Open Ch1pStar opened 7 years ago

Ch1pStar commented 7 years ago

Is this functionality supported at the moment, I didn't find anything that would indicate so in the code? If no, do you have any plans for adding it in the future? I'm currently working on a project that would almost certainly require this and I imagine it would be useful for others as well.

bigtimebuddy commented 7 years ago

MovieClips have a framerate which is independent (but defaults to the root stage or parent's framerate upon construction). This can be changed to adjust the playback rate of the clip: http://jiborobot.github.io/pixi-animate/PIXI.animate.MovieClip.html#framerate

Is this what you were looking for?

Ch1pStar commented 7 years ago

@bigtimebuddy Thanks, I totally overlooked the framerate property! A small issue is having to set the framerate of each movie clip separately(I can't set a framerate for the entire stage), but its not a problem for me right now.

One difference with the TweenMax timescale though, is there is no interpolation between key frames. Say an animation is created with 60fps and we set the animation to 30fps, the empty frames could interpolate between the previous and next key frames so that the animation is not choppy.

bigtimebuddy commented 7 years ago

That is correct. PixiAnimate exports discrete frames of animation so loss-less interpolation (like with TweenMax) is not possible.