Minimize: colour list cleanup (no white, random last, safe fallback for old MixColor), MarbleSize default 42; v0.3.0 behaviour, no per-window uniforms, no early-restore path
@@ -41,8 +41,8 @@ it does not show up.
41
41
| `Gravity` | 4500 px/s² | Fall acceleration; fall time = sqrt(2·distance / g) (close: 1.5 screen heights; minimize: distance to taskbar entry) |
42
42
| `BlackMixOuter` | 80 % | Black mix on the outer/lower part of the marble (dull "black glass") |
43
43
| `BlackMixCenter` | 5 % | Black mix on the upper-middle part, where the window shows through; soft gradient between both zones |
44
| `MixColor` | 0 (Zwart) | Colour the mix blends towards: 0 Zwart #000000, 1 Blauw #0000aa, 2 Rood #aa0000, 3 Groen #00aa00, 4 Paars #6600aa, 5 Geel #aaaa00, 6 Oranje #aa5500, 7 Cyaan #00aaaa, 8 Roze #aa0066, 9 Grijs #555555, 10 Wit #ffffff, 11 Bruin #553300, 12 Willekeurig (random per animation; minimize and the following restore of the same window reuse the same colour) |
45
| `MarbleSize` | 56 px | Final marble diameter, independent of the window size (capped at 90 % of the window's smallest side) |
44
| `MixColor` | 0 (Zwart) | Colour the mix blends towards: 0 Zwart #000000, 1 Blauw #0000aa, 2 Rood #aa0000, 3 Groen #00aa00, 4 Paars #6600aa, 5 Geel #aaaa00, 6 Oranje #aa5500, 7 Cyaan #00aaaa, 8 Roze #aa0066, 9 Grijs #555555, 10 Bruin #553300, 11 Willekeurig (random per window; minimize and the following restore of that window use the same colour). Values above 11 (e.g. 12 = random in v0.3.0) are treated as random, invalid values as black |
45
| `MarbleSize` | 42 px | Final marble diameter, independent of the window size (capped at 90 % of the window's smallest side) |
46
46
47
47
All durations are scaled by Plasma's global animation speed.
48
48
@@ -41,8 +41,8 @@ it does not show up.41
| `Gravity` | 4500 px/s² | Fall acceleration; fall time = sqrt(2·distance / g) (close: 1.5 screen heights; minimize: distance to taskbar entry) |41
| `Gravity` | 4500 px/s² | Fall acceleration; fall time = sqrt(2·distance / g) (close: 1.5 screen heights; minimize: distance to taskbar entry) |42
| `BlackMixOuter` | 80 % | Black mix on the outer/lower part of the marble (dull "black glass") |42
| `BlackMixOuter` | 80 % | Black mix on the outer/lower part of the marble (dull "black glass") |43
| `BlackMixCenter` | 5 % | Black mix on the upper-middle part, where the window shows through; soft gradient between both zones |43
| `BlackMixCenter` | 5 % | Black mix on the upper-middle part, where the window shows through; soft gradient between both zones |44
| `MixColor` | 0 (Zwart) | Colour the mix blends towards: 0 Zwart #000000, 1 Blauw #0000aa, 2 Rood #aa0000, 3 Groen #00aa00, 4 Paars #6600aa, 5 Geel #aaaa00, 6 Oranje #aa5500, 7 Cyaan #00aaaa, 8 Roze #aa0066, 9 Grijs #555555, 10 Wit #ffffff, 11 Bruin #553300, 12 Willekeurig (random per animation; minimize and the following restore of the same window reuse the same colour) |44
| `MixColor` | 0 (Zwart) | Colour the mix blends towards: 0 Zwart #000000, 1 Blauw #0000aa, 2 Rood #aa0000, 3 Groen #00aa00, 4 Paars #6600aa, 5 Geel #aaaa00, 6 Oranje #aa5500, 7 Cyaan #00aaaa, 8 Roze #aa0066, 9 Grijs #555555, 10 Bruin #553300, 11 Willekeurig (random per window; minimize and the following restore of that window use the same colour). Values above 11 (e.g. 12 = random in v0.3.0) are treated as random, invalid values as black |45
| `MarbleSize` | 56 px | Final marble diameter, independent of the window size (capped at 90 % of the window's smallest side) |45
| `MarbleSize` | 42 px | Final marble diameter, independent of the window size (capped at 90 % of the window's smallest side) |46
46
47
All durations are scaled by Plasma's global animation speed.47
All durations are scaled by Plasma's global animation speed.48
48
@@ -93,18 +93,21 @@ class BurnMyWindowsMarbleMinimizeEffect {
93
93
// free fall from rest: d = 0.5 g t^2 -> t = sqrt(2d/g); scaled by the global speed factor
94
94
this.fallDuration = animationTime(Math.round(1000 * Math.sqrt(2 * this.fallDistance / this.gravity)));
95
95
effect.setUniform(this.shader, 'uDuration', (this.duration + this.pause + this.fallDuration) * 0.001);
96
this.tintMode = Math.max(0, Math.min(12, Number(effect.readConfig('MixColor', 0)) | 0));
96
// 0..10 colours, 11 = random. Values saved by v0.3.0 (10 = white, 12 = random) fall back safely.
97
let mc = Math.floor(Number(effect.readConfig('MixColor', 0)));
98
if (!(mc >= 0)) mc = 0; else if (mc > 11) mc = 11;
99
this.tintMode = mc;
97
100
this.applyTint(null, false);
98
effect.setUniform(this.shader, 'uMarbleSize', Math.max(4, Number(effect.readConfig('MarbleSize', 56))));
101
effect.setUniform(this.shader, 'uMarbleSize', Math.max(4, Number(effect.readConfig('MarbleSize', 42))));
99
102
effect.setUniform(this.shader, 'uMixOuter', Math.min(100, Math.max(0, Number(effect.readConfig('BlackMixOuter', 80)))) / 100);
100
103
effect.setUniform(this.shader, 'uMixCenter', Math.min(100, Math.max(0, Number(effect.readConfig('BlackMixCenter', 5)))) / 100);
101
104
effect.setUniform(this.shader, 'uCrumpleEnd', this.duration / Math.max(1, this.duration + this.pause + this.fallDuration));
102
105
}
103
106
104
// Mix target colour. tintMode 12 = random; with reuse, a random colour picked for this
107
// Mix target colour. tintMode 11 = random; with reuse, a random colour picked for this
105
108
// window (e.g. at minimize) is used again (e.g. at unminimize) and then forgotten.
106
109
applyTint(window, reuse) {
107
const C = [[0.0000,0.0000,0.0000],[0.0000,0.0000,0.6667],[0.6667,0.0000,0.0000],[0.0000,0.6667,0.0000],[0.4000,0.0000,0.6667],[0.6667,0.6667,0.0000],[0.6667,0.3333,0.0000],[0.0000,0.6667,0.6667],[0.6667,0.0000,0.4000],[0.3333,0.3333,0.3333],[1.0000,1.0000,1.0000],[0.3333,0.2000,0.0000]];
110
const C = [[0.0000,0.0000,0.0000],[0.0000,0.0000,0.6667],[0.6667,0.0000,0.0000],[0.0000,0.6667,0.0000],[0.4000,0.0000,0.6667],[0.6667,0.6667,0.0000],[0.6667,0.3333,0.0000],[0.0000,0.6667,0.6667],[0.6667,0.0000,0.4000],[0.3333,0.3333,0.3333],[0.3333,0.2000,0.0000]];
108
111
let c;
109
112
if (this.tintMode < C.length) c = C[this.tintMode];
110
113
else if (window && reuse && window.bmwTint) { c = window.bmwTint; window.bmwTint = null; }
@@ -93,18 +93,21 @@ class BurnMyWindowsMarbleMinimizeEffect {93
// free fall from rest: d = 0.5 g t^2 -> t = sqrt(2d/g); scaled by the global speed factor93
// free fall from rest: d = 0.5 g t^2 -> t = sqrt(2d/g); scaled by the global speed factor94
this.fallDuration = animationTime(Math.round(1000 * Math.sqrt(2 * this.fallDistance / this.gravity)));94
this.fallDuration = animationTime(Math.round(1000 * Math.sqrt(2 * this.fallDistance / this.gravity)));95
effect.setUniform(this.shader, 'uDuration', (this.duration + this.pause + this.fallDuration) * 0.001);95
effect.setUniform(this.shader, 'uDuration', (this.duration + this.pause + this.fallDuration) * 0.001);96
this.tintMode = Math.max(0, Math.min(12, Number(effect.readConfig('MixColor', 0)) | 0));96
// 0..10 colours, 11 = random. Values saved by v0.3.0 (10 = white, 12 = random) fall back safely.97
let mc = Math.floor(Number(effect.readConfig('MixColor', 0)));98
if (!(mc >= 0)) mc = 0; else if (mc > 11) mc = 11;99
this.tintMode = mc;97
this.applyTint(null, false);100
this.applyTint(null, false);98
effect.setUniform(this.shader, 'uMarbleSize', Math.max(4, Number(effect.readConfig('MarbleSize', 56))));101
effect.setUniform(this.shader, 'uMarbleSize', Math.max(4, Number(effect.readConfig('MarbleSize', 42))));99
effect.setUniform(this.shader, 'uMixOuter', Math.min(100, Math.max(0, Number(effect.readConfig('BlackMixOuter', 80)))) / 100);102
effect.setUniform(this.shader, 'uMixOuter', Math.min(100, Math.max(0, Number(effect.readConfig('BlackMixOuter', 80)))) / 100);100
effect.setUniform(this.shader, 'uMixCenter', Math.min(100, Math.max(0, Number(effect.readConfig('BlackMixCenter', 5)))) / 100);103
effect.setUniform(this.shader, 'uMixCenter', Math.min(100, Math.max(0, Number(effect.readConfig('BlackMixCenter', 5)))) / 100);101
effect.setUniform(this.shader, 'uCrumpleEnd', this.duration / Math.max(1, this.duration + this.pause + this.fallDuration));104
effect.setUniform(this.shader, 'uCrumpleEnd', this.duration / Math.max(1, this.duration + this.pause + this.fallDuration));102
}105
}103
106
104
// Mix target colour. tintMode 12 = random; with reuse, a random colour picked for this107
// Mix target colour. tintMode 11 = random; with reuse, a random colour picked for this105
// window (e.g. at minimize) is used again (e.g. at unminimize) and then forgotten.108
// window (e.g. at minimize) is used again (e.g. at unminimize) and then forgotten.106
applyTint(window, reuse) {109
applyTint(window, reuse) {107
const C = [[0.0000,0.0000,0.0000],[0.0000,0.0000,0.6667],[0.6667,0.0000,0.0000],[0.0000,0.6667,0.0000],[0.4000,0.0000,0.6667],[0.6667,0.6667,0.0000],[0.6667,0.3333,0.0000],[0.0000,0.6667,0.6667],[0.6667,0.0000,0.4000],[0.3333,0.3333,0.3333],[1.0000,1.0000,1.0000],[0.3333,0.2000,0.0000]];110
const C = [[0.0000,0.0000,0.0000],[0.0000,0.0000,0.6667],[0.6667,0.0000,0.0000],[0.0000,0.6667,0.0000],[0.4000,0.0000,0.6667],[0.6667,0.6667,0.0000],[0.6667,0.3333,0.0000],[0.0000,0.6667,0.6667],[0.6667,0.0000,0.4000],[0.3333,0.3333,0.3333],[0.3333,0.2000,0.0000]];108
let c;111
let c;109
if (this.tintMode < C.length) c = C[this.tintMode];112
if (this.tintMode < C.length) c = C[this.tintMode];110
else if (window && reuse && window.bmwTint) { c = window.bmwTint; window.bmwTint = null; }113
else if (window && reuse && window.bmwTint) { c = window.bmwTint; window.bmwTint = null; }@@ -8,6 +8,6 @@
8
8
<entry name="BlackMixOuter" type="UInt"><default>80</default></entry>
9
9
<entry name="BlackMixCenter" type="UInt"><default>5</default></entry>
10
10
<entry name="MixColor" type="Int"><default>0</default></entry>
11
<entry name="MarbleSize" type="UInt"><default>56</default></entry>
11
<entry name="MarbleSize" type="UInt"><default>42</default></entry>
12
12
</group>
13
13
</kcfg>
@@ -8,6 +8,6 @@8
<entry name="BlackMixOuter" type="UInt"><default>80</default></entry>8
<entry name="BlackMixOuter" type="UInt"><default>80</default></entry>9
<entry name="BlackMixCenter" type="UInt"><default>5</default></entry>9
<entry name="BlackMixCenter" type="UInt"><default>5</default></entry>10
<entry name="MixColor" type="Int"><default>0</default></entry>10
<entry name="MixColor" type="Int"><default>0</default></entry>11
<entry name="MarbleSize" type="UInt"><default>56</default></entry>11
<entry name="MarbleSize" type="UInt"><default>42</default></entry>12
</group>12
</group>13
</kcfg>13
</kcfg>@@ -14,7 +14,7 @@
14
14
<item row="4" column="0"><widget class="QLabel" name="l5"><property name="text"><string>Black mix center (%)</string></property></widget></item>
15
15
<item row="4" column="1"><widget class="QSpinBox" name="kcfg_BlackMixCenter"><property name="maximum"><number>100</number></property></widget></item>
16
16
<item row="5" column="0"><widget class="QLabel" name="l6"><property name="text"><string>Mix colour</string></property></widget></item>
17
<item row="5" column="1"><widget class="QComboBox" name="kcfg_MixColor"><item><property name="text"><string>Zwart (#000000)</string></property></item><item><property name="text"><string>Blauw (#0000aa)</string></property></item><item><property name="text"><string>Rood (#aa0000)</string></property></item><item><property name="text"><string>Groen (#00aa00)</string></property></item><item><property name="text"><string>Paars (#6600aa)</string></property></item><item><property name="text"><string>Geel (#aaaa00)</string></property></item><item><property name="text"><string>Oranje (#aa5500)</string></property></item><item><property name="text"><string>Cyaan (#00aaaa)</string></property></item><item><property name="text"><string>Roze (#aa0066)</string></property></item><item><property name="text"><string>Grijs (#555555)</string></property></item><item><property name="text"><string>Wit (#ffffff)</string></property></item><item><property name="text"><string>Bruin (#553300)</string></property></item><item><property name="text"><string>Willekeurig</string></property></item></widget></item>
17
<item row="5" column="1"><widget class="QComboBox" name="kcfg_MixColor"><item><property name="text"><string>Zwart (#000000)</string></property></item><item><property name="text"><string>Blauw (#0000aa)</string></property></item><item><property name="text"><string>Rood (#aa0000)</string></property></item><item><property name="text"><string>Groen (#00aa00)</string></property></item><item><property name="text"><string>Paars (#6600aa)</string></property></item><item><property name="text"><string>Geel (#aaaa00)</string></property></item><item><property name="text"><string>Oranje (#aa5500)</string></property></item><item><property name="text"><string>Cyaan (#00aaaa)</string></property></item><item><property name="text"><string>Roze (#aa0066)</string></property></item><item><property name="text"><string>Grijs (#555555)</string></property></item><item><property name="text"><string>Bruin (#553300)</string></property></item><item><property name="text"><string>Willekeurig</string></property></item></widget></item>
18
18
<item row="6" column="0"><widget class="QLabel" name="l7"><property name="text"><string>Marble size (px)</string></property></widget></item>
19
19
<item row="6" column="1"><widget class="QSpinBox" name="kcfg_MarbleSize"><property name="minimum"><number>4</number></property><property name="maximum"><number>1000</number></property></widget></item>
20
20
</layout>
@@ -14,7 +14,7 @@14
<item row="4" column="0"><widget class="QLabel" name="l5"><property name="text"><string>Black mix center (%)</string></property></widget></item>14
<item row="4" column="0"><widget class="QLabel" name="l5"><property name="text"><string>Black mix center (%)</string></property></widget></item>15
<item row="4" column="1"><widget class="QSpinBox" name="kcfg_BlackMixCenter"><property name="maximum"><number>100</number></property></widget></item>15
<item row="4" column="1"><widget class="QSpinBox" name="kcfg_BlackMixCenter"><property name="maximum"><number>100</number></property></widget></item>16
<item row="5" column="0"><widget class="QLabel" name="l6"><property name="text"><string>Mix colour</string></property></widget></item>16
<item row="5" column="0"><widget class="QLabel" name="l6"><property name="text"><string>Mix colour</string></property></widget></item>17
<item row="5" column="1"><widget class="QComboBox" name="kcfg_MixColor"><item><property name="text"><string>Zwart (#000000)</string></property></item><item><property name="text"><string>Blauw (#0000aa)</string></property></item><item><property name="text"><string>Rood (#aa0000)</string></property></item><item><property name="text"><string>Groen (#00aa00)</string></property></item><item><property name="text"><string>Paars (#6600aa)</string></property></item><item><property name="text"><string>Geel (#aaaa00)</string></property></item><item><property name="text"><string>Oranje (#aa5500)</string></property></item><item><property name="text"><string>Cyaan (#00aaaa)</string></property></item><item><property name="text"><string>Roze (#aa0066)</string></property></item><item><property name="text"><string>Grijs (#555555)</string></property></item><item><property name="text"><string>Wit (#ffffff)</string></property></item><item><property name="text"><string>Bruin (#553300)</string></property></item><item><property name="text"><string>Willekeurig</string></property></item></widget></item>17
<item row="5" column="1"><widget class="QComboBox" name="kcfg_MixColor"><item><property name="text"><string>Zwart (#000000)</string></property></item><item><property name="text"><string>Blauw (#0000aa)</string></property></item><item><property name="text"><string>Rood (#aa0000)</string></property></item><item><property name="text"><string>Groen (#00aa00)</string></property></item><item><property name="text"><string>Paars (#6600aa)</string></property></item><item><property name="text"><string>Geel (#aaaa00)</string></property></item><item><property name="text"><string>Oranje (#aa5500)</string></property></item><item><property name="text"><string>Cyaan (#00aaaa)</string></property></item><item><property name="text"><string>Roze (#aa0066)</string></property></item><item><property name="text"><string>Grijs (#555555)</string></property></item><item><property name="text"><string>Bruin (#553300)</string></property></item><item><property name="text"><string>Willekeurig</string></property></item></widget></item>18
<item row="6" column="0"><widget class="QLabel" name="l7"><property name="text"><string>Marble size (px)</string></property></widget></item>18
<item row="6" column="0"><widget class="QLabel" name="l7"><property name="text"><string>Marble size (px)</string></property></widget></item>19
<item row="6" column="1"><widget class="QSpinBox" name="kcfg_MarbleSize"><property name="minimum"><number>4</number></property><property name="maximum"><number>1000</number></property></widget></item>19
<item row="6" column="1"><widget class="QSpinBox" name="kcfg_MarbleSize"><property name="minimum"><number>4</number></property><property name="maximum"><number>1000</number></property></widget></item>20
</layout>20
</layout>