-
Notifications
You must be signed in to change notification settings - Fork 14
added some basic stuff for animations #112
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
base: main
Are you sure you want to change the base?
Conversation
|
I like the idea of providing some help to compositors for animations. I think the timers example would be more than adequate for tinywl! |
|
What are your thoughts on allowing compositors to add their own |
|
i have greatly improved on the initial idea; one of the things i did was add timers by default with user callbacks. i have been doing it locally in mwc, but forgot to push the code yesterday, so hopefully i will finish it today so we have more ground for discussion. |
you edited the response in the meantime, but i have already mostly answered things here. |
|
this should be done now, i have also added an example to tinywl :) |
ErikReider
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please use tabs instead of spaces.
I don't think we need an output frame events example :)
Otherwise, this LGTM
|
|
||
| /* we dont take the commits from a client if its animating currently. | ||
| * this should be handled better, but for showing animations off this is fine */ | ||
| if(toplevel->popin_animation) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Space between if and (
| } | ||
|
|
||
| struct fx_animation_curve { | ||
| double params[4]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to know what these 4 parameters are, and what they do as a comment?
https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/cubic-bezier#parameters
|
i guess a but on the more important note, we may want to also add 'general purpose' animations ( what are your thought on it? |
|
formatting issues should be resolved. i have also added some resources for bezier curves, but in a header file instead, as it seemed better that way. |
idea here is that this is the logic thats going to be used by compositors anyway, and having these helpers will remove all this boilerplate.
compositor maintainers are free to implement them in any way they want (with output frame events or with timers for example), and just call appropriate functions to start, update and destroy them.
todos
tinywli dont know how would i go about adding both examples to
tinywltho, so maybe i could just add the first option, as thats whatmwcdoes and what i am familiar with.