📝 Add even more comments
This commit is contained in:
+9
-4
@@ -55,6 +55,9 @@ var TRexEffect = class TRexEffect {
|
||||
|
||||
// -------------------------------------------------------------------- API for prefs.js
|
||||
|
||||
// This is called by the preferences dialog. It loads the settings page for this effect,
|
||||
// binds all properties to the settings and appends the page to the main stack of the
|
||||
// preferences dialog.
|
||||
static initPreferences(dialog) {
|
||||
|
||||
// Add the settings page to the builder.
|
||||
@@ -76,13 +79,14 @@ var TRexEffect = class TRexEffect {
|
||||
|
||||
// ---------------------------------------------------------------- API for extension.js
|
||||
|
||||
|
||||
// This is called from extension.js whenever a window is closed with this effect.
|
||||
static createShader(settings) {
|
||||
return new TRexShader(settings);
|
||||
}
|
||||
|
||||
// If there's a transition in progress, we re-target these transitions so that the
|
||||
// window is neither scaled nor faded.
|
||||
// This is also called from extension.js. It is used to tweak the ongoing transitions of
|
||||
// the actor - usually windows are faded to transparency and scaled down slightly by
|
||||
// GNOME Shell. Here, we modify this behavior as well as the transition duration.
|
||||
static tweakTransitions(actor, settings) {
|
||||
const animationTime = settings.get_int('trex-animation-time');
|
||||
|
||||
@@ -94,8 +98,9 @@ var TRexEffect = class TRexEffect {
|
||||
}
|
||||
};
|
||||
|
||||
// For this effect, we slightly increase the window's scale as part of the warp
|
||||
// effect.
|
||||
const warp = 0.5 * settings.get_double('claw-scratch-warp');
|
||||
|
||||
tweakTransition('opacity', 255);
|
||||
tweakTransition('scale-x', 1.0 + warp);
|
||||
tweakTransition('scale-y', 1.0 + warp);
|
||||
|
||||
Reference in New Issue
Block a user