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

How to modify an animation property from Flutter #44

Open
abdlrhmanshehatamoussa opened this issue Feb 7, 2019 · 2 comments
Open

How to modify an animation property from Flutter #44

abdlrhmanshehatamoussa opened this issue Feb 7, 2019 · 2 comments

Comments

@abdlrhmanshehatamoussa
Copy link

I know that you can change some properties for the AnimationActor like the color for example, but can i change the speed for the moving object from flutter or the path of its motion?

Thanks

@luigi-rosso
Copy link
Contributor

Using a controller you can apply an animation more quickly by speeding up the elapsed time. Take a look at

_rockTime += elapsed * _speed;
.

If you wanted to actually manipulate the speed of a single specific object in your animation, you'd have to manipulate the keyframe time/values which is currently not easy to do. It's possible, but it'd be quite tedious as we don't have an API for easily doing this at runtime. Do you have an example use case you could share? We might be able to find a good way for you to achieve the same result in a different way. For example, in the Space Reload demo, we achieve this by breaking the animation into multiple overlapping parts so we can speed one part up.

We can also add a feature request to our roadmap that fits exactly what you want.

@umberto-sonnino
Copy link
Contributor

We also have a tutorial on our Flare API, and specifically on how to build custom FlareController over here.

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

No branches or pull requests

3 participants