Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layer refresh rate as a function of framerate rather than screen refresh rate? #700

Closed
whyameye opened this issue Nov 24, 2013 · 2 comments
Assignees

Comments

@whyameye
Copy link

For animations, it seems to me a layer should update at the framerate of the fastest sprite animation on that layer instead of at the screen refresh rate? For example, it seems if I have multiple sprites but have started animation on only 1 of these with a framerate of 1 frame per second, the entire layer is erased and all sprites redrawn an my screen's refresh rate (typically 60Hz). I'm concerned about how this will affect performance, especially on lower-powered Android/iOS devices.

@ericdrowell
Copy link
Owner

You're correct, assuming that there are no other animations running alongside the sprites. For cases when you are running other animations, tweens, or dragging and dropping stuff, while sprites are animating, you don't want to only refresh a layer when a sprite is updated. Also, for people who are using Sprites with different frame rates, the layer redraw rate is no longer constant.

Essentially, you have a special use case, in which the only thing driving layer redraws are sprite animations, and each of your sprites have the same frame rate. What I need to do, is to add logic that detects this condition, and then redraws layers only when the sprites update. The moment that another animation or tween is detected on the same layer, Kinetic would have to switch to the current model. I'll add this to my todo list, thanks!

@ghost ghost assigned ericdrowell Nov 24, 2013
@confile
Copy link

confile commented Aug 14, 2014

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants