Merge branch 'main' into newMain
This commit is contained in:
@@ -49,6 +49,9 @@ import TVEffect from './src/effects/TVEffect.js';
|
||||
import TVGlitch from './src/effects/TVGlitch.js';
|
||||
import UnicornFart from './src/effects/UnicornFart.js';
|
||||
import Wisps from './src/effects/Wisps.js';
|
||||
import Mushroom from './src/effects/Mushroom.js';
|
||||
|
||||
import UnicornFart from './src/effects/UnicornFart.js';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,4 +16,5 @@
|
||||
],
|
||||
"url": "https://github.com/Schneegans/Burn-My-Windows",
|
||||
"version": 47
|
||||
|
||||
}
|
||||
|
||||
@@ -193,13 +193,24 @@ export default class BurnMyWindowsPreferences extends ExtensionPreferences {
|
||||
this._searchEntry.connect('search-changed', () => {
|
||||
const query = this._searchEntry.get_text().toLowerCase();
|
||||
|
||||
this._effectRows.forEach(er => {
|
||||
this._effectRows.forEach(row => {
|
||||
if (query === '') {
|
||||
er.show(); // Show all effects if query is empty
|
||||
row.show(); // Show all effects if query is empty
|
||||
} else {
|
||||
// Show or hide each effect based on query match
|
||||
const showEffect = er.name.toLowerCase().includes(query);
|
||||
showEffect ? er.show() : er.hide();
|
||||
const showEffect = row.name.toLowerCase().includes(query);
|
||||
|
||||
// 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
|
||||
// maybe add a fuzzy search later
|
||||
|
||||
@@ -367,7 +367,9 @@ vec4 getStars(vec2 starUV, float aspect, float progress, float oColorAlpha)
|
||||
//each star in each ring
|
||||
for (float s = 0.0; s < uStarCount; ++s)
|
||||
{
|
||||
|
||||
//this returns a Star
|
||||
|
||||
float a5ps = getStar(
|
||||
starUV,
|
||||
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)) );
|
||||
|
||||
//if we want the star behind or infront of the window
|
||||
|
||||
if (depth < 0.0)
|
||||
{
|
||||
result = alphaOver(result,getStarColor(y,a5ps));
|
||||
|
||||
@@ -45,6 +45,7 @@ float FadeInOut(float t, float power)
|
||||
}
|
||||
|
||||
|
||||
|
||||
void main() {
|
||||
|
||||
// Calculate the progression value based on the animation direction.
|
||||
@@ -62,6 +63,7 @@ void main() {
|
||||
// w is the wave
|
||||
float w = 0.0;
|
||||
|
||||
|
||||
//w will be used to calculate the the size of the wave
|
||||
float p = mix(0.0, 1.0 + uWavesize, progress);
|
||||
w = 1.0 - abs(p - f.y);
|
||||
@@ -72,11 +74,13 @@ void main() {
|
||||
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
|
||||
|
||||
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.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 (oColor.r + oColor.g + oColor.b > 0.0)
|
||||
{
|
||||
oColor.a = getInputColor(uv).a ;
|
||||
@@ -87,5 +91,6 @@ void main() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
setOutputColor(oColor);
|
||||
}
|
||||
|
||||
@@ -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 vec2 uSeed; // and random numbers
|
||||
|
||||
|
||||
//use to scale the window
|
||||
vec2 scaleUV(vec2 uv, vec2 scale, vec2 centerOffset)
|
||||
{
|
||||
@@ -54,6 +55,7 @@ vec2 scaleUV(vec2 uv, vec2 scale, vec2 centerOffset)
|
||||
// scale from center
|
||||
uv = uv * 0.5 + 0.5;
|
||||
|
||||
|
||||
return uv;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
// The width of the fading effect is loaded from the settings.
|
||||
|
||||
|
||||
//variables
|
||||
uniform float uSparkCount; //number of 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
|
||||
|
||||
|
||||
|
||||
//particle colors
|
||||
uniform vec4 uSparkColor0;
|
||||
uniform vec4 uSparkColor1;
|
||||
@@ -518,6 +520,7 @@ void main() {
|
||||
oColor = alphaOver(oColor, getStars(mix(0.0001,0.999,ioSine)));
|
||||
}
|
||||
|
||||
|
||||
//output
|
||||
setOutputColor(oColor);
|
||||
}
|
||||
@@ -63,7 +63,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<child>
|
||||
<object class="AdwPreferencesGroup">
|
||||
<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>
|
||||
<object class="AdwActionRow">
|
||||
@@ -181,7 +182,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<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="activatable-widget">profile-high-priority</property>
|
||||
<child>
|
||||
|
||||
+5
-1
@@ -59,7 +59,9 @@ export var Shader = GObject.registerClass({
|
||||
'end-animation': {}
|
||||
}
|
||||
},
|
||||
|
||||
class Shader extends Shell.GLSLEffect {
|
||||
|
||||
// --------------------------------------------
|
||||
// The constructor automagically loads the shader's source code (in
|
||||
// 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...
|
||||
return common + '\n' + code + '\n';
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ export default class ShaderFactory {
|
||||
// Only try to register the new type once.
|
||||
if (GObject.type_from_name(typeName) == null) {
|
||||
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.
|
||||
_init() {
|
||||
super._init(outerThis._nick);
|
||||
|
||||
+3
-1
@@ -172,4 +172,6 @@ export function parseColor(string) {
|
||||
|
||||
|
||||
return [color.red / 255, color.green / 255, color.blue / 255, color.alpha / 255];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user