🎉 Incinerate from pointer on kwin

This commit is contained in:
Simon Schneegans
2022-07-21 16:32:59 +02:00
parent ec1da1a3ea
commit 41dee16c12
2 changed files with 10 additions and 0 deletions
+3
View File
@@ -15,5 +15,8 @@
<entry name="Color" type="Color">
<default>#ffb47f</default>
</entry>
<entry name="UsePointer" type="Bool">
<default>true</default>
</entry>
</group>
</kcfg>
+7
View File
@@ -5,5 +5,12 @@ let seed = [Math.random(), Math.random()];
let startPos = seed[0] > seed[1] ? [seed[0], Math.floor(seed[1] + 0.5)] :
[Math.floor(seed[0] + 0.5), seed[1]];
if (effect.readConfig('UsePointer', true)) {
startPos = [
(effects.cursorPos.x - window.x) / window.width,
(effects.cursorPos.y - window.y) / window.height
];
}
effect.setUniform(this.shader, 'uSeed', seed);
effect.setUniform(this.shader, 'uStartPos', startPos);