20241230
This commit is contained in:
@@ -48,9 +48,8 @@ This extension is not only more useless than the cube, but it is also much more
|
||||
| **Pixel Wheel** <br> This simple effect pixelates the window and hides the pixels in a wheel-like fashion. | <img src ="docs/pics/pixel-wheel.gif" /> |
|
||||
| **Pixel Wipe** <br> This effect pixelates the window and hides the pixels radially, starting from the pointer position. | <img src ="docs/pics/pixel-wipe.gif" /> |
|
||||
| **Portal** <br> This ridiculous effect teleports your windows from and to alternative dimensions. It may resemble the portal from a well-known cartoon series... | <img src ="docs/pics/portal.gif" /> |
|
||||
| **RGB Warp** <br> Red Blue and Green go bye bye. | <img src ="docs/pics/rgbwarp.gif" /> |
|
||||
| **RGB Warp** <br> Red Blue and Green go bye bye. | <img src ="docs/pics/rgbwarp.gif" /> |
|
||||
| **Snap of Disintegration** <br> Dissolve your windows into a cloud of dust. | <img src ="docs/pics/snap.gif" /> |
|
||||
| **TeamRocket** <br> TeamRocket is Blasting off AAAAGGGGGAAAAAIIINNNN! | <img src ="docs/pics/teamrocket.gif" /> |
|
||||
| **T-Rex Attack** <br> Destroy your windows with a series of violent slashes! | <img src ="docs/pics/trex.gif" /> |
|
||||
| **TV Effect** <br> This is a very simple effect to demonstrate that this extension could also be used in a more professional environment. | <img src ="docs/pics/tv.gif" /> |
|
||||
| **TV Glitch** <br> This effect combines the Glitch and the TV Effect. | <img src ="docs/pics/tv-glitch.gif" /> |
|
||||
@@ -90,7 +89,6 @@ Below is a table which summarizes the current availability for all effects.
|
||||
<tr><td>Portal</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
|
||||
<tr><td>RGB Warp</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
|
||||
<tr><td>Snap of Disintegration</td> <td> </td> <td> </td> <td>✅</td> <td> </td> </tr>
|
||||
<tr><td>TeamRocket</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
|
||||
<tr><td>T-Rex Attack</td> <td> </td> <td> </td> <td>✅</td> <td> </td> </tr>
|
||||
<tr><td>TV Effect</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
|
||||
<tr><td>TV Glitch</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -48,7 +48,45 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
</object>
|
||||
</child>
|
||||
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
|
||||
<property name="title" translatable="yes">Animation Split</property>
|
||||
<property name="subtitle" translatable="yes"></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="team-rocket-window-time">
|
||||
<property name="upper">0.8</property>
|
||||
<property name="lower">0.2</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-team-rocket-window-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">
|
||||
|
||||
|
||||
@@ -1069,13 +1069,13 @@ SPDX-License-Identifier: CC0-1.0
|
||||
</key>
|
||||
|
||||
<key name="rgbwarp-offset-g" type="d">
|
||||
<default>0.80</default>
|
||||
<default>0.90</default>
|
||||
<summary>RGBWarp Green Offset</summary>
|
||||
<description>Green offset of the effect.</description>
|
||||
</key>
|
||||
|
||||
<key name="rgbwarp-offset-b" type="d">
|
||||
<default>0.60</default>
|
||||
<default>0.80</default>
|
||||
<summary>RGBWarp Blue Offset</summary>
|
||||
<description>Blue offset of the effect.</description>
|
||||
</key>
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user