diff --git a/README.md b/README.md index d2890bb..421cda5 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,8 @@ This extension is not only more useless than the cube, but it is also much more | **Pixel Wheel**
This simple effect pixelates the window and hides the pixels in a wheel-like fashion. | | | **Pixel Wipe**
This effect pixelates the window and hides the pixels radially, starting from the pointer position. | | | **Portal**
This ridiculous effect teleports your windows from and to alternative dimensions. It may resemble the portal from a well-known cartoon series... | | -| **RGB Warp**
Red Blue and Green go bye bye. | | +| **RGB Warp**
Red Blue and Green go bye bye. | | | **Snap of Disintegration**
Dissolve your windows into a cloud of dust. | | -| **TeamRocket**
TeamRocket is Blasting off AAAAGGGGGAAAAAIIINNNN! | | | **T-Rex Attack**
Destroy your windows with a series of violent slashes! | | | **TV Effect**
This is a very simple effect to demonstrate that this extension could also be used in a more professional environment. | | | **TV Glitch**
This effect combines the Glitch and the TV Effect. | | @@ -90,7 +89,6 @@ Below is a table which summarizes the current availability for all effects. Portal ✅ ✅ ✅ ✅ RGB Warp ✅ ✅ ✅ ✅ Snap of Disintegration ✅ -TeamRocket ✅ ✅ ✅ ✅ T-Rex Attack ✅ TV Effect ✅ ✅ ✅ ✅ TV Glitch ✅ ✅ ✅ ✅ diff --git a/resources/shaders/team-rocket.frag b/resources/shaders/team-rocket.frag index f230228..cc6dd02 100644 --- a/resources/shaders/team-rocket.frag +++ b/resources/shaders/team-rocket.frag @@ -33,6 +33,7 @@ // The width of the fading effect is loaded from the settings. // uniform float uFadeWidth; +uniform float uWT; uniform float uXpos; uniform float uYpos; uniform float uSparkleRot; @@ -122,16 +123,21 @@ void main() { // scale progress ... the first half of the animation float scalep = remap( progress, - 0.0,0.6, + //0.0,clamp(uWT + 0.1,0.0,1.0), + // 0.0,0.6, + 0.0,uWT+0.1, 0.0,1.0 ); - scalep = easeInOutQuad(scalep); + // scalep = easeInOutSine(scalep); + scalep = easeOutQuad(scalep); // sparkle progress ... the second half of the animation float sparkp = remap( progress, - 0.4,1.0, + // clamp((1.0 - uWT) - 0.1,0.0,1.0),1.0, + // 0.4,1.0, + uWT-0.1,1.0, 0.0,1.0 ); sparkp = easeInOutSine(sparkp); @@ -144,7 +150,11 @@ void main() { // // this is the offset of the window... don't let them go too far each way vec2 offset = vec2(uXpos,uYpos*-1.0) * 0.20; - vec2 scaleOffset = mix(vec2(0.0),offset,scalep); + vec2 scaleOffset = mix( + vec2(0.0), + vec2(uXpos,uYpos*-1.0) * 0.50, + scalep + ); //the UV for this function float aspect = uSize.x / uSize.y; diff --git a/resources/ui/adw/team-rocket.ui b/resources/ui/adw/team-rocket.ui index f381a2d..fb5156f 100644 --- a/resources/ui/adw/team-rocket.ui +++ b/resources/ui/adw/team-rocket.ui @@ -48,7 +48,45 @@ SPDX-License-Identifier: GPL-3.0-or-later - + + + + Animation Split + + + + + center + 1 + 2 + left + 300 + + + + 0.8 + 0.2 + 0.01 + 0.1 + + + + + + + + edit-clear-symbolic + center + Reset to Default Value + + + + + + + diff --git a/schemas/org.gnome.shell.extensions.burn-my-windows-profile.gschema.xml b/schemas/org.gnome.shell.extensions.burn-my-windows-profile.gschema.xml index ed19d0a..8a2e27d 100644 --- a/schemas/org.gnome.shell.extensions.burn-my-windows-profile.gschema.xml +++ b/schemas/org.gnome.shell.extensions.burn-my-windows-profile.gschema.xml @@ -1069,13 +1069,13 @@ SPDX-License-Identifier: CC0-1.0 - 0.80 + 0.90 RGBWarp Green Offset Green offset of the effect. - 0.60 + 0.80 RGBWarp Blue Offset Blue offset of the effect. diff --git a/src/effects/TeamRocket.js b/src/effects/TeamRocket.js index a8485b0..ba7d9cc 100644 --- a/src/effects/TeamRocket.js +++ b/src/effects/TeamRocket.js @@ -39,6 +39,7 @@ export default class Effect { constructor() { this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => { // Store uniform locations of newly created shaders. + shader._uWT = shader.get_uniform_location('uWT'); shader._uXpos = shader.get_uniform_location('uXpos'); shader._uYpos = shader.get_uniform_location('uYpos'); shader._uWinRot = shader.get_uniform_location('uWinRot'); @@ -49,6 +50,10 @@ export default class Effect { // Write all uniform values at the start of each animation. shader.connect('begin-animation', (shader, settings) => { + shader.set_uniform_float(shader._uWT, 1, [ + settings.get_double('team-rocket-window-time'), + ]); + shader.set_uniform_float(shader._uXpos, 1, [ settings.get_double('team-rocket-x'), ]); @@ -105,6 +110,7 @@ export default class Effect { // Empty for now... Code is added here later in the tutorial! dialog.bindAdjustment('team-rocket-animation-time'); + dialog.bindAdjustment('team-rocket-window-time'); dialog.bindAdjustment('team-rocket-x'); dialog.bindAdjustment('team-rocket-y');