From 4aef62b07ca8f750af5c86b02220d73faa442102 Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Sat, 25 Jun 2022 21:03:23 +0200 Subject: [PATCH] :beetle: Fix incinerate random seed on kwin --- kwin/incinerate/onAnimationBegin.js | 4 ++++ kwin/incinerate/onSettingsChanged.js | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 kwin/incinerate/onAnimationBegin.js diff --git a/kwin/incinerate/onAnimationBegin.js b/kwin/incinerate/onAnimationBegin.js new file mode 100644 index 0000000..12be257 --- /dev/null +++ b/kwin/incinerate/onAnimationBegin.js @@ -0,0 +1,4 @@ +// This part is automatically included in the effect's source during the build process. +// The code below is called whenever a window is closed or opened. + +effect.setUniform(this.shader, 'uSeed', [Math.random(), Math.random()]); diff --git a/kwin/incinerate/onSettingsChanged.js b/kwin/incinerate/onSettingsChanged.js index 8437459..e81ac40 100644 --- a/kwin/incinerate/onSettingsChanged.js +++ b/kwin/incinerate/onSettingsChanged.js @@ -2,7 +2,6 @@ // The code below is called whenever the user changes something in the configuration of // the effect. -effect.setUniform(this.shader, 'uSeed', [Math.random(), Math.random()]); effect.setUniform(this.shader, 'uDuration', this.duration * 0.001); effect.setUniform(this.shader, 'uColor', this.readRGBConfig('Color')); effect.setUniform(this.shader, 'uScale', effect.readConfig('Scale', 1.0));