🎉 Incinerate from pointer on kwin
This commit is contained in:
@@ -15,5 +15,8 @@
|
||||
<entry name="Color" type="Color">
|
||||
<default>#ffb47f</default>
|
||||
</entry>
|
||||
<entry name="UsePointer" type="Bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
||||
@@ -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);
|
||||
Reference in New Issue
Block a user