Merge branch 'main' into newMain

This commit is contained in:
Justin Garza
2025-01-22 18:56:26 -05:00
committed by GitHub
11 changed files with 45 additions and 9 deletions
+3
View File
@@ -49,6 +49,9 @@ import TVEffect from './src/effects/TVEffect.js';
import TVGlitch from './src/effects/TVGlitch.js'; import TVGlitch from './src/effects/TVGlitch.js';
import UnicornFart from './src/effects/UnicornFart.js'; import UnicornFart from './src/effects/UnicornFart.js';
import Wisps from './src/effects/Wisps.js'; import Wisps from './src/effects/Wisps.js';
import Mushroom from './src/effects/Mushroom.js';
import UnicornFart from './src/effects/UnicornFart.js';
+1
View File
@@ -16,4 +16,5 @@
], ],
"url": "https://github.com/Schneegans/Burn-My-Windows", "url": "https://github.com/Schneegans/Burn-My-Windows",
"version": 47 "version": 47
} }
+15 -4
View File
@@ -193,13 +193,24 @@ export default class BurnMyWindowsPreferences extends ExtensionPreferences {
this._searchEntry.connect('search-changed', () => { this._searchEntry.connect('search-changed', () => {
const query = this._searchEntry.get_text().toLowerCase(); const query = this._searchEntry.get_text().toLowerCase();
this._effectRows.forEach(er => { this._effectRows.forEach(row => {
if (query === '') { if (query === '') {
er.show(); // Show all effects if query is empty row.show(); // Show all effects if query is empty
} else { } else {
// Show or hide each effect based on query match // Show or hide each effect based on query match
const showEffect = er.name.toLowerCase().includes(query); const showEffect = row.name.toLowerCase().includes(query);
showEffect ? er.show() : er.hide();
// old code
// showEffect ? er.show() : er.hide();
// new code ...auto-expand
if (showEffect) {
row.show();
row.set_expanded(true);
} else {
row.set_expanded(false);
row.hide();
}
// TODO // TODO
// maybe add a fuzzy search later // maybe add a fuzzy search later
+3
View File
@@ -367,7 +367,9 @@ vec4 getStars(vec2 starUV, float aspect, float progress, float oColorAlpha)
//each star in each ring //each star in each ring
for (float s = 0.0; s < uStarCount; ++s) for (float s = 0.0; s < uStarCount; ++s)
{ {
//this returns a Star //this returns a Star
float a5ps = getStar( float a5ps = getStar(
starUV, starUV,
vec2( sin(progress * uRingRotation * 6.28 + (s*(6.28/uStarCount))) * aspect * 0.33 , y), //position (x, y) vec2( sin(progress * uRingRotation * 6.28 + (s*(6.28/uStarCount))) * aspect * 0.33 , y), //position (x, y)
@@ -382,6 +384,7 @@ vec4 getStars(vec2 starUV, float aspect, float progress, float oColorAlpha)
float depth = cos(progress * uRingRotation * 6.28 + (s*(6.28/uStarCount)) ); float depth = cos(progress * uRingRotation * 6.28 + (s*(6.28/uStarCount)) );
//if we want the star behind or infront of the window //if we want the star behind or infront of the window
if (depth < 0.0) if (depth < 0.0)
{ {
result = alphaOver(result,getStarColor(y,a5ps)); result = alphaOver(result,getStarColor(y,a5ps));
+5
View File
@@ -45,6 +45,7 @@ float FadeInOut(float t, float power)
} }
void main() { void main() {
// Calculate the progression value based on the animation direction. // Calculate the progression value based on the animation direction.
@@ -62,6 +63,7 @@ void main() {
// w is the wave // w is the wave
float w = 0.0; float w = 0.0;
//w will be used to calculate the the size of the wave //w will be used to calculate the the size of the wave
float p = mix(0.0, 1.0 + uWavesize, progress); float p = mix(0.0, 1.0 + uWavesize, progress);
w = 1.0 - abs(p - f.y); w = 1.0 - abs(p - f.y);
@@ -72,11 +74,13 @@ void main() {
vec4 oColor = vec4(0.0); vec4 oColor = vec4(0.0);
// outputs for RGB is based on the color of the window, times uStreatch(RG and B), and another multipler for the brightness // outputs for RGB is based on the color of the window, times uStreatch(RG and B), and another multipler for the brightness
oColor.r = getInputColor(uv + vec2(0.0,w * uStretchR ) ).r * mix(1.0, uBrightness, FadeInOut(progress,4)); oColor.r = getInputColor(uv + vec2(0.0,w * uStretchR ) ).r * mix(1.0, uBrightness, FadeInOut(progress,4));
oColor.g = getInputColor(uv + vec2(0.0,w * uStretchG ) ).g * mix(1.0, uBrightness, FadeInOut(progress,4)); oColor.g = getInputColor(uv + vec2(0.0,w * uStretchG ) ).g * mix(1.0, uBrightness, FadeInOut(progress,4));
oColor.b = getInputColor(uv + vec2(0.0,w * uStretchB ) ).b * mix(1.0, uBrightness, FadeInOut(progress,4)); oColor.b = getInputColor(uv + vec2(0.0,w * uStretchB ) ).b * mix(1.0, uBrightness, FadeInOut(progress,4));
//if you can think of a better way to handle the alpha ... try that //if you can think of a better way to handle the alpha ... try that
if (oColor.r + oColor.g + oColor.b > 0.0) if (oColor.r + oColor.g + oColor.b > 0.0)
{ {
oColor.a = getInputColor(uv).a ; oColor.a = getInputColor(uv).a ;
@@ -87,5 +91,6 @@ void main() {
} }
setOutputColor(oColor); setOutputColor(oColor);
} }
+2
View File
@@ -41,6 +41,7 @@ uniform float uSparkleSize; // the size of the star
uniform bool uWinRot; //window rotation... but it's more of a warp uniform bool uWinRot; //window rotation... but it's more of a warp
uniform vec2 uSeed; // and random numbers uniform vec2 uSeed; // and random numbers
//use to scale the window //use to scale the window
vec2 scaleUV(vec2 uv, vec2 scale, vec2 centerOffset) vec2 scaleUV(vec2 uv, vec2 scale, vec2 centerOffset)
{ {
@@ -54,6 +55,7 @@ vec2 scaleUV(vec2 uv, vec2 scale, vec2 centerOffset)
// scale from center // scale from center
uv = uv * 0.5 + 0.5; uv = uv * 0.5 + 0.5;
return uv; return uv;
} }
+3
View File
@@ -32,6 +32,7 @@
// The width of the fading effect is loaded from the settings. // The width of the fading effect is loaded from the settings.
//variables //variables
uniform float uSparkCount; //number of sparkles uniform float uSparkCount; //number of sparkles
uniform vec2 uSparkStartEnd; // the start and end of the sparkles uniform vec2 uSparkStartEnd; // the start and end of the sparkles
@@ -44,6 +45,7 @@ uniform float uBlurQuality; // blurquality for the window
uniform float uSeed; // a random number uniform float uSeed; // a random number
//particle colors //particle colors
uniform vec4 uSparkColor0; uniform vec4 uSparkColor0;
uniform vec4 uSparkColor1; uniform vec4 uSparkColor1;
@@ -518,6 +520,7 @@ void main() {
oColor = alphaOver(oColor, getStars(mix(0.0001,0.999,ioSine))); oColor = alphaOver(oColor, getStars(mix(0.0001,0.999,ioSine)));
} }
//output //output
setOutputColor(oColor); setOutputColor(oColor);
} }
+4 -2
View File
@@ -63,7 +63,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
<child> <child>
<object class="AdwPreferencesGroup"> <object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Effect Profile Constraints</property> <property name="title" translatable="yes">Effect Profile Constraints</property>
<property name="description" translatable="yes">Define when the current effect settings should be used.</property> <property name="description" translatable="yes">Define when the current effect
settings should be used.</property>
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
@@ -181,7 +182,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">High Priority</property> <property name="title" translatable="yes">High Priority</property>
<property name="subtitle" translatable="yes">Use this profile even if there are better matching profiles.</property> <property name="subtitle" translatable="yes">Use this profile even if there are
better matching profiles.</property>
<property name="subtitle-lines">1</property> <property name="subtitle-lines">1</property>
<property name="activatable-widget">profile-high-priority</property> <property name="activatable-widget">profile-high-priority</property>
<child> <child>
+4
View File
@@ -59,7 +59,9 @@ export var Shader = GObject.registerClass({
'end-animation': {} 'end-animation': {}
} }
}, },
class Shader extends Shell.GLSLEffect { class Shader extends Shell.GLSLEffect {
// -------------------------------------------- // --------------------------------------------
// The constructor automagically loads the shader's source code (in // The constructor automagically loads the shader's source code (in
// vfunc_build_pipeline()) from the resource file resources/shaders/<nick>.glsl // vfunc_build_pipeline()) from the resource file resources/shaders/<nick>.glsl
@@ -207,4 +209,6 @@ export var Shader = GObject.registerClass({
// Add a trailing newline. Else the GLSL compiler complains... // Add a trailing newline. Else the GLSL compiler complains...
return common + '\n' + code + '\n'; return common + '\n' + code + '\n';
} }
}); });
+1 -1
View File
@@ -61,7 +61,7 @@ export default class ShaderFactory {
// Only try to register the new type once. // Only try to register the new type once.
if (GObject.type_from_name(typeName) == null) { if (GObject.type_from_name(typeName) == null) {
const outerThis = this; const outerThis = this;
GObject.registerClass({GTypeName: typeName}, class ShaderImp extends Shader { GObject.registerClass({GTypeName: typeName}, class ShaderImp extends Shader{
// This will actually load the GLSL source code from the resources. // This will actually load the GLSL source code from the resources.
_init() { _init() {
super._init(outerThis._nick); super._init(outerThis._nick);
+2
View File
@@ -172,4 +172,6 @@ export function parseColor(string) {
return [color.red / 255, color.green / 255, color.blue / 255, color.alpha / 255]; return [color.red / 255, color.green / 255, color.blue / 255, color.alpha / 255];
} }