From 5c58ccf2cf900b4c937c87ed7e9de3ec41e923cc Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Fri, 10 Jun 2022 16:08:05 +0200 Subject: [PATCH] :tada: Add fire kwin effect --- kwin/build.sh | 14 ++-- kwin/fire/config.ui | 132 +++++++++++++++++++++++++++++++++ kwin/fire/main.xml | 34 +++++++++ kwin/fire/onSettingsChanged.js | 13 ++++ 4 files changed, 186 insertions(+), 7 deletions(-) create mode 100755 kwin/fire/config.ui create mode 100755 kwin/fire/main.xml create mode 100644 kwin/fire/onSettingsChanged.js diff --git a/kwin/build.sh b/kwin/build.sh index dd163c5..8b87d49 100755 --- a/kwin/build.sh +++ b/kwin/build.sh @@ -105,10 +105,10 @@ generate() { tar -C "$BUILD_DIR" -czf "$DIR_NAME.tar.gz" "$DIR_NAME" } -generate "apparition" "Apparition [BMW]" "This effect hides your windows by violently sucking them into the void of magic" -generate "energize-a" "Energize A [BMW]" "Beam your windows away" -generate "energize-b" "Energize B [BMW]" "Using different transporter technology results in an alternative visual effect" -generate "hexagon" "Hexagon [BMW]" "With glowing lines and hexagon-shaped tiles, this effect looks very sci-fi" -generate "tv" "TV Effect [BMW]" "Make windows close like turning off a TV" -generate "wisps" "Wisps [BMW]" "Let your windows be carried away to the realm of dreams by these little fairies" -# generate "fire" "Fire" "Make windows burn" \ No newline at end of file +generate "apparition" "[BMW] Apparition" "This effect hides your windows by violently sucking them into the void of magic" +generate "energize-a" "[BMW] Energize A" "Beam your windows away" +generate "energize-b" "[BMW] Energize B" "Using different transporter technology results in an alternative visual effect" +generate "fire" "[BMW] Fire" "The classic effect inspired by Compiz" +generate "hexagon" "[BMW] Hexagon" "With glowing lines and hexagon-shaped tiles, this effect looks very sci-fi" +generate "tv" "[BMW] TV Effect" "Make windows close like turning off a TV" +generate "wisps" "[BMW] Wisps" "Let your windows be carried away to the realm of dreams by these little fairies" \ No newline at end of file diff --git a/kwin/fire/config.ui b/kwin/fire/config.ui new file mode 100755 index 0000000..3fa647c --- /dev/null +++ b/kwin/fire/config.ui @@ -0,0 +1,132 @@ + + + BMWConfigForm + + + + 0 + 0 + 562 + 365 + + + + + + + Line Color: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 1.000000000000000 + + + 5.000000000000000 + + + + + + + 0.100000000000000 + + + 10.000000000000000 + + + + + + + milliseconds + + + 100 + + + 9999 + + + 100 + + + + + + + Glow Color: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Line Width: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Duration: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Scale: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Additive Blending + + + + + + + true + + + + + + + true + + + + + + + + KColorButton + QPushButton +
kcolorbutton.h
+
+
+ + +
\ No newline at end of file diff --git a/kwin/fire/main.xml b/kwin/fire/main.xml new file mode 100755 index 0000000..78b042b --- /dev/null +++ b/kwin/fire/main.xml @@ -0,0 +1,34 @@ + + + + + + 1500 + + + 1 + + + 0.5 + + + #4c331900 + + + b4371ea0 + + + #ff4c26b5 + + + #ffa619ff + + + #ffffffff + + + false + + + \ No newline at end of file diff --git a/kwin/fire/onSettingsChanged.js b/kwin/fire/onSettingsChanged.js new file mode 100644 index 0000000..3b20add --- /dev/null +++ b/kwin/fire/onSettingsChanged.js @@ -0,0 +1,13 @@ +// This part is automatically included in the effect's source during the build process. +// The code below is called whenever the user changes something in the configuration of +// the effect. + +effect.setUniform(this.shader, 'u3DNoise', + effect.readConfig('3DNoise', true) ? 1.0 : 0.0); +effect.setUniform(this.shader, 'uScale', effect.readConfig('Scale', 1.0)); +effect.setUniform(this.shader, 'uMovementSpeed', effect.readConfig('MovementSpeed', 1.0)); +effect.setUniform(this.shader, 'uGradient1', effect.readConfig('Gradient1', 'white')); +effect.setUniform(this.shader, 'uGradient2', effect.readConfig('Gradient2', 'white')); +effect.setUniform(this.shader, 'uGradient3', effect.readConfig('Gradient3', 'white')); +effect.setUniform(this.shader, 'uGradient4', effect.readConfig('Gradient4', 'white')); +effect.setUniform(this.shader, 'uGradient5', effect.readConfig('Gradient5', 'white'));