🔧 Add transiation tweaking
This commit is contained in:
@@ -215,6 +215,24 @@ var FireEffect = class FireEffect {
|
||||
return new FireShader(settings);
|
||||
}
|
||||
|
||||
// If there's a transition in progress, we re-target these transitions so that the
|
||||
// window is neither scaled nor faded.
|
||||
static tweakTransitions(actor, settings) {
|
||||
const animationTime = settings.get_int('fire-animation-time');
|
||||
|
||||
const tweakTransition = (property, value) => {
|
||||
const transition = actor.get_transition(property);
|
||||
if (transition) {
|
||||
transition.set_to(value);
|
||||
transition.set_duration(animationTime);
|
||||
}
|
||||
};
|
||||
|
||||
tweakTransition('opacity', 255);
|
||||
tweakTransition('scale-x', 1);
|
||||
tweakTransition('scale-y', 1);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------- private stuff
|
||||
|
||||
// This populates the preset dropdown menu for the fire options.
|
||||
|
||||
Reference in New Issue
Block a user