🔀 Merge pull request #174 from Schneegans/feature/incinerate
@@ -7,7 +7,7 @@ ZIP_NAME := $(NAME)@$(DOMAIN).zip
|
||||
|
||||
# Some of the recipes below depend on some of these files.
|
||||
JS_FILES = $(shell find -type f -and \( -name "*.js" \))
|
||||
UI_FILES = $(shell find -type f -and \( -name "*.ui" \))
|
||||
UI_FILES = $(shell find resources -type f -and \( -name "*.ui" \))
|
||||
RESOURCE_FILES = $(shell find resources -mindepth 2 -type f)
|
||||
LOCALES_PO = $(wildcard po/*.po)
|
||||
LOCALES_MO = $(patsubst po/%.po,locale/%/LC_MESSAGES/$(NAME).mo,$(LOCALES_PO))
|
||||
|
||||
@@ -28,6 +28,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" />
|
||||
**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" />
|
||||
**Snap of Disintegration** <br> Dissolve your windows into a cloud of dust.| <img src ="docs/pics/snap.gif" />
|
||||
**T-Rex Attack** <br> Destroy your windows with a series of violent slashes!| <img src ="docs/pics/trex.gif" />
|
||||
@@ -46,18 +47,19 @@ Below is a table which summarizes the current availability for all effects.
|
||||
<td colspan="5"><strong>GNOME</strong></td>
|
||||
<td colspan="1"><strong>KWin</strong></td>
|
||||
</tr>
|
||||
<tr><td></td> <td>3.36</td><td>3.38</td><td>40</td><td>41</td><td>42</td><td>5.25</td></tr>
|
||||
<tr><td>Apparition</td> <td> </td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td> </td></tr>
|
||||
<tr><td>Broken Glass</td> <td> </td> <td> </td> <td>✅</td><td>✅</td><td>✅</td><td> </td></tr>
|
||||
<tr><td>Energize A</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></tr>
|
||||
<tr><td>Fire</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></tr>
|
||||
<tr><td>Matrix</td> <td> </td> <td> </td> <td>✅</td><td>✅</td><td>✅</td><td> </td></tr>
|
||||
<tr><td>Snap of Disintegration</td> <td> </td> <td> </td> <td>✅</td><td>✅</td><td>✅</td><td> </td></tr>
|
||||
<tr><td>T-Rex Attack</td> <td> </td> <td> </td> <td>✅</td><td>✅</td><td>✅</td><td> </td></tr>
|
||||
<tr><td>TV-Effect</td> <td>✅</td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td></tr>
|
||||
<tr><td>Wisps</td> <td>✅</td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td></tr>
|
||||
<tr><td></td> <td>3.36</td><td>3.38</td><td>40</td><td>41</td><td>42</td><td>5.25.0</td></tr>
|
||||
<tr><td>Apparition</td> <td> </td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td> </td> </tr>
|
||||
<tr><td>Broken Glass</td> <td> </td> <td> </td> <td>✅</td><td>✅</td><td>✅</td><td> </td> </tr>
|
||||
<tr><td>Energize A</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> </tr>
|
||||
<tr><td>Fire</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> </tr>
|
||||
<tr><td>Incinerate</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> </tr>
|
||||
<tr><td>Snap of Disintegration</td> <td> </td> <td> </td> <td>✅</td><td>✅</td><td>✅</td><td> </td> </tr>
|
||||
<tr><td>T-Rex Attack</td> <td> </td> <td> </td> <td>✅</td><td>✅</td><td>✅</td><td> </td> </tr>
|
||||
<tr><td>TV-Effect</td> <td>✅</td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td> </tr>
|
||||
<tr><td>Wisps</td> <td>✅</td> <td>✅</td> <td>✅</td><td>✅</td><td>✅</td><td>✅</td> </tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -85,6 +87,7 @@ While [coding new features](docs/how-to-create-new-effects.md) or [translating t
|
||||
|
||||
<h3 align="center">🏅 Previous Sponsors and One-Time Donators</h3>
|
||||
<p align="center">
|
||||
<a href="https://github.com/wolfyrion">@wolfyrion</a><br>
|
||||
<a href="https://github.com/MrTomRod">@MrTomRod</a><br>
|
||||
Pouhiou<br>
|
||||
DAPREMONT Christophe<br>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#### New Features
|
||||
|
||||
* **New Effect: Incinerate.** This is a completely new take on the fire effect. It is a bit more demanding in terms of GPU power, but at the same time it looks much more awesome!
|
||||
* **Initial KDE Support.** Thanks to the [awesome work](https://invent.kde.org/plasma/kwin/-/merge_requests/2227) of Martin Flöser, it has become possible to port some of its effects to KDE Plasma! For now, only the most simple effects can be ported, but hopefully this list can be improved in the future.
|
||||
* An option has been added which allows to automatically disable all effects if running on battery power.
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 975 KiB |
@@ -56,6 +56,7 @@ class Extension {
|
||||
new Me.imports.src.EnergizeB.EnergizeB(),
|
||||
new Me.imports.src.Fire.Fire(),
|
||||
new Me.imports.src.Hexagon.Hexagon(),
|
||||
new Me.imports.src.Incinerate.Incinerate(),
|
||||
new Me.imports.src.Matrix.Matrix(),
|
||||
new Me.imports.src.SnapOfDisintegration.SnapOfDisintegration(),
|
||||
new Me.imports.src.TRexAttack.TRexAttack(),
|
||||
|
||||
@@ -128,6 +128,7 @@ 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 "incinerate" "[BMW] Incinerate" "A less snappy but definitely more fancy take on the fire effect"
|
||||
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"
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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="1" column="1">
|
||||
<widget class="KColorButton" name="kcfg_Color">
|
||||
<property name="alphaChannelEnabled">
|
||||
<bool>true</bool>
|
||||
</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>
|
||||
<property name="singleStep">
|
||||
<number>0.1</number>
|
||||
</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="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="1" 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="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="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Turbulence:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="kcfg_Turbulence">
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>0.1</number>
|
||||
</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,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>2000</default>
|
||||
</entry>
|
||||
<entry name="Scale" type="Double">
|
||||
<default>1</default>
|
||||
</entry>
|
||||
<entry name="Turbulence" type="Double">
|
||||
<default>0.3</default>
|
||||
</entry>
|
||||
<entry name="Color" type="Color">
|
||||
<default>#ffb47f</default>
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
||||
@@ -0,0 +1,9 @@
|
||||
// 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, '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));
|
||||
effect.setUniform(this.shader, 'uTurbulence', effect.readConfig('Turbulence', 1.0));
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: burn-my-windows\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-05-25 12:59+0200\n"
|
||||
"POT-Creation-Date: 2022-06-25 05:04+0200\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"
|
||||
@@ -17,41 +17,41 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: prefs.js:113
|
||||
#: prefs.js:114
|
||||
msgid "Effect Options"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:141
|
||||
#: prefs.js:142
|
||||
msgid "Go Back"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:183
|
||||
#: prefs.js:184
|
||||
msgid "General Options"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:277
|
||||
#: prefs.js:278
|
||||
msgid "Gold Sponsors"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:280
|
||||
#: prefs.js:281
|
||||
msgid "Silver Sponsors"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:283
|
||||
#: prefs.js:284
|
||||
msgid "Bronze Sponsors"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:286
|
||||
#: prefs.js:287
|
||||
msgid "Past Sponsors"
|
||||
msgstr ""
|
||||
|
||||
#. Translators: %s will be replaced by the effect's name.
|
||||
#: prefs.js:509
|
||||
#: prefs.js:510
|
||||
#, javascript-format
|
||||
msgid "Preview for %s"
|
||||
msgstr ""
|
||||
|
||||
#: prefs.js:531
|
||||
#: prefs.js:532
|
||||
msgid "Close this Window to Preview the Effect!"
|
||||
msgstr ""
|
||||
|
||||
@@ -71,6 +71,10 @@ msgstr ""
|
||||
msgid "Snap of Disintegration"
|
||||
msgstr ""
|
||||
|
||||
#: src/Incinerate.js:87
|
||||
msgid "Incinerate"
|
||||
msgstr ""
|
||||
|
||||
#: src/Wisps.js:85
|
||||
msgid "Wisps"
|
||||
msgstr ""
|
||||
@@ -148,15 +152,15 @@ msgid "About Burn-My-Windows"
|
||||
msgstr ""
|
||||
|
||||
#: resources/ui/gtk4/Matrix.ui:24 resources/ui/gtk4/BrokenGlass.ui:24
|
||||
#: resources/ui/gtk4/Wisps.ui:24 resources/ui/gtk4/Fire.ui:49
|
||||
#: resources/ui/gtk4/SnapOfDisintegration.ui:24
|
||||
#: resources/ui/gtk4/Incinerate.ui:24 resources/ui/gtk4/Wisps.ui:24
|
||||
#: resources/ui/gtk4/Fire.ui:49 resources/ui/gtk4/SnapOfDisintegration.ui:24
|
||||
#: resources/ui/gtk4/TRexAttack.ui:24 resources/ui/gtk4/TVEffect.ui:24
|
||||
#: resources/ui/gtk4/EnergizeA.ui:24 resources/ui/gtk4/Hexagon.ui:24
|
||||
#: resources/ui/gtk4/EnergizeB.ui:24 resources/ui/gtk4/Apparition.ui:24
|
||||
#: resources/ui/gtk3/Wisps.ui:42 resources/ui/gtk3/Fire.ui:93
|
||||
#: resources/ui/gtk3/TVEffect.ui:35 resources/ui/gtk3/EnergizeA.ui:42
|
||||
#: resources/ui/gtk3/Hexagon.ui:49 resources/ui/gtk3/EnergizeB.ui:42
|
||||
#: resources/ui/gtk3/Apparition.ui:63
|
||||
#: resources/ui/gtk3/Incinerate.ui:49 resources/ui/gtk3/Wisps.ui:42
|
||||
#: resources/ui/gtk3/Fire.ui:93 resources/ui/gtk3/TVEffect.ui:35
|
||||
#: resources/ui/gtk3/EnergizeA.ui:42 resources/ui/gtk3/Hexagon.ui:49
|
||||
#: resources/ui/gtk3/EnergizeB.ui:42 resources/ui/gtk3/Apparition.ui:63
|
||||
msgid "Animation Time [ms]"
|
||||
msgstr ""
|
||||
|
||||
@@ -165,7 +169,9 @@ msgstr ""
|
||||
#: resources/ui/gtk4/Matrix.ui:224 resources/ui/gtk4/Matrix.ui:258
|
||||
#: resources/ui/gtk4/BrokenGlass.ui:52 resources/ui/gtk4/BrokenGlass.ui:98
|
||||
#: resources/ui/gtk4/BrokenGlass.ui:144 resources/ui/gtk4/BrokenGlass.ui:190
|
||||
#: resources/ui/gtk4/BrokenGlass.ui:244 resources/ui/gtk4/Wisps.ui:52
|
||||
#: resources/ui/gtk4/BrokenGlass.ui:244 resources/ui/gtk4/Incinerate.ui:52
|
||||
#: resources/ui/gtk4/Incinerate.ui:98 resources/ui/gtk4/Incinerate.ui:144
|
||||
#: resources/ui/gtk4/Incinerate.ui:178 resources/ui/gtk4/Wisps.ui:52
|
||||
#: resources/ui/gtk4/Wisps.ui:98 resources/ui/gtk4/Wisps.ui:132
|
||||
#: resources/ui/gtk4/Fire.ui:77 resources/ui/gtk4/Fire.ui:123
|
||||
#: resources/ui/gtk4/Fire.ui:169 resources/ui/gtk4/Fire.ui:222
|
||||
@@ -182,7 +188,9 @@ msgstr ""
|
||||
#: resources/ui/gtk4/prefs.ui:166 resources/ui/gtk4/prefs.ui:200
|
||||
#: resources/ui/gtk4/Apparition.ui:52 resources/ui/gtk4/Apparition.ui:98
|
||||
#: resources/ui/gtk4/Apparition.ui:144 resources/ui/gtk4/Apparition.ui:190
|
||||
#: resources/ui/gtk4/Apparition.ui:236 resources/ui/gtk3/Wisps.ui:68
|
||||
#: resources/ui/gtk4/Apparition.ui:236 resources/ui/gtk3/Incinerate.ui:75
|
||||
#: resources/ui/gtk3/Incinerate.ui:124 resources/ui/gtk3/Incinerate.ui:173
|
||||
#: resources/ui/gtk3/Incinerate.ui:216 resources/ui/gtk3/Wisps.ui:68
|
||||
#: resources/ui/gtk3/Wisps.ui:117 resources/ui/gtk3/Wisps.ui:160
|
||||
#: resources/ui/gtk3/Fire.ui:119 resources/ui/gtk3/Fire.ui:167
|
||||
#: resources/ui/gtk3/Fire.ui:215 resources/ui/gtk3/Fire.ui:277
|
||||
@@ -201,12 +209,13 @@ msgid "Reset to Default Value"
|
||||
msgstr ""
|
||||
|
||||
#: resources/ui/gtk4/Matrix.ui:70 resources/ui/gtk4/BrokenGlass.ui:70
|
||||
#: resources/ui/gtk4/Wisps.ui:70 resources/ui/gtk4/Fire.ui:95
|
||||
#: resources/ui/gtk4/SnapOfDisintegration.ui:70
|
||||
#: resources/ui/gtk4/Incinerate.ui:70 resources/ui/gtk4/Wisps.ui:70
|
||||
#: resources/ui/gtk4/Fire.ui:95 resources/ui/gtk4/SnapOfDisintegration.ui:70
|
||||
#: resources/ui/gtk4/EnergizeA.ui:70 resources/ui/gtk4/Hexagon.ui:70
|
||||
#: resources/ui/gtk4/EnergizeB.ui:70 resources/ui/gtk3/Wisps.ui:91
|
||||
#: resources/ui/gtk3/Fire.ui:141 resources/ui/gtk3/EnergizeA.ui:91
|
||||
#: resources/ui/gtk3/Hexagon.ui:98 resources/ui/gtk3/EnergizeB.ui:91
|
||||
#: resources/ui/gtk4/EnergizeB.ui:70 resources/ui/gtk3/Incinerate.ui:98
|
||||
#: resources/ui/gtk3/Wisps.ui:91 resources/ui/gtk3/Fire.ui:141
|
||||
#: resources/ui/gtk3/EnergizeA.ui:91 resources/ui/gtk3/Hexagon.ui:98
|
||||
#: resources/ui/gtk3/EnergizeB.ui:91
|
||||
msgid "Scale"
|
||||
msgstr ""
|
||||
|
||||
@@ -245,11 +254,16 @@ msgid ""
|
||||
"window."
|
||||
msgstr ""
|
||||
|
||||
#: resources/ui/gtk4/Wisps.ui:116 resources/ui/gtk4/SnapOfDisintegration.ui:116
|
||||
#: resources/ui/gtk4/Incinerate.ui:116 resources/ui/gtk3/Incinerate.ui:147
|
||||
msgid "Turbulence"
|
||||
msgstr ""
|
||||
|
||||
#: resources/ui/gtk4/Incinerate.ui:162 resources/ui/gtk4/Wisps.ui:116
|
||||
#: resources/ui/gtk4/SnapOfDisintegration.ui:116
|
||||
#: resources/ui/gtk4/TVEffect.ui:70 resources/ui/gtk4/EnergizeA.ui:116
|
||||
#: resources/ui/gtk4/EnergizeB.ui:116 resources/ui/gtk3/Wisps.ui:139
|
||||
#: resources/ui/gtk3/TVEffect.ui:83 resources/ui/gtk3/EnergizeA.ui:139
|
||||
#: resources/ui/gtk3/EnergizeB.ui:139
|
||||
#: resources/ui/gtk4/EnergizeB.ui:116 resources/ui/gtk3/Incinerate.ui:195
|
||||
#: resources/ui/gtk3/Wisps.ui:139 resources/ui/gtk3/TVEffect.ui:83
|
||||
#: resources/ui/gtk3/EnergizeA.ui:139 resources/ui/gtk3/EnergizeB.ui:139
|
||||
msgid "Color"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ var PreferencesDialog = class PreferencesDialog {
|
||||
new Me.imports.src.EnergizeB.EnergizeB(),
|
||||
new Me.imports.src.Fire.Fire(),
|
||||
new Me.imports.src.Hexagon.Hexagon(),
|
||||
new Me.imports.src.Incinerate.Incinerate(),
|
||||
new Me.imports.src.Matrix.Matrix(),
|
||||
new Me.imports.src.SnapOfDisintegration.SnapOfDisintegration(),
|
||||
new Me.imports.src.TRexAttack.TRexAttack(),
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"<a href='https://github.com/AngelBrielez'>Angel Brielez</a>"
|
||||
],
|
||||
"past": [
|
||||
"<a href='https://github.com/wolfyrion'>@wolfyrion</a>",
|
||||
"<a href='https://github.com/MrTomRod'>@MrTomRod</a>",
|
||||
"Pouhiou",
|
||||
"DAPREMONT Christophe",
|
||||
|
||||
@@ -98,7 +98,7 @@ uniform vec2 uSize;
|
||||
uniform float uPadding;
|
||||
|
||||
// On GNOME, we set iTexCoord to be an alias for the cogl variables.
|
||||
#define iTexCoord cogl_tex_coord_in[0]
|
||||
vec2 iTexCoord = cogl_tex_coord_in[0].st;
|
||||
|
||||
// Shell.GLSLEffect uses straight alpha. So we have to convert from premultiplied.
|
||||
vec4 getInputColor(vec2 coords) {
|
||||
@@ -124,6 +124,17 @@ vec4 alphaOver(vec4 under, vec4 over) {
|
||||
return vec4((over.rgb * over.a + under.rgb * under.a * (1.0 - over.a)) / alpha, alpha);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------- color helpers
|
||||
|
||||
// Maps the given value from [0..1] to the given colors.
|
||||
vec3 tritone(float val, vec3 shadows, vec3 midtones, vec3 highlights) {
|
||||
if (val < 0.5) {
|
||||
return mix(shadows, midtones, smoothstep(0.0, 1.0, val * 2.0));
|
||||
}
|
||||
|
||||
return mix(midtones, highlights, smoothstep(0.0, 1.0, val * 2.0 - 1.0));
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------- easing functions
|
||||
|
||||
// Here are some basic easing function. More can be added if required!
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// ) ( //
|
||||
// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
|
||||
// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
|
||||
// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
|
||||
// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
|
||||
// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
|
||||
// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
|
||||
// |__/ //
|
||||
// Copyright (c) 2021 Simon Schneegans //
|
||||
// Released under the GPLv3 or later. See LICENSE file for details. //
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// The content from common.glsl is automatically prepended to each shader effect.
|
||||
|
||||
uniform vec2 uSeed;
|
||||
uniform vec3 uColor;
|
||||
uniform float uScale;
|
||||
uniform float uTurbulence;
|
||||
|
||||
// This maps a given value in [0..1] to a color from the rgba color ramp
|
||||
// [transparent black ... semi-transparent uColor ... opaque white].
|
||||
vec4 getFireColor(float val) {
|
||||
return vec4(tritone(val, vec3(0.0), uColor, vec3(1.0)), val);
|
||||
}
|
||||
|
||||
void main() {
|
||||
|
||||
// The burning fire edge is composed of multiple regions. The width of all regions is
|
||||
// defined below. If a window is closed and the burning direction happens to be from top
|
||||
// to bottom, the different zones are arragned like this:
|
||||
//
|
||||
// . . . . ^
|
||||
// . : .: . | smokeRange: In this zone, smoke and little ember
|
||||
// . : : .. : : . | particles are drawn.
|
||||
// : . .:.: .: :.. |
|
||||
// ...:: ..: :: : . .. |
|
||||
// :: ) .. : : ..: : . | ^
|
||||
// ( /( ( ( . .::. | | flameRange: Flames are drawn in this zone.
|
||||
// )\()) ))\ )( . ( . | |
|
||||
// ((_)\ /((_|()\ )\ ) | | ^
|
||||
// | |(_|_))( ((_)_(_/( v v | burnRange: In
|
||||
// ///////////////////// <- hideThreshold: From here on, | this zone, a
|
||||
// | / / / / / / / / / | ^ the window is hidden. | firery edge is
|
||||
// | / / / / / / | | v drawn.
|
||||
// | / / / / / | v scorchRange: The window becomes
|
||||
// | | brownish and a subtle
|
||||
// | | heat distortion effect
|
||||
// | | kicks in.
|
||||
// | |
|
||||
// \___________________/
|
||||
//
|
||||
// If a window is opened, the window texture is visible on the other side of the
|
||||
// hideThreshold and the scorchRange is also flipped to the other side (so it is drawn
|
||||
// below the flames and the smoke).
|
||||
|
||||
// All widths depend on the configured scale of the effect.
|
||||
float SCORCH_WIDTH = 0.2 * uScale;
|
||||
float BURN_WIDTH = 0.03 * uScale;
|
||||
float SMOKE_WIDTH = 0.9 * uScale;
|
||||
float FLAME_WIDTH = 0.2 * uScale;
|
||||
|
||||
// During the animation, the hideThreshold transitions from a small value to a larger
|
||||
// value, so that all the above ranges are covered.
|
||||
float hideThreshold =
|
||||
mix(uForOpening ? 0.0 : -SCORCH_WIDTH, 1.0 + SMOKE_WIDTH, uProgress);
|
||||
|
||||
// The individual ranges are now given by the current hideThreshold and the widths of
|
||||
// the zones.
|
||||
vec2 scorchRange = uForOpening ? vec2(hideThreshold - SCORCH_WIDTH, hideThreshold)
|
||||
: vec2(hideThreshold, hideThreshold + SCORCH_WIDTH);
|
||||
vec2 burnRange = vec2(hideThreshold - BURN_WIDTH, hideThreshold + BURN_WIDTH);
|
||||
vec2 flameRange = vec2(hideThreshold - FLAME_WIDTH, hideThreshold);
|
||||
vec2 smokeRange = vec2(hideThreshold - SMOKE_WIDTH, hideThreshold);
|
||||
|
||||
// Now we compute a 2D gradient in [0..1] which covers the entire window. The dark
|
||||
// regions will be burned first, the bright regions in the end. We mix a radial gradient
|
||||
// with some noise. The center of the radial gradient is positioned somewhere at the
|
||||
// window boundary.
|
||||
vec2 center = uSeed.x > uSeed.y ? vec2(uSeed.x, floor(uSeed.y + 0.5))
|
||||
: vec2(floor(uSeed.x + 0.5), uSeed.y);
|
||||
float circle = length(iTexCoord - center);
|
||||
|
||||
vec2 uv = iTexCoord / uScale * uSize / 1.5;
|
||||
float smokeNoise =
|
||||
simplex2DFractal(uv * 0.01 + uSeed + uProgress * vec2(0.0, 0.3 * uDuration));
|
||||
|
||||
float gradient =
|
||||
mix(circle, smokeNoise, 200.0 * uTurbulence * uScale / max(uSize.x, uSize.y));
|
||||
|
||||
// Now, based on the gradient and the ranges, we can compute masks for the individual
|
||||
// zones.
|
||||
float smokeMask = smoothstep(0.0, 1.0, (gradient - smokeRange.x) / SMOKE_WIDTH) *
|
||||
getAbsoluteEdgeMask(100.0, 0.3);
|
||||
float flameMask = smoothstep(0.0, 1.0, (gradient - flameRange.x) / FLAME_WIDTH) *
|
||||
getAbsoluteEdgeMask(20.0, 0.0);
|
||||
float fireMask = smoothstep(1.0, 0.0, abs(gradient - hideThreshold) / BURN_WIDTH);
|
||||
float scorchMask = smoothstep(1.0, 0.0, (gradient - scorchRange.x) / SCORCH_WIDTH);
|
||||
|
||||
if (uForOpening) {
|
||||
scorchMask = 1.0 - scorchMask;
|
||||
}
|
||||
|
||||
// Now we retrieve the window color. We only show the window when the burning edge has
|
||||
// passed.
|
||||
vec4 oColor = vec4(0.0);
|
||||
|
||||
if ((!uForOpening && gradient > hideThreshold) ||
|
||||
(uForOpening && gradient < hideThreshold)) {
|
||||
|
||||
// We add some distortion in the scorch zone
|
||||
vec2 distort = vec2(0.0);
|
||||
|
||||
if (scorchRange.x < gradient && gradient < scorchRange.y) {
|
||||
distort = vec2(dFdx(gradient), dFdy(gradient)) * scorchMask * 5.0;
|
||||
}
|
||||
|
||||
oColor = getInputColor(iTexCoord + distort);
|
||||
}
|
||||
|
||||
// Add smoke and embers.
|
||||
if (smokeRange.x < gradient && gradient < smokeRange.y) {
|
||||
float smoke = smokeMask * smokeNoise;
|
||||
oColor = alphaOver(oColor, vec4(0.5 * vec3(smoke), smoke));
|
||||
|
||||
float emberNoise = simplex2DFractal(
|
||||
uv * 0.05 + uSeed - smokeNoise * vec2(0.0, 0.3 * smokeMask * uDuration));
|
||||
float embers = clamp(pow(emberNoise + 0.3, 100.0), 0.0, 2.0) * smoke;
|
||||
oColor += getFireColor(embers);
|
||||
}
|
||||
|
||||
// Add scorch effect.
|
||||
if (scorchRange.x < gradient && gradient < scorchRange.y) {
|
||||
oColor.rgb = mix(oColor.rgb, mix(oColor.rgb, vec3(0.1, 0.05, 0.02), 0.4), scorchMask);
|
||||
}
|
||||
|
||||
// Add trailing flames.
|
||||
if (min(burnRange.x, flameRange.x) < gradient &&
|
||||
gradient < max(burnRange.y, flameRange.y)) {
|
||||
float flameNoise =
|
||||
simplex2DFractal(uv * 0.02 + uSeed + smokeNoise * vec2(0.0, 1.0 * uDuration) +
|
||||
vec2(0.0, uProgress * uDuration));
|
||||
|
||||
if (flameRange.x < gradient && gradient < flameRange.y) {
|
||||
float flame = clamp(pow(flameNoise + 0.3, 20.0), 0.0, 2.0) * flameMask;
|
||||
flame += clamp(pow(flameNoise + 0.4, 10.0), 0.0, 2.0) * flameMask * flameMask * 0.1;
|
||||
oColor += getFireColor(flame);
|
||||
}
|
||||
|
||||
// Add burning edge.
|
||||
if (burnRange.x < gradient && gradient < burnRange.y) {
|
||||
float fire = fireMask * pow(flameNoise + 0.4, 4.0) * oColor.a;
|
||||
oColor += getFireColor(fire);
|
||||
}
|
||||
}
|
||||
|
||||
setOutputColor(oColor);
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="burn-my-windows">
|
||||
|
||||
<object class="GtkAdjustment" id="incinerate-animation-time">
|
||||
<property name="upper">10000</property>
|
||||
<property name="lower">100</property>
|
||||
<property name="step-increment">1</property>
|
||||
<property name="page-increment">100</property>
|
||||
</object>
|
||||
|
||||
<object class="GtkAdjustment" id="incinerate-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="incinerate-turbulence">
|
||||
<property name="upper">1</property>
|
||||
<property name="lower">0</property>
|
||||
<property name="step-increment">0.01</property>
|
||||
<property name="page-increment">0.1</property>
|
||||
</object>
|
||||
|
||||
<object class="GtkBox" id="incinerate-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">incinerate-animation-time</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-incinerate-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">incinerate-scale</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-incinerate-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">Turbulence</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">incinerate-turbulence</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-incinerate-turbulence">
|
||||
<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="incinerate-color">
|
||||
<property name="use_alpha">0</property>
|
||||
<property name="show_editor">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-incinerate-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,197 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="burn-my-windows">
|
||||
|
||||
<object class="GtkBox" id="incinerate-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="incinerate-animation-time">
|
||||
<property name="upper">10000</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-incinerate-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="incinerate-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-incinerate-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">Turbulence</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="incinerate-turbulence">
|
||||
<property name="upper">1</property>
|
||||
<property name="lower">0</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-incinerate-turbulence">
|
||||
<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="incinerate-color">
|
||||
<property name="use_alpha">0</property>
|
||||
<property name="show_editor">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset-incinerate-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>
|
||||
@@ -331,6 +331,46 @@
|
||||
<description>Use additive blending for the line and the glow.</description>
|
||||
</key>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!-- Incinerate Options -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<key name="incinerate-close-effect" type="b">
|
||||
<default>false</default>
|
||||
<summary>Incinerate Close Effect</summary>
|
||||
<description>Use the Incinerate effect for window closing.</description>
|
||||
</key>
|
||||
|
||||
<key name="incinerate-open-effect" type="b">
|
||||
<default>false</default>
|
||||
<summary>Incinerate Open Effect</summary>
|
||||
<description>Use the Incinerate effect for window opening.</description>
|
||||
</key>
|
||||
|
||||
<key name="incinerate-animation-time" type="i">
|
||||
<default>2000</default>
|
||||
<summary>Incinerate Animation Time</summary>
|
||||
<description>The time the Incinerate effect takes.</description>
|
||||
</key>
|
||||
|
||||
<key name="incinerate-scale" type="d">
|
||||
<default>1.0</default>
|
||||
<summary>Incinerate Scale</summary>
|
||||
<description>The scale of the effect.</description>
|
||||
</key>
|
||||
|
||||
<key name="incinerate-turbulence" type="d">
|
||||
<default>0.3</default>
|
||||
<summary>Incinerate Turbulence</summary>
|
||||
<description>The turbulence of the effect.</description>
|
||||
</key>
|
||||
|
||||
<key name="incinerate-color" type="s">
|
||||
<default>"rgb(255, 180, 127)"</default>
|
||||
<summary>Incinerate Color</summary>
|
||||
<description>The color of the effect.</description>
|
||||
</key>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!-- Energize A Options -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// ) ( //
|
||||
// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
|
||||
// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
|
||||
// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
|
||||
// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
|
||||
// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
|
||||
// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
|
||||
// |__/ //
|
||||
// Copyright (c) 2021 Simon Schneegans //
|
||||
// Released under the GPLv3 or later. See LICENSE file for details. //
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
'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 burns windows to ashes. The fire starts at a random position at the //
|
||||
// window's boundary and then burns through the window in a circular shape. //
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// 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 Incinerate = 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 these modules in this function as they are not available in the
|
||||
// preferences process. This callback is only called within GNOME Shell's process.
|
||||
const {Clutter} = imports.gi;
|
||||
|
||||
// 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._uTurbulence = shader.get_uniform_location('uTurbulence');
|
||||
|
||||
// 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('incinerate-color'))[1];
|
||||
|
||||
// If we are currently performing integration test, the animation uses a fixed
|
||||
// seed.
|
||||
const testMode = settings.get_boolean('test-mode');
|
||||
|
||||
// clang-format off
|
||||
shader.set_uniform_float(shader._uSeed, 2, [testMode ? 0 : Math.random(), 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('incinerate-scale')]);
|
||||
shader.set_uniform_float(shader._uTurbulence, 1, [settings.get_double('incinerate-turbulence')]);
|
||||
// clang-format on
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------- metadata
|
||||
|
||||
// This effect is available on all supported GNOME Shell versions.
|
||||
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 'incinerate';
|
||||
}
|
||||
|
||||
// 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 _('Incinerate');
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------- 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.getGTKString()}/Incinerate.ui`);
|
||||
|
||||
// Bind all properties.
|
||||
dialog.bindAdjustment('incinerate-animation-time');
|
||||
dialog.bindAdjustment('incinerate-scale');
|
||||
dialog.bindAdjustment('incinerate-turbulence');
|
||||
dialog.bindColorButton('incinerate-color');
|
||||
|
||||
// Finally, return the new settings page.
|
||||
return dialog.getBuilder().get_object('incinerate-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};
|
||||
}
|
||||
}
|
||||
@@ -170,6 +170,7 @@ capture_effect "energize-a"
|
||||
capture_effect "energize-b"
|
||||
capture_effect "fire"
|
||||
capture_effect "hexagon"
|
||||
capture_effect "incinerate"
|
||||
capture_effect "tv"
|
||||
capture_effect "wisps"
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
@@ -199,6 +199,7 @@ test_effect "energize-a"
|
||||
test_effect "energize-b"
|
||||
test_effect "fire"
|
||||
test_effect "hexagon"
|
||||
test_effect "incinerate"
|
||||
test_effect "tv"
|
||||
test_effect "wisps"
|
||||
|
||||
|
||||