gl-transitions 1.72.0 → 1.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gl-transitions.js +1 -1
- package/gl-transitions.json +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/sksl/Fold.sksl +3 -3
- package/sksl/old_tv_lost_signal.sksl +1 -1
- package/sksl/undulatingBurnOut.sksl +4 -1
- package/transitions/Fold.glsl +3 -3
- package/transitions/luminance_melt.glsl +1 -1
- package/transitions/old_tv_lost_signal.glsl +1 -1
- package/transitions/undulatingBurnOut.glsl +4 -1
package/package.json
CHANGED
package/sksl/Fold.sksl
CHANGED
|
@@ -13,9 +13,9 @@ vec4 getFromColor(vec2 uv) { return vec4(unpremul(_from.eval(vec2(uv.x, 1.0 - uv
|
|
|
13
13
|
vec4 getToColor(vec2 uv) { return vec4(unpremul(_to.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
14
14
|
|
|
15
15
|
vec4 transition(vec2 uv) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return
|
|
16
|
+
|
|
17
|
+
if (progress == 0.0 || uv.x > progress) return getFromColor((uv - vec2(progress, 0.0)) / vec2(1.0 - progress, 1.0));
|
|
18
|
+
return getToColor(uv / vec2(progress, 1.0));
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
half4 main(float2 _coord) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// old_tv_lost_signal — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/old_tv_lost_signal.glsl
|
|
2
|
-
// Author: mernking gitlab
|
|
2
|
+
// Author: mernking (gitlab.com/Godswork)
|
|
3
3
|
// License: MIT
|
|
4
4
|
// Description: A crossfade with drifting tracking lines and tearing, like a TV losing its signal
|
|
5
5
|
|
|
@@ -47,7 +47,10 @@ float getWave(vec2 p){
|
|
|
47
47
|
float offset = mix(40.0, 30.0, smoothstep(0.0, 1.0, x));
|
|
48
48
|
float ease_degs = quadraticInOut(sin(degs));
|
|
49
49
|
float deg_wave_pos = (ease_degs * magnitude) * sin(x * offset);
|
|
50
|
-
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
return x - max(smoothness, 0.01) * (1.0 - smoothstep(0.0, 0.1, x)) + deg_wave_pos;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
vec4 transition(vec2 p) {
|
package/transitions/Fold.glsl
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// Ported from https://gist.github.com/nwoeanhinnogaehr/f6fc39f4cfcbb97f96a6
|
|
6
6
|
|
|
7
7
|
vec4 transition(vec2 uv) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return
|
|
8
|
+
// Only sample the visible side: the other one divides by zero at progress 0 and 1.
|
|
9
|
+
if (progress == 0.0 || uv.x > progress) return getFromColor((uv - vec2(progress, 0.0)) / vec2(1.0 - progress, 1.0));
|
|
10
|
+
return getToColor(uv / vec2(progress, 1.0));
|
|
11
11
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
//direction of movement : 0 : up, 1, down
|
|
15
15
|
// @param Direction of the melt (false: up, true: down)
|
|
16
|
-
uniform bool direction; // =
|
|
16
|
+
uniform bool direction; // = true
|
|
17
17
|
//luminance threshold
|
|
18
18
|
// @range(0, 1) Luminance threshold
|
|
19
19
|
uniform float l_threshold; // = 0.8
|
|
@@ -40,7 +40,10 @@ float getWave(vec2 p){
|
|
|
40
40
|
float offset = mix(40.0, 30.0, smoothstep(0.0, 1.0, x));
|
|
41
41
|
float ease_degs = quadraticInOut(sin(degs));
|
|
42
42
|
float deg_wave_pos = (ease_degs * magnitude) * sin(x * offset);
|
|
43
|
-
|
|
43
|
+
// The soft edge reaches `smoothness` beyond the radius and the burn band 0.005 inside it:
|
|
44
|
+
// start the radius below both so nothing but the outgoing image shows at progress 0
|
|
45
|
+
// (unchanged from progress 0.1 on).
|
|
46
|
+
return x - max(smoothness, 0.01) * (1.0 - smoothstep(0.0, 0.1, x)) + deg_wave_pos;
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
vec4 transition(vec2 p) {
|