📝 Improve comments

This commit is contained in:
Simon Schneegans
2022-01-28 07:49:48 +01:00
parent dcaa28c200
commit 51ba0d06ab
9 changed files with 68 additions and 42 deletions
+8 -5
View File
@@ -79,12 +79,15 @@ var Wisps = class Wisps {
return new Shader(settings, forOpening);
}
// This is also called from extension.js. It is used to tweak a window's open / close
// The tweakTransition() is called from extension.js to tweak a window's open / close
// transitions - usually windows are faded in / out and scaled up / down by GNOME Shell.
// forOpening is set to true if this is called for a window-open transition, for a
// window-close transition it is set to false. The modes can be set to any value from
// here: https://gjs-docs.gnome.org/clutter8~8_api/clutter.animationmode. This also
// determines how the uProgress uniform value will progress in the shader.
// The parameter 'forOpening' is set to true if this is called for a window-open
// transition, for a window-close transition it is set to false. The modes can be set to
// any value from here: https://gjs-docs.gnome.org/clutter8~8_api/clutter.animationmode.
// The only required property is 'opacity', even if it transitions from 1.0 to 1.0. The
// current value of the opacity transition is passed as uProgress to the shader.
// Tweaking the actor's scale during the transition only works properly for GNOME 3.38+.
// For this effect, windows should be scaled down slightly but not faded.
static tweakTransition(actor, settings, forOpening) {
return {