🔀 Merge pull request #265 from Schneegans/feature/glitch
@@ -35,6 +35,7 @@ Effect | Preview
|
||||
**Energize B** <br> Using different transporter technology results in an alternative visual effect. | <img src ="docs/pics/energizeB.gif" />
|
||||
**Fire** <br> The classic effect inspired by Compiz. However, this is implemented using a GLSL shader and not with a particle system like in the old days. | <img src ="docs/pics/fire.gif" />
|
||||
**Glide** <br> This very simple effect fades the window to transparency with subtle 3D effects. | <img src ="docs/pics/glide.gif" />
|
||||
**Glitch** <br> This effect applies some intentional graphics issues to your windows. | <img src ="docs/pics/glitch.gif" />
|
||||
**Hexagon** <br> With glowing lines and hexagon-shaped tiles, this effect looks very sci-fi. | <img src ="docs/pics/hexagon.gif" />
|
||||
**Incinerate** <br> A less snappy but definitely more fancy take on the fire effect. | <img src ="docs/pics/incinerate.gif" />
|
||||
**Matrix** <br> Turn your windows into a shower of green letters! The color is actually configurable.| <img src ="docs/pics/matrix.gif" />
|
||||
@@ -66,7 +67,8 @@ Below is a table which summarizes the current availability for all effects.
|
||||
<tr><td>Energize A</td> <td>✅</td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td><td>✅</td> </tr>
|
||||
<tr><td>Energize B</td> <td>✅</td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td><td>✅</td> </tr>
|
||||
<tr><td>Fire</td> <td>✅</td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td><td>✅</td> </tr>
|
||||
<tr><td>Glide</td> <td>✅</td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td><td>✅</td> </tr>
|
||||
<tr><td>Glide</td> <td>✅</td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td><td>✅</td> </tr>
|
||||
<tr><td>Glitch</td> <td>✅</td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td><td>✅</td> </tr>
|
||||
<tr><td>Hexagon</td> <td>✅</td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td><td>✅</td> </tr>
|
||||
<tr><td>Incinerate</td> <td>✅</td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td><td>✅</td> </tr>
|
||||
<tr><td>Matrix</td> <td> </td> <td> </td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td><td> </td> </tr>
|
||||
|
||||
@@ -9,6 +9,10 @@ SPDX-License-Identifier: CC-BY-4.0
|
||||
|
||||
**Release Date:** TBD
|
||||
|
||||
#### New Features
|
||||
|
||||
* **New Effect: Glitch.** This effect applies some intentional graphics issues to your windows.
|
||||
|
||||
#### Other Enhancements
|
||||
|
||||
* The menu button of the settings dialog has been moved to the left and now shows a heart instead of three dots.
|
||||
|
||||
|
After Width: | Height: | Size: 387 KiB |
@@ -58,6 +58,7 @@ class Extension {
|
||||
new Me.imports.src.EnergizeB.EnergizeB(),
|
||||
new Me.imports.src.Fire.Fire(),
|
||||
new Me.imports.src.Glide.Glide(),
|
||||
new Me.imports.src.Glitch.Glitch(),
|
||||
new Me.imports.src.Hexagon.Hexagon(),
|
||||
new Me.imports.src.Incinerate.Incinerate(),
|
||||
new Me.imports.src.Matrix.Matrix(),
|
||||
|
||||
@@ -123,16 +123,12 @@ generate() {
|
||||
}
|
||||
|
||||
# Now run the above method for all supported effects.
|
||||
|
||||
# The apparition effect is disabled for now. I have not yet found a way to upscale the
|
||||
# window canvas during the animation.
|
||||
#generate "apparition" "[BMW] Apparition" "This effect hides your windows by violently sucking them into the void of magic"
|
||||
|
||||
generate "energize-a" "Energize A [Burn-My-Windows]" "Beam your windows away"
|
||||
generate "energize-b" "Energize B [Burn-My-Windows]" "Using different transporter technology results in an alternative visual effect"
|
||||
generate "doom" "Doom [Burn-My-Windows]" "Melt your windows"
|
||||
generate "fire" "Fire [Burn-My-Windows]" "The classic effect inspired by Compiz"
|
||||
generate "glide" "Glide [Burn-My-Windows]" "Fade the window to transparency with subtle 3D effects"
|
||||
generate "glitch" "Glitch [Burn-My-Windows]" "This effect applies some intentional graphics issues to your windows"
|
||||
generate "hexagon" "Hexagon [Burn-My-Windows]" "With glowing lines and hexagon-shaped tiles, this effect looks very sci-fi"
|
||||
generate "incinerate" "Incinerate [Burn-My-Windows]" "A less snappy but definitely more fancy take on the fire effect"
|
||||
generate "pixelate" "Pixelate [Burn-My-Windows]" "Pixelate the window and randomly hide the pixels"
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
<ui version="4.0">
|
||||
<class>BMWConfigForm</class>
|
||||
<widget class="QWidget" name="BMWConfigForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>562</width>
|
||||
<height>365</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Scale:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>kcfg_Color</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Color:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>kcfg_Color</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Duration:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="KColorButton" name="kcfg_Color">
|
||||
<property name="alphaChannelEnabled" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="kcfg_Duration">
|
||||
<property name="suffix">
|
||||
<string> milliseconds</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>9999</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Strength</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Speed</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="kcfg_Scale">
|
||||
<property name="minimum">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="kcfg_Strength">
|
||||
<property name="minimum">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QDoubleSpinBox" name="kcfg_Speed">
|
||||
<property name="minimum">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>KColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>kcolorbutton.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
|
||||
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd">
|
||||
<kcfgfile name="" />
|
||||
<group name="">
|
||||
<entry name="Duration" type="UInt">
|
||||
<default>750</default>
|
||||
</entry>
|
||||
<entry name="Scale" type="Double">
|
||||
<default>1</default>
|
||||
</entry>
|
||||
<entry name="Strength" type="Double">
|
||||
<default>2</default>
|
||||
</entry>
|
||||
<entry name="Speed" type="Double">
|
||||
<default>2</default>
|
||||
</entry>
|
||||
<entry name="Color" type="Color">
|
||||
<default>#64A0FF</default>
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
||||
@@ -0,0 +1,7 @@
|
||||
// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// 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());
|
||||
@@ -0,0 +1,12 @@
|
||||
// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// 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, 'uDuration', this.duration * 0.001);
|
||||
effect.setUniform(this.shader, 'uScale', effect.readConfig('Scale', 1.0));
|
||||
effect.setUniform(this.shader, 'uStrength', effect.readConfig('Strength', 1.0));
|
||||
effect.setUniform(this.shader, 'uSpeed', effect.readConfig('Speed', 1.0));
|
||||
effect.setUniform(this.shader, 'uColor', this.readRGBConfig('Color'));
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: burn-my-windows\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-12-23 11:04+0100\n"
|
||||
"POT-Creation-Date: 2023-01-03 13:46+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -65,6 +65,10 @@ msgstr ""
|
||||
msgid "Glide"
|
||||
msgstr ""
|
||||
|
||||
#: src/Glitch.js:89
|
||||
msgid "Glitch"
|
||||
msgstr ""
|
||||
|
||||
#: src/Hexagon.js:98
|
||||
msgid "Hexagon"
|
||||
msgstr ""
|
||||
@@ -89,7 +93,7 @@ msgstr ""
|
||||
msgid "Pixel Wipe"
|
||||
msgstr ""
|
||||
|
||||
#: src/Portal.js:89
|
||||
#: src/Portal.js:91
|
||||
msgid "Portal"
|
||||
msgstr ""
|
||||
|
||||
@@ -109,50 +113,50 @@ msgstr ""
|
||||
msgid "Wisps"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:121
|
||||
#: prefs.js:122
|
||||
msgid "Effects"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:163 resources/ui/gtk4/effectPage.ui:43
|
||||
#: prefs.js:164 resources/ui/gtk4/effectPage.ui:43
|
||||
#: resources/ui/gtk3/effectPage.ui:43
|
||||
msgid "Preview this effect"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:198
|
||||
#: prefs.js:199
|
||||
msgid "Use this effect when opening windows"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:199
|
||||
#: prefs.js:200
|
||||
msgid "Use this effect when closing windows"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:225
|
||||
#: prefs.js:226
|
||||
msgid "General Options"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:319
|
||||
#: prefs.js:320
|
||||
msgid "Gold Sponsors"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:322
|
||||
#: prefs.js:323
|
||||
msgid "Silver Sponsors"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:325
|
||||
#: prefs.js:326
|
||||
msgid "Bronze Sponsors"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:328
|
||||
#: prefs.js:329
|
||||
msgid "Past Sponsors"
|
||||
msgstr ""
|
||||
|
||||
#. Translators: %s will be replaced by the effect's name.
|
||||
#: prefs.js:535
|
||||
#: prefs.js:536
|
||||
#, javascript-format
|
||||
msgid "Preview for %s"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:557
|
||||
#: prefs.js:558
|
||||
msgid "Close this Window to Preview the Effect!"
|
||||
msgstr ""
|
||||
|
||||
@@ -189,14 +193,15 @@ msgstr ""
|
||||
#: resources/ui/gtk4/Fire.ui:55 resources/ui/gtk4/SnapOfDisintegration.ui:30
|
||||
#: resources/ui/gtk4/Glide.ui:30 resources/ui/gtk4/PixelWipe.ui:30
|
||||
#: resources/ui/gtk4/TRexAttack.ui:30 resources/ui/gtk4/PixelWheel.ui:30
|
||||
#: resources/ui/gtk4/Doom.ui:30 resources/ui/gtk4/TVEffect.ui:30
|
||||
#: resources/ui/gtk4/EnergizeA.ui:30 resources/ui/gtk4/Hexagon.ui:30
|
||||
#: resources/ui/gtk4/EnergizeB.ui:30 resources/ui/gtk4/Pixelate.ui:30
|
||||
#: resources/ui/gtk4/Apparition.ui:30 resources/ui/gtk4/Portal.ui:30
|
||||
#: resources/ui/gtk3/Incinerate.ui:55 resources/ui/gtk3/Wisps.ui:48
|
||||
#: resources/ui/gtk3/Fire.ui:99 resources/ui/gtk3/Glide.ui:69
|
||||
#: resources/ui/gtk3/PixelWipe.ui:55 resources/ui/gtk3/PixelWheel.ui:55
|
||||
#: resources/ui/gtk3/Doom.ui:62 resources/ui/gtk3/TVEffect.ui:41
|
||||
#: resources/ui/gtk4/Doom.ui:30 resources/ui/gtk4/Glitch.ui:30
|
||||
#: resources/ui/gtk4/TVEffect.ui:30 resources/ui/gtk4/EnergizeA.ui:30
|
||||
#: resources/ui/gtk4/Hexagon.ui:30 resources/ui/gtk4/EnergizeB.ui:30
|
||||
#: resources/ui/gtk4/Pixelate.ui:30 resources/ui/gtk4/Apparition.ui:30
|
||||
#: resources/ui/gtk4/Portal.ui:30 resources/ui/gtk3/Incinerate.ui:55
|
||||
#: resources/ui/gtk3/Wisps.ui:48 resources/ui/gtk3/Fire.ui:99
|
||||
#: resources/ui/gtk3/Glide.ui:69 resources/ui/gtk3/PixelWipe.ui:55
|
||||
#: resources/ui/gtk3/PixelWheel.ui:55 resources/ui/gtk3/Doom.ui:62
|
||||
#: resources/ui/gtk3/Glitch.ui:62 resources/ui/gtk3/TVEffect.ui:41
|
||||
#: resources/ui/gtk3/EnergizeA.ui:48 resources/ui/gtk3/Hexagon.ui:55
|
||||
#: resources/ui/gtk3/EnergizeB.ui:48 resources/ui/gtk3/Pixelate.ui:55
|
||||
#: resources/ui/gtk3/Apparition.ui:69 resources/ui/gtk3/Portal.ui:62
|
||||
@@ -205,10 +210,11 @@ msgstr ""
|
||||
#: resources/ui/adw/Fire.ui:30 resources/ui/adw/SnapOfDisintegration.ui:14
|
||||
#: resources/ui/adw/Glide.ui:14 resources/ui/adw/PixelWipe.ui:14
|
||||
#: resources/ui/adw/TRexAttack.ui:14 resources/ui/adw/PixelWheel.ui:14
|
||||
#: resources/ui/adw/Doom.ui:14 resources/ui/adw/TVEffect.ui:14
|
||||
#: resources/ui/adw/EnergizeA.ui:14 resources/ui/adw/Hexagon.ui:14
|
||||
#: resources/ui/adw/EnergizeB.ui:15 resources/ui/adw/Pixelate.ui:14
|
||||
#: resources/ui/adw/Apparition.ui:15 resources/ui/adw/Portal.ui:14
|
||||
#: resources/ui/adw/Doom.ui:14 resources/ui/adw/Glitch.ui:14
|
||||
#: resources/ui/adw/TVEffect.ui:14 resources/ui/adw/EnergizeA.ui:14
|
||||
#: resources/ui/adw/Hexagon.ui:14 resources/ui/adw/EnergizeB.ui:15
|
||||
#: resources/ui/adw/Pixelate.ui:14 resources/ui/adw/Apparition.ui:15
|
||||
#: resources/ui/adw/Portal.ui:14
|
||||
msgid "Animation Time [ms]"
|
||||
msgstr ""
|
||||
|
||||
@@ -233,35 +239,40 @@ msgstr ""
|
||||
#: resources/ui/gtk4/PixelWheel.ui:58 resources/ui/gtk4/PixelWheel.ui:104
|
||||
#: resources/ui/gtk4/PixelWheel.ui:150 resources/ui/gtk4/Doom.ui:58
|
||||
#: resources/ui/gtk4/Doom.ui:104 resources/ui/gtk4/Doom.ui:150
|
||||
#: resources/ui/gtk4/Doom.ui:196 resources/ui/gtk4/TVEffect.ui:58
|
||||
#: resources/ui/gtk4/TVEffect.ui:92 resources/ui/gtk4/EnergizeA.ui:58
|
||||
#: resources/ui/gtk4/EnergizeA.ui:104 resources/ui/gtk4/EnergizeA.ui:138
|
||||
#: resources/ui/gtk4/Hexagon.ui:58 resources/ui/gtk4/Hexagon.ui:104
|
||||
#: resources/ui/gtk4/Hexagon.ui:150 resources/ui/gtk4/Hexagon.ui:184
|
||||
#: resources/ui/gtk4/Hexagon.ui:218 resources/ui/gtk4/Hexagon.ui:271
|
||||
#: resources/ui/gtk4/EnergizeB.ui:58 resources/ui/gtk4/EnergizeB.ui:104
|
||||
#: resources/ui/gtk4/EnergizeB.ui:138 resources/ui/gtk4/Pixelate.ui:58
|
||||
#: resources/ui/gtk4/Pixelate.ui:104 resources/ui/gtk4/Pixelate.ui:150
|
||||
#: resources/ui/gtk4/prefs.ui:172 resources/ui/gtk4/prefs.ui:206
|
||||
#: resources/ui/gtk4/Apparition.ui:58 resources/ui/gtk4/Apparition.ui:104
|
||||
#: resources/ui/gtk4/Apparition.ui:150 resources/ui/gtk4/Apparition.ui:196
|
||||
#: resources/ui/gtk4/Apparition.ui:242 resources/ui/gtk4/Portal.ui:58
|
||||
#: resources/ui/gtk4/Portal.ui:104 resources/ui/gtk4/Portal.ui:150
|
||||
#: resources/ui/gtk4/Portal.ui:196 resources/ui/gtk4/Portal.ui:230
|
||||
#: resources/ui/gtk3/Incinerate.ui:81 resources/ui/gtk3/Incinerate.ui:130
|
||||
#: resources/ui/gtk3/Incinerate.ui:179 resources/ui/gtk3/Incinerate.ui:241
|
||||
#: resources/ui/gtk3/Incinerate.ui:284 resources/ui/gtk3/Wisps.ui:74
|
||||
#: resources/ui/gtk3/Wisps.ui:123 resources/ui/gtk3/Wisps.ui:166
|
||||
#: resources/ui/gtk3/Fire.ui:125 resources/ui/gtk3/Fire.ui:173
|
||||
#: resources/ui/gtk3/Fire.ui:221 resources/ui/gtk3/Fire.ui:283
|
||||
#: resources/ui/gtk3/Fire.ui:351 resources/ui/gtk3/Glide.ui:95
|
||||
#: resources/ui/gtk3/Glide.ui:144 resources/ui/gtk3/Glide.ui:193
|
||||
#: resources/ui/gtk3/Glide.ui:242 resources/ui/gtk3/Glide.ui:291
|
||||
#: resources/ui/gtk3/PixelWipe.ui:81 resources/ui/gtk3/PixelWipe.ui:130
|
||||
#: resources/ui/gtk3/PixelWheel.ui:81 resources/ui/gtk3/PixelWheel.ui:130
|
||||
#: resources/ui/gtk3/PixelWheel.ui:179 resources/ui/gtk3/Doom.ui:88
|
||||
#: resources/ui/gtk3/Doom.ui:137 resources/ui/gtk3/Doom.ui:186
|
||||
#: resources/ui/gtk3/Doom.ui:235 resources/ui/gtk3/TVEffect.ui:67
|
||||
#: resources/ui/gtk4/Doom.ui:196 resources/ui/gtk4/Glitch.ui:58
|
||||
#: resources/ui/gtk4/Glitch.ui:104 resources/ui/gtk4/Glitch.ui:150
|
||||
#: resources/ui/gtk4/Glitch.ui:196 resources/ui/gtk4/Glitch.ui:230
|
||||
#: resources/ui/gtk4/TVEffect.ui:58 resources/ui/gtk4/TVEffect.ui:92
|
||||
#: resources/ui/gtk4/EnergizeA.ui:58 resources/ui/gtk4/EnergizeA.ui:104
|
||||
#: resources/ui/gtk4/EnergizeA.ui:138 resources/ui/gtk4/Hexagon.ui:58
|
||||
#: resources/ui/gtk4/Hexagon.ui:104 resources/ui/gtk4/Hexagon.ui:150
|
||||
#: resources/ui/gtk4/Hexagon.ui:184 resources/ui/gtk4/Hexagon.ui:218
|
||||
#: resources/ui/gtk4/Hexagon.ui:271 resources/ui/gtk4/EnergizeB.ui:58
|
||||
#: resources/ui/gtk4/EnergizeB.ui:104 resources/ui/gtk4/EnergizeB.ui:138
|
||||
#: resources/ui/gtk4/Pixelate.ui:58 resources/ui/gtk4/Pixelate.ui:104
|
||||
#: resources/ui/gtk4/Pixelate.ui:150 resources/ui/gtk4/prefs.ui:172
|
||||
#: resources/ui/gtk4/prefs.ui:206 resources/ui/gtk4/Apparition.ui:58
|
||||
#: resources/ui/gtk4/Apparition.ui:104 resources/ui/gtk4/Apparition.ui:150
|
||||
#: resources/ui/gtk4/Apparition.ui:196 resources/ui/gtk4/Apparition.ui:242
|
||||
#: resources/ui/gtk4/Portal.ui:58 resources/ui/gtk4/Portal.ui:104
|
||||
#: resources/ui/gtk4/Portal.ui:150 resources/ui/gtk4/Portal.ui:196
|
||||
#: resources/ui/gtk4/Portal.ui:230 resources/ui/gtk3/Incinerate.ui:81
|
||||
#: resources/ui/gtk3/Incinerate.ui:130 resources/ui/gtk3/Incinerate.ui:179
|
||||
#: resources/ui/gtk3/Incinerate.ui:241 resources/ui/gtk3/Incinerate.ui:284
|
||||
#: resources/ui/gtk3/Wisps.ui:74 resources/ui/gtk3/Wisps.ui:123
|
||||
#: resources/ui/gtk3/Wisps.ui:166 resources/ui/gtk3/Fire.ui:125
|
||||
#: resources/ui/gtk3/Fire.ui:173 resources/ui/gtk3/Fire.ui:221
|
||||
#: resources/ui/gtk3/Fire.ui:283 resources/ui/gtk3/Fire.ui:351
|
||||
#: resources/ui/gtk3/Glide.ui:95 resources/ui/gtk3/Glide.ui:144
|
||||
#: resources/ui/gtk3/Glide.ui:193 resources/ui/gtk3/Glide.ui:242
|
||||
#: resources/ui/gtk3/Glide.ui:291 resources/ui/gtk3/PixelWipe.ui:81
|
||||
#: resources/ui/gtk3/PixelWipe.ui:130 resources/ui/gtk3/PixelWheel.ui:81
|
||||
#: resources/ui/gtk3/PixelWheel.ui:130 resources/ui/gtk3/PixelWheel.ui:179
|
||||
#: resources/ui/gtk3/Doom.ui:88 resources/ui/gtk3/Doom.ui:137
|
||||
#: resources/ui/gtk3/Doom.ui:186 resources/ui/gtk3/Doom.ui:235
|
||||
#: resources/ui/gtk3/Glitch.ui:88 resources/ui/gtk3/Glitch.ui:137
|
||||
#: resources/ui/gtk3/Glitch.ui:186 resources/ui/gtk3/Glitch.ui:235
|
||||
#: resources/ui/gtk3/Glitch.ui:278 resources/ui/gtk3/TVEffect.ui:67
|
||||
#: resources/ui/gtk3/TVEffect.ui:110 resources/ui/gtk3/EnergizeA.ui:74
|
||||
#: resources/ui/gtk3/EnergizeA.ui:123 resources/ui/gtk3/EnergizeA.ui:166
|
||||
#: resources/ui/gtk3/Hexagon.ui:81 resources/ui/gtk3/Hexagon.ui:130
|
||||
@@ -297,38 +308,42 @@ msgstr ""
|
||||
#: resources/ui/adw/PixelWheel.ui:36 resources/ui/adw/PixelWheel.ui:69
|
||||
#: resources/ui/adw/PixelWheel.ui:102 resources/ui/adw/Doom.ui:36
|
||||
#: resources/ui/adw/Doom.ui:69 resources/ui/adw/Doom.ui:102
|
||||
#: resources/ui/adw/Doom.ui:135 resources/ui/adw/TVEffect.ui:36
|
||||
#: resources/ui/adw/TVEffect.ui:61 resources/ui/adw/EnergizeA.ui:36
|
||||
#: resources/ui/adw/EnergizeA.ui:69 resources/ui/adw/EnergizeA.ui:94
|
||||
#: resources/ui/adw/Hexagon.ui:36 resources/ui/adw/Hexagon.ui:69
|
||||
#: resources/ui/adw/Hexagon.ui:102 resources/ui/adw/Hexagon.ui:127
|
||||
#: resources/ui/adw/Hexagon.ui:152 resources/ui/adw/Hexagon.ui:175
|
||||
#: resources/ui/adw/EnergizeB.ui:37 resources/ui/adw/EnergizeB.ui:70
|
||||
#: resources/ui/adw/EnergizeB.ui:95 resources/ui/adw/Pixelate.ui:36
|
||||
#: resources/ui/adw/Pixelate.ui:69 resources/ui/adw/Pixelate.ui:102
|
||||
#: resources/ui/adw/prefs.ui:63 resources/ui/adw/prefs.ui:85
|
||||
#: resources/ui/adw/Apparition.ui:37 resources/ui/adw/Apparition.ui:70
|
||||
#: resources/ui/adw/Apparition.ui:103 resources/ui/adw/Apparition.ui:136
|
||||
#: resources/ui/adw/Apparition.ui:169 resources/ui/adw/Portal.ui:36
|
||||
#: resources/ui/adw/Portal.ui:69 resources/ui/adw/Portal.ui:102
|
||||
#: resources/ui/adw/Portal.ui:135 resources/ui/adw/Portal.ui:160
|
||||
#: resources/ui/adw/Doom.ui:135 resources/ui/adw/Glitch.ui:36
|
||||
#: resources/ui/adw/Glitch.ui:69 resources/ui/adw/Glitch.ui:102
|
||||
#: resources/ui/adw/Glitch.ui:135 resources/ui/adw/Glitch.ui:160
|
||||
#: resources/ui/adw/TVEffect.ui:36 resources/ui/adw/TVEffect.ui:61
|
||||
#: resources/ui/adw/EnergizeA.ui:36 resources/ui/adw/EnergizeA.ui:69
|
||||
#: resources/ui/adw/EnergizeA.ui:94 resources/ui/adw/Hexagon.ui:36
|
||||
#: resources/ui/adw/Hexagon.ui:69 resources/ui/adw/Hexagon.ui:102
|
||||
#: resources/ui/adw/Hexagon.ui:127 resources/ui/adw/Hexagon.ui:152
|
||||
#: resources/ui/adw/Hexagon.ui:175 resources/ui/adw/EnergizeB.ui:37
|
||||
#: resources/ui/adw/EnergizeB.ui:70 resources/ui/adw/EnergizeB.ui:95
|
||||
#: resources/ui/adw/Pixelate.ui:36 resources/ui/adw/Pixelate.ui:69
|
||||
#: resources/ui/adw/Pixelate.ui:102 resources/ui/adw/prefs.ui:63
|
||||
#: resources/ui/adw/prefs.ui:85 resources/ui/adw/Apparition.ui:37
|
||||
#: resources/ui/adw/Apparition.ui:70 resources/ui/adw/Apparition.ui:103
|
||||
#: resources/ui/adw/Apparition.ui:136 resources/ui/adw/Apparition.ui:169
|
||||
#: resources/ui/adw/Portal.ui:36 resources/ui/adw/Portal.ui:69
|
||||
#: resources/ui/adw/Portal.ui:102 resources/ui/adw/Portal.ui:135
|
||||
#: resources/ui/adw/Portal.ui:160
|
||||
msgid "Reset to Default Value"
|
||||
msgstr ""
|
||||
|
||||
#: resources/ui/gtk4/Matrix.ui:76 resources/ui/gtk4/BrokenGlass.ui:76
|
||||
#: resources/ui/gtk4/Incinerate.ui:76 resources/ui/gtk4/Wisps.ui:76
|
||||
#: resources/ui/gtk4/Fire.ui:101 resources/ui/gtk4/SnapOfDisintegration.ui:76
|
||||
#: resources/ui/gtk4/Glide.ui:76 resources/ui/gtk4/EnergizeA.ui:76
|
||||
#: resources/ui/gtk4/Hexagon.ui:76 resources/ui/gtk4/EnergizeB.ui:76
|
||||
#: resources/ui/gtk3/Incinerate.ui:104 resources/ui/gtk3/Wisps.ui:97
|
||||
#: resources/ui/gtk3/Fire.ui:147 resources/ui/gtk3/Glide.ui:118
|
||||
#: resources/ui/gtk4/Glide.ui:76 resources/ui/gtk4/Glitch.ui:76
|
||||
#: resources/ui/gtk4/EnergizeA.ui:76 resources/ui/gtk4/Hexagon.ui:76
|
||||
#: resources/ui/gtk4/EnergizeB.ui:76 resources/ui/gtk3/Incinerate.ui:104
|
||||
#: resources/ui/gtk3/Wisps.ui:97 resources/ui/gtk3/Fire.ui:147
|
||||
#: resources/ui/gtk3/Glide.ui:118 resources/ui/gtk3/Glitch.ui:111
|
||||
#: resources/ui/gtk3/EnergizeA.ui:97 resources/ui/gtk3/Hexagon.ui:104
|
||||
#: resources/ui/gtk3/EnergizeB.ui:97 resources/ui/adw/Matrix.ui:47
|
||||
#: resources/ui/adw/BrokenGlass.ui:48 resources/ui/adw/Incinerate.ui:47
|
||||
#: resources/ui/adw/Wisps.ui:47 resources/ui/adw/Fire.ui:63
|
||||
#: resources/ui/adw/SnapOfDisintegration.ui:47 resources/ui/adw/Glide.ui:47
|
||||
#: resources/ui/adw/EnergizeA.ui:47 resources/ui/adw/Hexagon.ui:47
|
||||
#: resources/ui/adw/EnergizeB.ui:48
|
||||
#: resources/ui/adw/Glitch.ui:47 resources/ui/adw/EnergizeA.ui:47
|
||||
#: resources/ui/adw/Hexagon.ui:47 resources/ui/adw/EnergizeB.ui:48
|
||||
msgid "Scale"
|
||||
msgstr ""
|
||||
|
||||
@@ -385,15 +400,16 @@ msgstr ""
|
||||
|
||||
#: resources/ui/gtk4/Incinerate.ui:221 resources/ui/gtk4/Wisps.ui:122
|
||||
#: resources/ui/gtk4/SnapOfDisintegration.ui:122
|
||||
#: resources/ui/gtk4/TVEffect.ui:76 resources/ui/gtk4/EnergizeA.ui:122
|
||||
#: resources/ui/gtk4/EnergizeB.ui:122 resources/ui/gtk4/Portal.ui:214
|
||||
#: resources/ui/gtk3/Incinerate.ui:263 resources/ui/gtk3/Wisps.ui:145
|
||||
#: resources/ui/gtk4/Glitch.ui:214 resources/ui/gtk4/TVEffect.ui:76
|
||||
#: resources/ui/gtk4/EnergizeA.ui:122 resources/ui/gtk4/EnergizeB.ui:122
|
||||
#: resources/ui/gtk4/Portal.ui:214 resources/ui/gtk3/Incinerate.ui:263
|
||||
#: resources/ui/gtk3/Wisps.ui:145 resources/ui/gtk3/Glitch.ui:257
|
||||
#: resources/ui/gtk3/TVEffect.ui:89 resources/ui/gtk3/EnergizeA.ui:145
|
||||
#: resources/ui/gtk3/EnergizeB.ui:145 resources/ui/gtk3/Portal.ui:261
|
||||
#: resources/ui/adw/Incinerate.ui:136 resources/ui/adw/Wisps.ui:80
|
||||
#: resources/ui/adw/SnapOfDisintegration.ui:80 resources/ui/adw/TVEffect.ui:47
|
||||
#: resources/ui/adw/EnergizeA.ui:80 resources/ui/adw/EnergizeB.ui:81
|
||||
#: resources/ui/adw/Portal.ui:146
|
||||
#: resources/ui/adw/SnapOfDisintegration.ui:80 resources/ui/adw/Glitch.ui:146
|
||||
#: resources/ui/adw/TVEffect.ui:47 resources/ui/adw/EnergizeA.ui:80
|
||||
#: resources/ui/adw/EnergizeB.ui:81 resources/ui/adw/Portal.ui:146
|
||||
msgid "Color"
|
||||
msgstr ""
|
||||
|
||||
@@ -402,8 +418,9 @@ msgstr ""
|
||||
msgid "Presets"
|
||||
msgstr ""
|
||||
|
||||
#: resources/ui/gtk4/Fire.ui:147 resources/ui/gtk3/Fire.ui:195
|
||||
#: resources/ui/adw/Fire.ui:96
|
||||
#: resources/ui/gtk4/Fire.ui:147 resources/ui/gtk4/Glitch.ui:168
|
||||
#: resources/ui/gtk3/Fire.ui:195 resources/ui/gtk3/Glitch.ui:209
|
||||
#: resources/ui/adw/Fire.ui:96 resources/ui/adw/Glitch.ui:113
|
||||
msgid "Speed"
|
||||
msgstr ""
|
||||
|
||||
@@ -477,6 +494,11 @@ msgstr ""
|
||||
msgid "Vertical Scale"
|
||||
msgstr ""
|
||||
|
||||
#: resources/ui/gtk4/Glitch.ui:122 resources/ui/gtk3/Glitch.ui:160
|
||||
#: resources/ui/adw/Glitch.ui:80
|
||||
msgid "Strength"
|
||||
msgstr ""
|
||||
|
||||
#: resources/ui/gtk4/Hexagon.ui:122 resources/ui/gtk3/Hexagon.ui:153
|
||||
#: resources/ui/adw/Hexagon.ui:80
|
||||
msgid "Mesh Line Width"
|
||||
|
||||
@@ -54,6 +54,7 @@ var PreferencesDialog = class PreferencesDialog {
|
||||
new Me.imports.src.EnergizeB.EnergizeB(),
|
||||
new Me.imports.src.Fire.Fire(),
|
||||
new Me.imports.src.Glide.Glide(),
|
||||
new Me.imports.src.Glitch.Glitch(),
|
||||
new Me.imports.src.Hexagon.Hexagon(),
|
||||
new Me.imports.src.Incinerate.Incinerate(),
|
||||
new Me.imports.src.Matrix.Matrix(),
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// ) ( //
|
||||
// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
|
||||
// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
|
||||
// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
|
||||
// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
|
||||
// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
|
||||
// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
|
||||
// |__/ //
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// The content from common.glsl is automatically prepended to each shader effect.
|
||||
|
||||
uniform vec3 uColor;
|
||||
uniform float uSeed;
|
||||
uniform float uScale;
|
||||
uniform float uStrength;
|
||||
uniform float uSpeed;
|
||||
|
||||
// Somewhat inspired by https://www.shadertoy.com/view/XtK3W3
|
||||
void main() {
|
||||
float progress = easeInQuad(uForOpening ? 1.0 - uProgress : uProgress);
|
||||
float time = progress * uDuration * uSpeed;
|
||||
float strength = uStrength * progress;
|
||||
float displace = 1000.0 * strength / uSize.x;
|
||||
float yPos = uScale * uSize.y * (iTexCoord.y + uSeed * 10.0);
|
||||
|
||||
// Create large noise waves and add some smaller noise waves.
|
||||
float noise = clamp(simplex2D(vec2(time, yPos * 0.002)) - 0.5, 0.0, 1.0);
|
||||
noise += (simplex2D(vec2(time * 10.0, yPos * 0.05)) - 0.5) * 0.15;
|
||||
|
||||
// Apply the noise as x displacement for every line.
|
||||
float xPos = clamp(iTexCoord.x - displace * noise * noise, 0.0, 1.0);
|
||||
vec4 oColor = getInputColor(vec2(xPos, iTexCoord.y));
|
||||
|
||||
// Mix in some random interference lines.
|
||||
vec3 interference = uColor * hash12(vec2(yPos * time));
|
||||
float interferenceStrength = noise * min(strength, 1.0);
|
||||
oColor.rgb = mix(oColor.rgb, interference, interferenceStrength);
|
||||
|
||||
// Mix in some grainy noise.
|
||||
vec3 grain = uColor * simplex2D(uSize * iTexCoord + vec2(time * 100.0));
|
||||
float grainStrength = 0.2 * min(strength, 1.0);
|
||||
oColor.rgb = mix(oColor.rgb, grain, grainStrength);
|
||||
|
||||
// Add a subtle line pattern every 4 pixels.
|
||||
if (floor(mod(yPos * 0.25, 2.0)) == 0.0) {
|
||||
oColor.rgb = mix(uColor, oColor.rgb, 1.0 - (0.15 * noise));
|
||||
}
|
||||
|
||||
// Shift green/blue channels.
|
||||
float offset = 0.1 * noise * displace;
|
||||
oColor.g = mix(oColor.g, getInputColor(vec2(xPos + offset, iTexCoord.y)).g, 0.25);
|
||||
oColor.b = mix(oColor.b, getInputColor(vec2(xPos - offset, iTexCoord.y)).b, 0.25);
|
||||
|
||||
// Dissolve the window.
|
||||
float fadeDelay = 2.0;
|
||||
float alpha = clamp(noise + 1.0 + fadeDelay - (3.0 + fadeDelay) * progress, 0.0, 1.0);
|
||||
oColor.a *= alpha;
|
||||
|
||||
setOutputColor(oColor);
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
<interface domain="burn-my-windows">
|
||||
|
||||
<object class="AdwExpanderRow" id="glitch-prefs">
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Animation Time [ms]</property>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="valign">center</property>
|
||||
<property name="draw-value">1</property>
|
||||
<property name="digits">0</property>
|
||||
<property name="value-pos">left</property>
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">
|
||||
<object class="GtkAdjustment" id="glitch-animation-time">
|
||||
<property name="upper">2000</property>
|
||||
<property name="lower">100</property>
|
||||
<property name="step-increment">1</property>
|
||||
<property name="page-increment">100</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-animation-time">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Scale</property>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="valign">center</property>
|
||||
<property name="draw-value">1</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="value-pos">left</property>
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">
|
||||
<object class="GtkAdjustment" id="glitch-scale">
|
||||
<property name="upper">10</property>
|
||||
<property name="lower">0.1</property>
|
||||
<property name="step-increment">0.01</property>
|
||||
<property name="page-increment">0.1</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-scale">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Strength</property>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="valign">center</property>
|
||||
<property name="draw-value">1</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="value-pos">left</property>
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">
|
||||
<object class="GtkAdjustment" id="glitch-strength">
|
||||
<property name="upper">10</property>
|
||||
<property name="lower">0.1</property>
|
||||
<property name="step-increment">0.01</property>
|
||||
<property name="page-increment">0.1</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-strength">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Speed</property>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="valign">center</property>
|
||||
<property name="draw-value">1</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="value-pos">left</property>
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">
|
||||
<object class="GtkAdjustment" id="glitch-speed">
|
||||
<property name="upper">10</property>
|
||||
<property name="lower">0.1</property>
|
||||
<property name="step-increment">0.01</property>
|
||||
<property name="page-increment">0.1</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-speed">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Color</property>
|
||||
<property name="activatable-widget">glitch-color</property>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="glitch-color">
|
||||
<property name="valign">center</property>
|
||||
<property name="width-request">250</property>
|
||||
<property name="use_alpha">0</property>
|
||||
<property name="show_editor">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-color">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
|
||||
</interface>
|
||||
@@ -0,0 +1,297 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
<interface domain="burn-my-windows">
|
||||
|
||||
<object class="GtkAdjustment" id="glitch-animation-time">
|
||||
<property name="upper">2000</property>
|
||||
<property name="lower">100</property>
|
||||
<property name="step-increment">1</property>
|
||||
<property name="page-increment">100</property>
|
||||
</object>
|
||||
|
||||
<object class="GtkAdjustment" id="glitch-scale">
|
||||
<property name="upper">10</property>
|
||||
<property name="lower">0.1</property>
|
||||
<property name="step-increment">0.01</property>
|
||||
<property name="page-increment">0.1</property>
|
||||
</object>
|
||||
|
||||
<object class="GtkAdjustment" id="glitch-strength">
|
||||
<property name="upper">10</property>
|
||||
<property name="lower">0.1</property>
|
||||
<property name="step-increment">0.01</property>
|
||||
<property name="page-increment">0.1</property>
|
||||
</object>
|
||||
|
||||
<object class="GtkAdjustment" id="glitch-speed">
|
||||
<property name="upper">10</property>
|
||||
<property name="lower">0.1</property>
|
||||
<property name="step-increment">0.01</property>
|
||||
<property name="page-increment">0.1</property>
|
||||
</object>
|
||||
|
||||
<object class="GtkBox" id="glitch-prefs">
|
||||
<property name="orientation">vertical</property>
|
||||
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="selection-mode">none</property>
|
||||
<style>
|
||||
<class name="rich-list" />
|
||||
</style>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Animation Time [ms]</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="draw-value">1</property>
|
||||
<property name="digits">0</property>
|
||||
<property name="value-pos">left</property>
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">glitch-animation-time</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-animation-time">
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Scale</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="draw-value">1</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="value-pos">left</property>
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">glitch-scale</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-scale">
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Strength</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="draw-value">1</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="value-pos">left</property>
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">glitch-strength</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-strength">
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Speed</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="draw-value">1</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="value-pos">left</property>
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">glitch-speed</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-speed">
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Color</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="glitch-color">
|
||||
<property name="use_alpha">0</property>
|
||||
<property name="show_editor">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-color">
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
|
||||
</object>
|
||||
|
||||
</interface>
|
||||
@@ -0,0 +1,249 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
<interface domain="burn-my-windows">
|
||||
|
||||
<object class="GtkBox" id="glitch-prefs">
|
||||
<property name="orientation">vertical</property>
|
||||
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="show-separators">1</property>
|
||||
<style>
|
||||
<class name="rich-list" />
|
||||
</style>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Animation Time [ms]</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="draw-value">1</property>
|
||||
<property name="digits">0</property>
|
||||
<property name="value-pos">left</property>
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">
|
||||
<object class="GtkAdjustment" id="glitch-animation-time">
|
||||
<property name="upper">2000</property>
|
||||
<property name="lower">100</property>
|
||||
<property name="step-increment">1</property>
|
||||
<property name="page-increment">100</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-animation-time">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Scale</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="draw-value">1</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="value-pos">left</property>
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">
|
||||
<object class="GtkAdjustment" id="glitch-scale">
|
||||
<property name="upper">10</property>
|
||||
<property name="lower">0.1</property>
|
||||
<property name="step-increment">0.01</property>
|
||||
<property name="page-increment">0.1</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-scale">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Strength</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="draw-value">1</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="value-pos">left</property>
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">
|
||||
<object class="GtkAdjustment" id="glitch-strength">
|
||||
<property name="upper">10</property>
|
||||
<property name="lower">0.1</property>
|
||||
<property name="step-increment">0.01</property>
|
||||
<property name="page-increment">0.1</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-strength">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Speed</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="draw-value">1</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="value-pos">left</property>
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">
|
||||
<object class="GtkAdjustment" id="glitch-speed">
|
||||
<property name="upper">10</property>
|
||||
<property name="lower">0.1</property>
|
||||
<property name="step-increment">0.01</property>
|
||||
<property name="page-increment">0.1</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-speed">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Color</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="glitch-color">
|
||||
<property name="use_alpha">0</property>
|
||||
<property name="show_editor">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-glitch-color">
|
||||
<property name="icon-name">edit-clear-symbolic</property>
|
||||
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
|
||||
<style>
|
||||
<class name="flat" />
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
|
||||
</object>
|
||||
|
||||
</interface>
|
||||
@@ -635,6 +635,53 @@ SPDX-License-Identifier: CC0-1.0
|
||||
<description>The color of the effect.</description>
|
||||
</key>
|
||||
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!-- Glitch Options -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<key name="glitch-close-effect" type="b">
|
||||
<default>false</default>
|
||||
<summary>Glitch Close Effect</summary>
|
||||
<description>Use the Glitch effect for window closing.</description>
|
||||
</key>
|
||||
|
||||
<key name="glitch-open-effect" type="b">
|
||||
<default>false</default>
|
||||
<summary>Glitch Open Effect</summary>
|
||||
<description>Use the Glitch effect for window opening.</description>
|
||||
</key>
|
||||
|
||||
<key name="glitch-animation-time" type="i">
|
||||
<default>750</default>
|
||||
<summary>Glitch Animation Time</summary>
|
||||
<description>The time the Glitch effect takes.</description>
|
||||
</key>
|
||||
|
||||
<key name="glitch-scale" type="d">
|
||||
<default>1.0</default>
|
||||
<summary>Glitch Scale</summary>
|
||||
<description>The size of the effect.</description>
|
||||
</key>
|
||||
|
||||
<key name="glitch-strength" type="d">
|
||||
<default>2.0</default>
|
||||
<summary>Glitch Strength</summary>
|
||||
<description>The intensity of the effect.</description>
|
||||
</key>
|
||||
|
||||
<key name="glitch-speed" type="d">
|
||||
<default>2.0</default>
|
||||
<summary>Glitch Speed</summary>
|
||||
<description>The speed of the effect.</description>
|
||||
</key>
|
||||
|
||||
<key name="glitch-color" type="s">
|
||||
<default>"rgb(100, 160, 255)"</default>
|
||||
<summary>Glitch Color</summary>
|
||||
<description>The color of the effect.</description>
|
||||
</key>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!-- Wisps Effect Options -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// ) ( //
|
||||
// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
|
||||
// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
|
||||
// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
|
||||
// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
|
||||
// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
|
||||
// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
|
||||
// |__/ //
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
'use strict';
|
||||
|
||||
const GObject = imports.gi.GObject;
|
||||
|
||||
const _ = imports.gettext.domain('burn-my-windows').gettext;
|
||||
|
||||
const ExtensionUtils = imports.misc.extensionUtils;
|
||||
const Me = imports.misc.extensionUtils.getCurrentExtension();
|
||||
const utils = Me.imports.src.utils;
|
||||
const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// This effect applies some intentional graphics issues to your windows. //
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// The effect class can be used to get some metadata (like the effect's name or supported
|
||||
// GNOME Shell versions), to initialize the respective page of the settings dialog, as
|
||||
// well as to create the actual shader for the effect.
|
||||
var Glitch = class {
|
||||
|
||||
// The constructor creates a ShaderFactory which will be used by extension.js to create
|
||||
// shader instances for this effect. The shaders will be automagically created using the
|
||||
// GLSL file in resources/shaders/<nick>.glsl. The callback will be called for each
|
||||
// newly created shader instance.
|
||||
constructor() {
|
||||
this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
|
||||
// We import Clutter in this function as it is not available in the preferences
|
||||
// process. This creator function of the ShaderFactory is only called within GNOME
|
||||
// Shell's process.
|
||||
const Clutter = imports.gi.Clutter;
|
||||
|
||||
// Store uniform locations of newly created shaders.
|
||||
shader._uSeed = shader.get_uniform_location('uSeed');
|
||||
shader._uColor = shader.get_uniform_location('uColor');
|
||||
shader._uScale = shader.get_uniform_location('uScale');
|
||||
shader._uStrength = shader.get_uniform_location('uStrength');
|
||||
shader._uSpeed = shader.get_uniform_location('uSpeed');
|
||||
|
||||
// Write all uniform values at the start of each animation.
|
||||
shader.connect('begin-animation', (shader, settings) => {
|
||||
const c = Clutter.Color.from_string(settings.get_string('glitch-color'))[1];
|
||||
|
||||
// If we are performing an integration tests, we use a fixed seed.
|
||||
const testMode = settings.get_boolean('test-mode');
|
||||
|
||||
// clang-format off
|
||||
shader.set_uniform_float(shader._uSeed, 1, [testMode ? 0 : Math.random()]);
|
||||
shader.set_uniform_float(shader._uColor, 3, [c.red / 255, c.green / 255, c.blue / 255]);
|
||||
shader.set_uniform_float(shader._uScale, 1, [settings.get_double('glitch-scale')]);
|
||||
shader.set_uniform_float(shader._uStrength, 1, [settings.get_double('glitch-strength')]);
|
||||
shader.set_uniform_float(shader._uSpeed, 1, [settings.get_double('glitch-speed')]);
|
||||
// clang-format on
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------- metadata
|
||||
|
||||
// The effect is available on all GNOME Shell versions supported by this extension.
|
||||
getMinShellVersion() {
|
||||
return [3, 36];
|
||||
}
|
||||
|
||||
// This will be called in various places where a unique identifier for this effect is
|
||||
// required. It should match the prefix of the settings keys which store whether the
|
||||
// effect is enabled currently (e.g. '*-close-effect'), and its animation time
|
||||
// (e.g. '*-animation-time').
|
||||
getNick() {
|
||||
return 'glitch';
|
||||
}
|
||||
|
||||
// This will be shown in the sidebar of the preferences dialog as well as in the
|
||||
// drop-down menus where the user can choose the effect.
|
||||
getLabel() {
|
||||
return _('Glitch');
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------- API for prefs.js
|
||||
|
||||
// This is called by the preferences dialog. It loads the settings page for this effect,
|
||||
// and binds all properties to the settings.
|
||||
getPreferences(dialog) {
|
||||
|
||||
// Add the settings page to the builder.
|
||||
dialog.getBuilder().add_from_resource(`/ui/${utils.getUIDir()}/Glitch.ui`);
|
||||
|
||||
// Bind all properties.
|
||||
dialog.bindAdjustment('glitch-animation-time');
|
||||
dialog.bindAdjustment('glitch-scale');
|
||||
dialog.bindAdjustment('glitch-speed');
|
||||
dialog.bindAdjustment('glitch-strength');
|
||||
dialog.bindColorButton('glitch-color');
|
||||
|
||||
// Finally, return the new settings page.
|
||||
return dialog.getBuilder().get_object('glitch-prefs');
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- API for extension.js
|
||||
|
||||
// The getActorScale() is called from extension.js to adjust the actor's size during the
|
||||
// animation. This is useful if the effect requires drawing something beyond the usual
|
||||
// bounds of the actor. This only works for GNOME 3.38+.
|
||||
getActorScale(settings) {
|
||||
return {x: 1.0, y: 1.0};
|
||||
}
|
||||
}
|
||||
@@ -182,6 +182,7 @@ capture_effect "energize-a"
|
||||
capture_effect "energize-b"
|
||||
capture_effect "fire"
|
||||
capture_effect "glide"
|
||||
capture_effect "glitch"
|
||||
capture_effect "hexagon"
|
||||
capture_effect "incinerate"
|
||||
capture_effect "pixelate"
|
||||
|
||||
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
@@ -207,6 +207,7 @@ test_effect "energize-a"
|
||||
test_effect "energize-b"
|
||||
test_effect "fire"
|
||||
test_effect "glide"
|
||||
test_effect "glitch"
|
||||
test_effect "hexagon"
|
||||
test_effect "incinerate"
|
||||
test_effect "pixelate"
|
||||
|
||||