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

Allow testable animations #140

Open
ecton opened this issue Jan 13, 2024 · 0 comments
Open

Allow testable animations #140

ecton opened this issue Jan 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ecton
Copy link
Member

ecton commented Jan 13, 2024

One challenge in creating animated PNGs is that animations execute in real time. Ideally, we should have a way to control the animation pipeline in a test.

I think this can partially be done by using a thread local during tests. When an animation handle is spawned/launched, a thread local is checked to see if it should be sent to a specific animation pipeline. If none is set, the global pipeline will be used.

The animation thread should install itself as a local pipeline, ensuring that all callbacks invoked from the animation thread will create animations that run on the current animation thread.

We then can allow a manual mode for the animation system, and the VirtualWindow can automatically step the animation system by the elapsed duration.

This finally should allow us to make AnimationRecorder record as fast as possible, simulating time rather than requiring the tests to run in real time.

@ecton ecton added the enhancement New feature or request label Jan 13, 2024
@github-project-automation github-project-automation bot moved this to Unplanned in Cushy Roadmap Jan 13, 2024
@ecton ecton moved this from Unplanned to Todo in Cushy Roadmap Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant