shaders 2.2.24 → 2.2.25
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/dist/core/AngularBlur-Dl2gwk68.js +64 -0
- package/dist/core/Ascii-Dha_QpT3.js +286 -0
- package/dist/core/Beam-CTN9Ni43.js +139 -0
- package/dist/core/Blob-CxFDZovO.js +218 -0
- package/dist/core/Blur-Y2FsmFk_.js +77 -0
- package/dist/core/Bulge-Cb-t0xqI.js +132 -0
- package/dist/core/CRTScreen-CtERsenz.js +112 -0
- package/dist/core/ChannelBlur-CvM6GJgZ.js +118 -0
- package/dist/core/Checkerboard-CgB-egNY.js +83 -0
- package/dist/core/ChromaFlow-vRCwhQpN.js +222 -0
- package/dist/core/ChromaticAberration-FTquTQIL.js +88 -0
- package/dist/core/Circle-Daziv5d7.js +67 -0
- package/dist/core/CursorTrail-Bsz9e6Fn.js +145 -0
- package/dist/core/DiffuseBlur-Cj2PtRNd.js +83 -0
- package/dist/core/Dither-D2Nf4p3w.js +66 -0
- package/dist/core/DotGrid-CzOwquo4.js +75 -0
- package/dist/core/Duotone-XuTN9tI7.js +65 -0
- package/dist/core/FilmGrain-D3-nbi12.js +28 -0
- package/dist/core/FloatingParticles-D9Nnu1qg.js +217 -0
- package/dist/core/GlassTiles-CnjCvajI.js +69 -0
- package/dist/core/Glow-BluFc9be.js +75 -0
- package/dist/core/Godrays-ChLh_vGl.js +144 -0
- package/dist/core/Grayscale-DRny75A9.js +20 -0
- package/dist/core/Grid-DgyDa4H1.js +58 -0
- package/dist/core/GridDistortion-BAspCYvp.js +188 -0
- package/dist/core/Group-Dul7PUBl.js +14 -0
- package/dist/core/Halftone-Ifv5F_FT.js +65 -0
- package/dist/core/HueShift-De8ukMWs.js +31 -0
- package/dist/core/ImageTexture-DvYcQgJB.js +143 -0
- package/dist/core/Invert-Fz0NtIJc.js +21 -0
- package/dist/core/LinearBlur-LmhnQoA4.js +62 -0
- package/dist/core/LinearGradient-xbloQjzt.js +133 -0
- package/dist/core/Liquify-DMe1V5-O.js +175 -0
- package/dist/core/Pixelate-Cv8537Pj.js +37 -0
- package/dist/core/PolarCoordinates-DDvDhBE-.js +112 -0
- package/dist/core/Posterize-3m3xkWOz.js +29 -0
- package/dist/core/ProgressiveBlur-EGkevObV.js +121 -0
- package/dist/core/RadialGradient-B7ZZB_VJ.js +71 -0
- package/dist/core/RectangularCoordinates-muWR8mZS.js +101 -0
- package/dist/core/Ripples-8XaZaXQF.js +117 -0
- package/dist/core/Saturation-CYFI1jzN.js +30 -0
- package/dist/core/SimplexNoise-DJUe0wz_.js +99 -0
- package/dist/core/SineWave-Dl3nFO1W.js +120 -0
- package/dist/core/SolidColor-CWGq_Bjq.js +21 -0
- package/dist/core/Spherize-C-jZEUsN.js +128 -0
- package/dist/core/Spiral-BSB_R39p.js +132 -0
- package/dist/core/Strands-0stO5BMy.js +161 -0
- package/dist/core/Stretch-B645paha.js +133 -0
- package/dist/core/Swirl-CVnbawit.js +173 -0
- package/dist/core/TiltShift-0CxNRI6L.js +134 -0
- package/dist/core/Tritone-Daa-I5UD.js +76 -0
- package/dist/core/Twirl-2CJVZEtk.js +96 -0
- package/dist/core/Vibrance-DRtecEvb.js +30 -0
- package/dist/core/WaveDistortion-BscXN2rs.js +173 -0
- package/dist/core/ZoomBlur-CAqK0Kju.js +62 -0
- package/dist/core/colorMixing-BXiTAqJU.js +69 -0
- package/dist/core/edges-Bn_OIa_h.js +26 -0
- package/dist/core/index.js +2257 -1606
- package/dist/core/shaders/AngularBlur/index.js +3 -7
- package/dist/core/shaders/Ascii/index.js +2 -6
- package/dist/core/shaders/Beam/index.js +4 -8
- package/dist/core/shaders/Blob/index.js +5 -9
- package/dist/core/shaders/Blur/index.js +2 -6
- package/dist/core/shaders/Bulge/index.js +4 -8
- package/dist/core/shaders/CRTScreen/index.js +2 -6
- package/dist/core/shaders/ChannelBlur/index.js +2 -6
- package/dist/core/shaders/Checkerboard/index.js +4 -8
- package/dist/core/shaders/ChromaFlow/index.js +3 -7
- package/dist/core/shaders/ChromaticAberration/index.js +3 -7
- package/dist/core/shaders/Circle/index.js +3 -7
- package/dist/core/shaders/CursorTrail/index.js +4 -8
- package/dist/core/shaders/DiffuseBlur/index.js +4 -8
- package/dist/core/shaders/Dither/index.js +3 -7
- package/dist/core/shaders/DotGrid/index.js +3 -7
- package/dist/core/shaders/Duotone/index.js +4 -8
- package/dist/core/shaders/FilmGrain/index.js +2 -6
- package/dist/core/shaders/FloatingParticles/index.js +3 -7
- package/dist/core/shaders/GlassTiles/index.js +2 -6
- package/dist/core/shaders/Glow/index.js +2 -6
- package/dist/core/shaders/Godrays/index.js +3 -7
- package/dist/core/shaders/Grayscale/index.js +2 -8
- package/dist/core/shaders/Grid/index.js +3 -7
- package/dist/core/shaders/GridDistortion/index.js +4 -8
- package/dist/core/shaders/Group/index.js +2 -6
- package/dist/core/shaders/Halftone/index.js +3 -7
- package/dist/core/shaders/HueShift/index.js +2 -8
- package/dist/core/shaders/ImageTexture/index.js +2 -6
- package/dist/core/shaders/Invert/index.js +2 -6
- package/dist/core/shaders/LinearBlur/index.js +3 -7
- package/dist/core/shaders/LinearGradient/index.js +4 -8
- package/dist/core/shaders/Liquify/index.js +4 -8
- package/dist/core/shaders/Pixelate/index.js +2 -6
- package/dist/core/shaders/PolarCoordinates/index.js +4 -8
- package/dist/core/shaders/Posterize/index.js +2 -7
- package/dist/core/shaders/ProgressiveBlur/index.js +3 -7
- package/dist/core/shaders/RadialGradient/index.js +4 -8
- package/dist/core/shaders/RectangularCoordinates/index.js +4 -8
- package/dist/core/shaders/Ripples/index.js +5 -9
- package/dist/core/shaders/Saturation/index.js +2 -8
- package/dist/core/shaders/SimplexNoise/index.js +5 -9
- package/dist/core/shaders/SineWave/index.js +3 -7
- package/dist/core/shaders/SolidColor/index.js +3 -7
- package/dist/core/shaders/Spherize/index.js +3 -7
- package/dist/core/shaders/Spiral/index.js +4 -8
- package/dist/core/shaders/Strands/index.js +4 -8
- package/dist/core/shaders/Stretch/index.js +4 -8
- package/dist/core/shaders/Swirl/index.js +5 -9
- package/dist/core/shaders/TiltShift/index.js +3 -7
- package/dist/core/shaders/Tritone/index.js +4 -8
- package/dist/core/shaders/Twirl/index.js +4 -8
- package/dist/core/shaders/Vibrance/index.js +2 -8
- package/dist/core/shaders/WaveDistortion/index.js +4 -8
- package/dist/core/shaders/ZoomBlur/index.js +3 -7
- package/dist/core/telemetry/index.js +189 -157
- package/dist/core/time-CTJvRUZ4.js +10 -0
- package/dist/core/transformations-DxfQXZWi.js +4715 -0
- package/dist/react/generatePresetCode-CCibXbtZ.js +645 -0
- package/dist/react/index.js +7645 -104827
- package/dist/react/utils/generatePresetCode.js +2 -5
- package/dist/solid/index.js +6670 -102727
- package/dist/solid/utils/generatePresetCode.js +583 -554
- package/dist/svelte/generatePresetCode-CymgoDq_.js +645 -0
- package/dist/svelte/index.js +6175 -102645
- package/dist/svelte/utils/generatePresetCode.js +2 -5
- package/dist/vue/generatePresetCode-CRJmU8iF.js +649 -0
- package/dist/vue/index.js +6929 -103706
- package/dist/vue/utils/generatePresetCode.js +2 -5
- package/package.json +4 -1
- package/dist/core/AngularBlur-ClvtyURQ.js +0 -56
- package/dist/core/Ascii-BT0-K_vw.js +0 -196
- package/dist/core/Beam-BAKql1AP.js +0 -116
- package/dist/core/Blob-CVSxhHJG.js +0 -169
- package/dist/core/Blur-C1TTBHCX.js +0 -64
- package/dist/core/Bulge-DV8tX-cw.js +0 -103
- package/dist/core/CRTScreen-VTJQoOeq.js +0 -91
- package/dist/core/ChannelBlur-BLZ9kBNA.js +0 -89
- package/dist/core/Checkerboard-DQ4Df3vm.js +0 -75
- package/dist/core/ChromaFlow-BggN1_Av.js +0 -134
- package/dist/core/ChromaticAberration-DlTaHNcp.js +0 -82
- package/dist/core/Circle-B9ObWlq5.js +0 -62
- package/dist/core/ColorAdjustment-FeXXpypd.js +0 -14
- package/dist/core/CursorTrail-C7QdUj8O.js +0 -105
- package/dist/core/DiffuseBlur-Mx6LBsqz.js +0 -69
- package/dist/core/Dither-CeIdV_9C.js +0 -61
- package/dist/core/DotGrid-D6xUvYrt.js +0 -61
- package/dist/core/Duotone-C2Pqt2gR.js +0 -66
- package/dist/core/FilmGrain-CJ9n_fgk.js +0 -28
- package/dist/core/FloatingParticles-iGtMs44K.js +0 -160
- package/dist/core/GlassTiles-D_lVyag2.js +0 -52
- package/dist/core/Glow-B0jj-6OC.js +0 -66
- package/dist/core/Godrays-DjLVuZa4.js +0 -105
- package/dist/core/Grayscale-BbsdDa_X.js +0 -21
- package/dist/core/Grid-ByjU-_ua.js +0 -50
- package/dist/core/GridDistortion-C_eIlhkW.js +0 -147
- package/dist/core/Group-CyaDLGpI.js +0 -17
- package/dist/core/Halftone-BvuAe_k-.js +0 -55
- package/dist/core/HueShift-B_qE9c08.js +0 -32
- package/dist/core/ImageTexture-h00TFC1l.js +0 -105
- package/dist/core/Invert-BEDDB0sm.js +0 -20
- package/dist/core/LinearBlur-CLKxuyeT.js +0 -56
- package/dist/core/LinearGradient-BPo8TX_M.js +0 -111
- package/dist/core/Liquify-DGkfeixZ.js +0 -139
- package/dist/core/Pixelate-Bzy_7LnJ.js +0 -38
- package/dist/core/PolarCoordinates-BUumPeTv.js +0 -103
- package/dist/core/Posterize-ggKIJlmm.js +0 -46
- package/dist/core/ProgressiveBlur-D6_6T7SS.js +0 -102
- package/dist/core/RadialGradient-DEY9fRqa.js +0 -71
- package/dist/core/RectangularCoordinates-CZ-cFrCh.js +0 -92
- package/dist/core/Ripples-BwNlcsnV.js +0 -106
- package/dist/core/Saturation-Dl3gCWuZ.js +0 -31
- package/dist/core/SimplexNoise-BhE_WyGt.js +0 -94
- package/dist/core/SineWave-Db_Y0Mcv.js +0 -107
- package/dist/core/SolidColor-CerOp4EQ.js +0 -22
- package/dist/core/Spherize-Dh8E5XwG.js +0 -103
- package/dist/core/Spiral-BvygQEfP.js +0 -115
- package/dist/core/Strands-maaPn4On.js +0 -125
- package/dist/core/Stretch-CnA0-nSz.js +0 -103
- package/dist/core/Swirl-CQBUahTB.js +0 -148
- package/dist/core/TSLBase-Bt7Z4hv_.js +0 -8053
- package/dist/core/TiltShift-qFj0oFzN.js +0 -114
- package/dist/core/Tritone-AiixmTg8.js +0 -75
- package/dist/core/Twirl-ooHQcV89.js +0 -82
- package/dist/core/Vibrance-C2FRlLkK.js +0 -31
- package/dist/core/WaveDistortion-CN8MjKlm.js +0 -132
- package/dist/core/ZoomBlur-CxWGx8PH.js +0 -56
- package/dist/core/colorMixing--dhzx0ch.js +0 -21
- package/dist/core/edges-CDzKsauJ.js +0 -15
- package/dist/core/three.tsl-Btj1hLsf.js +0 -43845
- package/dist/core/time-DbRMw6Jm.js +0 -10
- package/dist/core/transformations-CsrIJXh-.js +0 -3992
- package/dist/react/generatePresetCode-CVj6IV8Y.js +0 -646
- package/dist/svelte/generatePresetCode-CVj6IV8Y.js +0 -646
- package/dist/vue/generatePresetCode-DCaIsDhE.js +0 -652
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { O as V, d as i, m as R } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
import { t as S } from "./edges-CDzKsauJ.js";
|
|
3
|
-
import { a as w, o as E } from "./transformations-CsrIJXh-.js";
|
|
4
|
-
const P = {
|
|
5
|
-
name: "Bulge",
|
|
6
|
-
category: "Distortions",
|
|
7
|
-
description: "Magnify or pinch content around a center point",
|
|
8
|
-
requiresRTT: !0,
|
|
9
|
-
requiresChild: !0,
|
|
10
|
-
props: {
|
|
11
|
-
center: {
|
|
12
|
-
default: {
|
|
13
|
-
x: 0.5,
|
|
14
|
-
y: 0.5
|
|
15
|
-
},
|
|
16
|
-
transform: E,
|
|
17
|
-
description: "The center point of the bulge effect",
|
|
18
|
-
ui: {
|
|
19
|
-
type: "position",
|
|
20
|
-
label: "Center"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
strength: {
|
|
24
|
-
default: 1,
|
|
25
|
-
description: "The intensity of the bulge effect (positive = bulge out, negative = pinch in)",
|
|
26
|
-
ui: {
|
|
27
|
-
type: "range",
|
|
28
|
-
min: -1,
|
|
29
|
-
max: 1,
|
|
30
|
-
step: 0.01,
|
|
31
|
-
label: "Strength"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
radius: {
|
|
35
|
-
default: 1,
|
|
36
|
-
description: "The radius of the bulge effect area",
|
|
37
|
-
ui: {
|
|
38
|
-
type: "range",
|
|
39
|
-
min: 0,
|
|
40
|
-
max: 5,
|
|
41
|
-
step: 0.01,
|
|
42
|
-
label: "Radius"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
falloff: {
|
|
46
|
-
default: 0.5,
|
|
47
|
-
description: "Controls the smoothness of the transition (0 = hard edge, 1 = very smooth)",
|
|
48
|
-
ui: {
|
|
49
|
-
type: "range",
|
|
50
|
-
min: 0,
|
|
51
|
-
max: 1,
|
|
52
|
-
step: 0.01,
|
|
53
|
-
label: "Falloff"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
edges: {
|
|
57
|
-
default: "stretch",
|
|
58
|
-
description: "How to handle edges when distortion pushes content out of bounds",
|
|
59
|
-
transform: w,
|
|
60
|
-
ui: {
|
|
61
|
-
type: "select",
|
|
62
|
-
options: [
|
|
63
|
-
{
|
|
64
|
-
label: "Stretch",
|
|
65
|
-
value: "stretch"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
label: "Transparent",
|
|
69
|
-
value: "transparent"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
label: "Mirror",
|
|
73
|
-
value: "mirror"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
label: "Wrap",
|
|
77
|
-
value: "wrap"
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
label: "Edges"
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
uvTransformNode: ({ uv: e, uniforms: o, viewportSize: u }) => {
|
|
85
|
-
const { vec2: n, length: b, smoothstep: x, float: t, max: d } = V, c = u.x.div(u.y), y = n(e.x.mul(c), e.y), s = n(o.center.uniform.x.mul(c), o.center.uniform.y.oneMinus()), a = y.sub(s), f = b(a), r = o.radius.uniform.mul(0.5), m = o.falloff.uniform, p = x(r.mul(t(1).sub(m).sub(t(1e-3)).max(t(0))), r, f).oneMinus(), l = f.div(r), v = l.mul(l), T = d(t(0), t(1).sub(v)), g = p.mul(T), F = o.strength.uniform.negate().mul(g), q = t(1).add(F), D = a.mul(q), h = s.add(D);
|
|
86
|
-
return n(h.x.div(c), h.y);
|
|
87
|
-
},
|
|
88
|
-
fragmentNode: ({ uniforms: e, childNode: o, onCleanup: u }) => {
|
|
89
|
-
const { vec2: n, vec4: b, length: x, screenUV: t, viewportSize: d, convertToTexture: c, smoothstep: y } = V;
|
|
90
|
-
if (!o) return b(0, 0, 0, 0);
|
|
91
|
-
const s = c(o);
|
|
92
|
-
u(() => {
|
|
93
|
-
s?.renderTarget?.dispose && s.renderTarget.dispose();
|
|
94
|
-
});
|
|
95
|
-
const a = d.x.div(d.y), f = n(t.x.mul(a), t.y), r = n(e.center.uniform.x.mul(a), e.center.uniform.y.oneMinus()), m = f.sub(r), p = x(m), l = e.radius.uniform.mul(0.5), v = e.falloff.uniform, T = y(l.mul(i(1).sub(v).sub(i(1e-3)).max(i(0))), l, p).oneMinus(), g = p.div(l), F = g.mul(g), q = R(i(0), i(1).sub(F)), D = T.mul(q), h = e.strength.uniform.negate().mul(D), C = i(1).add(h), A = m.mul(C), M = r.add(A), U = n(M.x.div(a), M.y);
|
|
96
|
-
return S(U, s.sample(U), s, e.edges.uniform);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
var H = P;
|
|
100
|
-
export {
|
|
101
|
-
P as n,
|
|
102
|
-
H as t
|
|
103
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { O as E } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
const N = {
|
|
3
|
-
name: "CRTScreen",
|
|
4
|
-
category: "Stylize",
|
|
5
|
-
description: "Retro CRT monitor simulation with scanlines",
|
|
6
|
-
requiresRTT: !0,
|
|
7
|
-
requiresChild: !0,
|
|
8
|
-
props: {
|
|
9
|
-
pixelSize: {
|
|
10
|
-
default: 128,
|
|
11
|
-
description: "Size of individual TV pixels (lower = more pixels)",
|
|
12
|
-
ui: {
|
|
13
|
-
type: "range",
|
|
14
|
-
min: 8,
|
|
15
|
-
max: 128,
|
|
16
|
-
step: 1,
|
|
17
|
-
label: "Pixel Size"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
colorShift: {
|
|
21
|
-
default: 1,
|
|
22
|
-
description: "Chromatic aberration amount",
|
|
23
|
-
ui: {
|
|
24
|
-
type: "range",
|
|
25
|
-
min: 0,
|
|
26
|
-
max: 10,
|
|
27
|
-
step: 0.1,
|
|
28
|
-
label: "Color Shift"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
scanlineIntensity: {
|
|
32
|
-
default: 0.3,
|
|
33
|
-
description: "Strength of horizontal scanlines",
|
|
34
|
-
ui: {
|
|
35
|
-
type: "range",
|
|
36
|
-
min: 0,
|
|
37
|
-
max: 1,
|
|
38
|
-
step: 0.01,
|
|
39
|
-
label: "Scanline Intensity"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
scanlineFrequency: {
|
|
43
|
-
default: 200,
|
|
44
|
-
description: "Number of scanlines across screen",
|
|
45
|
-
ui: {
|
|
46
|
-
type: "range",
|
|
47
|
-
min: 100,
|
|
48
|
-
max: 800,
|
|
49
|
-
step: 10,
|
|
50
|
-
label: "Scanline Frequency"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
brightness: {
|
|
54
|
-
default: 1.1,
|
|
55
|
-
description: "Screen brightness boost",
|
|
56
|
-
ui: {
|
|
57
|
-
type: "range",
|
|
58
|
-
min: 0.5,
|
|
59
|
-
max: 2,
|
|
60
|
-
step: 0.01,
|
|
61
|
-
label: "Brightness"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
contrast: {
|
|
65
|
-
default: 1.2,
|
|
66
|
-
description: "Screen contrast enhancement",
|
|
67
|
-
ui: {
|
|
68
|
-
type: "range",
|
|
69
|
-
min: 0.5,
|
|
70
|
-
max: 2,
|
|
71
|
-
step: 0.01,
|
|
72
|
-
label: "Contrast"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
fragmentNode: ({ uniforms: n, childNode: a, onCleanup: d }) => {
|
|
77
|
-
const { vec2: i, vec3: c, vec4: u, float: e, screenUV: t, sin: o, fract: p, smoothstep: f, length: g, convertToTexture: h } = E;
|
|
78
|
-
if (!a) return u(0, 0, 0, 0);
|
|
79
|
-
const s = h(a);
|
|
80
|
-
d(() => {
|
|
81
|
-
s?.renderTarget?.dispose && s.renderTarget.dispose();
|
|
82
|
-
});
|
|
83
|
-
const b = n.pixelSize.uniform, S = n.colorShift.uniform, x = n.scanlineIntensity.uniform, y = n.scanlineFrequency.uniform, C = n.brightness.uniform, T = n.contrast.uniform, m = S.mul(e(2e-3)), v = t.add(i(m, e(0))), z = t, q = t.sub(i(m, e(0))), R = s.sample(v).r, V = s.sample(z).g, F = s.sample(q).b, I = c(R, V, F).sub(e(0.5)).mul(T).add(e(0.5)).mul(C), U = o(t.y.mul(y).mul(e(3.14159 * 2))), k = e(1).sub(x.mul(U.mul(e(0.5)).add(e(0.5)))), r = I.mul(k), M = b.mul(e(0.5)), l = p(t.mul(M)), _ = o(l.x.mul(e(6.28318))).mul(e(0.1)).add(e(0.95)), w = o(l.x.mul(e(6.28318)).add(e(2.09))).mul(e(0.1)).add(e(0.95)), D = o(l.x.mul(e(6.28318)).add(e(4.18))).mul(e(0.1)).add(e(0.95)), P = c(r.r.mul(_), r.g.mul(w), r.b.mul(D)), j = g(t.sub(i(0.5, 0.5))), B = f(e(0.8), e(0.3), j);
|
|
84
|
-
return u(P.mul(B), e(1));
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
var W = N;
|
|
88
|
-
export {
|
|
89
|
-
N as n,
|
|
90
|
-
W as t
|
|
91
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { O as C } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
const A = {
|
|
3
|
-
name: "ChannelBlur",
|
|
4
|
-
category: "Blurs",
|
|
5
|
-
description: "Independent blur for red, green, and blue channels",
|
|
6
|
-
requiresRTT: !0,
|
|
7
|
-
requiresChild: !0,
|
|
8
|
-
props: {
|
|
9
|
-
redIntensity: {
|
|
10
|
-
default: 0,
|
|
11
|
-
description: "Blur intensity for red channel",
|
|
12
|
-
ui: {
|
|
13
|
-
type: "range",
|
|
14
|
-
min: 0,
|
|
15
|
-
max: 100,
|
|
16
|
-
step: 1,
|
|
17
|
-
label: "Red Intensity"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
greenIntensity: {
|
|
21
|
-
default: 20,
|
|
22
|
-
description: "Blur intensity for green channel",
|
|
23
|
-
ui: {
|
|
24
|
-
type: "range",
|
|
25
|
-
min: 0,
|
|
26
|
-
max: 100,
|
|
27
|
-
step: 1,
|
|
28
|
-
label: "Green Intensity"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
blueIntensity: {
|
|
32
|
-
default: 40,
|
|
33
|
-
description: "Blur intensity for blue channel",
|
|
34
|
-
ui: {
|
|
35
|
-
type: "range",
|
|
36
|
-
min: 0,
|
|
37
|
-
max: 100,
|
|
38
|
-
step: 1,
|
|
39
|
-
label: "Blue Intensity"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
fragmentNode: ({ uniforms: m, childNode: x, onCleanup: I }) => {
|
|
44
|
-
const { vec2: t, vec4: p, float: e, screenUV: S, convertToTexture: v, viewportSize: O, Fn: B } = C;
|
|
45
|
-
if (!x) return p(0, 0, 0, 0);
|
|
46
|
-
const i = v(x);
|
|
47
|
-
I(() => {
|
|
48
|
-
i?.renderTarget?.dispose && i.renderTarget.dispose();
|
|
49
|
-
});
|
|
50
|
-
const V = [
|
|
51
|
-
0.056,
|
|
52
|
-
0.135,
|
|
53
|
-
0.278,
|
|
54
|
-
0.487,
|
|
55
|
-
0.726,
|
|
56
|
-
0.923,
|
|
57
|
-
1,
|
|
58
|
-
0.923,
|
|
59
|
-
0.726,
|
|
60
|
-
0.487,
|
|
61
|
-
0.278,
|
|
62
|
-
0.135,
|
|
63
|
-
0.056
|
|
64
|
-
], w = 6.214, R = m.redIntensity.uniform.mul(0.1), z = m.greenIntensity.uniform.mul(0.1), _ = m.blueIntensity.uniform.mul(0.1), u = v(B(() => {
|
|
65
|
-
const n = S, f = t(1).div(O), r = e(0).toVar(), a = e(0).toVar(), l = e(0).toVar();
|
|
66
|
-
for (let d = -6; d <= 6; d++) {
|
|
67
|
-
const s = e(V[d + 6] / w), o = e(d).mul(f.x), c = t(o.mul(R), e(0)), g = t(o.mul(z), e(0)), y = t(o.mul(_), e(0)), b = i.sample(n.add(c)).r.mul(s), T = i.sample(n.add(g)).g.mul(s), h = i.sample(n.add(y)).b.mul(s);
|
|
68
|
-
r.assign(r.add(b)), a.assign(a.add(T)), l.assign(l.add(h));
|
|
69
|
-
}
|
|
70
|
-
return p(r, a, l, e(1));
|
|
71
|
-
})());
|
|
72
|
-
return I(() => {
|
|
73
|
-
u?.renderTarget?.dispose && u.renderTarget.dispose();
|
|
74
|
-
}), B(() => {
|
|
75
|
-
const n = S, f = t(1).div(O), r = e(0).toVar(), a = e(0).toVar(), l = e(0).toVar();
|
|
76
|
-
for (let s = -6; s <= 6; s++) {
|
|
77
|
-
const o = e(V[s + 6] / w), c = e(s).mul(f.y), g = t(e(0), c.mul(R)), y = t(e(0), c.mul(z)), b = t(e(0), c.mul(_)), T = u.sample(n.add(g)).r.mul(o), h = u.sample(n.add(y)).g.mul(o), q = u.sample(n.add(b)).b.mul(o);
|
|
78
|
-
r.assign(r.add(T)), a.assign(a.add(h)), l.assign(l.add(q));
|
|
79
|
-
}
|
|
80
|
-
const d = i.sample(n).a;
|
|
81
|
-
return p(r, a, l, d);
|
|
82
|
-
})();
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
var F = A;
|
|
86
|
-
export {
|
|
87
|
-
A as n,
|
|
88
|
-
F as t
|
|
89
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { O as B } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
import { i as U, r as f, t as w } from "./transformations-CsrIJXh-.js";
|
|
3
|
-
import { t as A } from "./colorMixing--dhzx0ch.js";
|
|
4
|
-
const _ = {
|
|
5
|
-
name: "Checkerboard",
|
|
6
|
-
category: "Base Layers",
|
|
7
|
-
description: "Classic checkerboard pattern with two alternating colors",
|
|
8
|
-
acceptsUVContext: !0,
|
|
9
|
-
props: {
|
|
10
|
-
colorA: {
|
|
11
|
-
default: "#cccccc",
|
|
12
|
-
transform: f,
|
|
13
|
-
description: "First color of the checkerboard pattern",
|
|
14
|
-
ui: {
|
|
15
|
-
type: "color",
|
|
16
|
-
label: "Color A"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
colorB: {
|
|
20
|
-
default: "#999999",
|
|
21
|
-
transform: f,
|
|
22
|
-
description: "Second color of the checkerboard pattern",
|
|
23
|
-
ui: {
|
|
24
|
-
type: "color",
|
|
25
|
-
label: "Color B"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
cells: {
|
|
29
|
-
default: 8,
|
|
30
|
-
description: "Number of cells along the shortest canvas edge (creates square cells)",
|
|
31
|
-
ui: {
|
|
32
|
-
type: "range",
|
|
33
|
-
min: 1,
|
|
34
|
-
max: 50,
|
|
35
|
-
step: 1,
|
|
36
|
-
label: "Cells"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
softness: {
|
|
40
|
-
default: 0,
|
|
41
|
-
description: "Smoothness of the transition between colors (0 = hard edges, 1 = very soft)",
|
|
42
|
-
ui: {
|
|
43
|
-
type: "range",
|
|
44
|
-
min: 0,
|
|
45
|
-
max: 1,
|
|
46
|
-
step: 0.01,
|
|
47
|
-
label: "Softness"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
colorSpace: {
|
|
51
|
-
default: "linear",
|
|
52
|
-
transform: U,
|
|
53
|
-
description: "Color space for color interpolation",
|
|
54
|
-
ui: {
|
|
55
|
-
type: "select",
|
|
56
|
-
options: w,
|
|
57
|
-
label: "Color Space"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
fragmentNode: ({ uniforms: o, uvContext: m }) => {
|
|
62
|
-
const { vec2: u, float: e, floor: b, mod: h, fract: g, smoothstep: y, min: r, screenUV: C, viewportSize: s } = B, c = m ?? C, x = s.x.div(s.y), S = u(c.x.mul(x), c.y.oneMinus()), v = o.cells.uniform, l = o.softness.uniform, a = S.mul(v), n = b(a), i = h(n.x.add(n.y), 2);
|
|
63
|
-
let d = i;
|
|
64
|
-
if (l) {
|
|
65
|
-
const t = g(a), k = r(r(t.x, e(1).sub(t.x)), r(t.y, e(1).sub(t.y))), V = l.mul(0.5), p = y(e(0), V, k);
|
|
66
|
-
d = i.mul(p).add(e(0.5).mul(e(1).sub(p)));
|
|
67
|
-
}
|
|
68
|
-
return A(o.colorA.uniform, o.colorB.uniform, d, o.colorSpace.uniform);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
var q = _;
|
|
72
|
-
export {
|
|
73
|
-
_ as n,
|
|
74
|
-
q as t
|
|
75
|
-
};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { O as _t } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
import { r as X } from "./transformations-CsrIJXh-.js";
|
|
3
|
-
import { DataTexture as at, FloatType as lt, LinearFilter as L, RGFormat as nt } from "three";
|
|
4
|
-
const Wt = {
|
|
5
|
-
name: "ChromaFlow",
|
|
6
|
-
category: "Interactive",
|
|
7
|
-
description: "Interactive liquid flow effect that follows your cursor",
|
|
8
|
-
props: {
|
|
9
|
-
baseColor: {
|
|
10
|
-
default: "#0066ff",
|
|
11
|
-
transform: X,
|
|
12
|
-
description: "Base liquid color",
|
|
13
|
-
ui: {
|
|
14
|
-
type: "color",
|
|
15
|
-
label: "Base Color"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
upColor: {
|
|
19
|
-
default: "#00ff00",
|
|
20
|
-
transform: X,
|
|
21
|
-
description: "Color for upward movement",
|
|
22
|
-
ui: {
|
|
23
|
-
type: "color",
|
|
24
|
-
label: "Up Color"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
downColor: {
|
|
28
|
-
default: "#ff0000",
|
|
29
|
-
transform: X,
|
|
30
|
-
description: "Color for downward movement",
|
|
31
|
-
ui: {
|
|
32
|
-
type: "color",
|
|
33
|
-
label: "Down Color"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
leftColor: {
|
|
37
|
-
default: "#0000ff",
|
|
38
|
-
transform: X,
|
|
39
|
-
description: "Color for leftward movement",
|
|
40
|
-
ui: {
|
|
41
|
-
type: "color",
|
|
42
|
-
label: "Left Color"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
rightColor: {
|
|
46
|
-
default: "#ffff00",
|
|
47
|
-
transform: X,
|
|
48
|
-
description: "Color for rightward movement",
|
|
49
|
-
ui: {
|
|
50
|
-
type: "color",
|
|
51
|
-
label: "Right Color"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
intensity: {
|
|
55
|
-
default: 1,
|
|
56
|
-
description: "Strength of the liquid effect",
|
|
57
|
-
ui: {
|
|
58
|
-
type: "range",
|
|
59
|
-
min: 0.5,
|
|
60
|
-
max: 1.5,
|
|
61
|
-
step: 0.1,
|
|
62
|
-
label: "Intensity"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
radius: {
|
|
66
|
-
default: 2,
|
|
67
|
-
description: "Radius of the liquid effect",
|
|
68
|
-
ui: {
|
|
69
|
-
type: "range",
|
|
70
|
-
min: 0,
|
|
71
|
-
max: 3,
|
|
72
|
-
step: 0.01,
|
|
73
|
-
label: "Radius"
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
momentum: {
|
|
77
|
-
default: 30,
|
|
78
|
-
description: "How much momentum colors retain in their flow direction",
|
|
79
|
-
ui: {
|
|
80
|
-
type: "range",
|
|
81
|
-
min: 10,
|
|
82
|
-
max: 60,
|
|
83
|
-
step: 1,
|
|
84
|
-
label: "Momentum"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
fragmentNode: ({ uniforms: u, onBeforeRender: st, onCleanup: rt }) => {
|
|
89
|
-
const { vec2: l, vec4: it, float: t, uniform: Y, screenUV: n, texture: W, smoothstep: v, mix: dt } = _t, o = 128, f = new Float32Array(o * o * 2), r = new Float32Array(o * o * 2), w = new at(f, o, o, nt, lt);
|
|
90
|
-
w.magFilter = L, w.minFilter = L, w.needsUpdate = !0;
|
|
91
|
-
const C = new at(r, o, o, nt, lt);
|
|
92
|
-
C.magFilter = L, C.minFilter = L, C.needsUpdate = !0;
|
|
93
|
-
const F = W(w), b = W(C), ct = Y(0.5), mt = Y(0.5), q = Y(0), D = Y(0);
|
|
94
|
-
let j = 0.5, B = 0.5, G = Date.now();
|
|
95
|
-
st(({ pointer: p }) => {
|
|
96
|
-
const tt = Date.now(), s = Math.min((tt - G) / 1e3, 0.016);
|
|
97
|
-
G = tt;
|
|
98
|
-
const ot = s > 0 ? (p.x - j) / s : 0, et = s > 0 ? (p.y - B) / s : 0;
|
|
99
|
-
q.value = q.value * 0.85 + ot * 0.15, D.value = D.value * 0.85 + et * 0.15, ct.value = p.x, mt.value = p.y;
|
|
100
|
-
const _ = u.intensity.uniform.value, Yt = u.radius.uniform.value * 0.05, zt = u.momentum.uniform.value, x = new Float32Array(f), i = new Float32Array(r), It = 1 - s / Math.max(0.1, 1);
|
|
101
|
-
for (let a = 0; a < o * o * 2; a++) x[a] = f[a] * It;
|
|
102
|
-
for (let a = 0; a < o; a++) for (let d = 0; d < o; d++) {
|
|
103
|
-
const e = (a * o + d) * 2, S = 1 - s / Math.max(0.4, 1);
|
|
104
|
-
if (i[e] = r[e] * S, i[e + 1] = r[e + 1] * S, Math.abs(f[e]) > 1e-3 || Math.abs(f[e + 1]) > 1e-3) {
|
|
105
|
-
const T = zt * 50 * s, A = d - f[e] * T, R = a - f[e + 1] * T, c = Math.floor(A), m = Math.floor(R), h = c + 1, y = m + 1;
|
|
106
|
-
if (c >= 0 && m >= 0 && h < o && y < o) {
|
|
107
|
-
const M = A - c, U = R - m, Tt = (m * o + c) * 2, Ut = (m * o + h) * 2, Lt = (y * o + c) * 2, Vt = (y * o + h) * 2;
|
|
108
|
-
i[e] = (r[Tt] * (1 - M) * (1 - U) + r[Ut] * M * (1 - U) + r[Lt] * (1 - M) * U + r[Vt] * M * U) * S;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
for (let a = 0; a < o; a++) for (let d = 0; d < o; d++) {
|
|
113
|
-
const e = (a * o + d) * 2, S = (d + 0.5) / o, T = (a + 0.5) / o, A = S - p.x, R = T - p.y, c = Math.sqrt(A * A + R * R), m = Math.sqrt(q.value * q.value + D.value * D.value), h = Yt * Math.min(m * m * 20, 1);
|
|
114
|
-
if (c < h * 2 && Math.abs(ot) + Math.abs(et) > 0.01) {
|
|
115
|
-
const y = Math.exp(-c * c / (h * h));
|
|
116
|
-
x[e] += q.value * y * (_ * 100) * s * 0.01, x[e + 1] += D.value * y * (_ * 100) * s * 0.01;
|
|
117
|
-
const M = Math.min(m * 10, 1);
|
|
118
|
-
i[e] += y * (_ * 100) * s * 0.01 * M, i[e + 1] = 0;
|
|
119
|
-
}
|
|
120
|
-
x[e] = Math.max(-1, Math.min(1, x[e])), x[e + 1] = Math.max(-1, Math.min(1, x[e + 1])), i[e] = Math.max(0, Math.min(1, i[e])), i[e + 1] = 0;
|
|
121
|
-
}
|
|
122
|
-
f.set(x), r.set(i), w.needsUpdate = !0, C.needsUpdate = !0, j = p.x, B = p.y;
|
|
123
|
-
}), rt(() => {
|
|
124
|
-
w.dispose(), C.dispose();
|
|
125
|
-
});
|
|
126
|
-
const ut = b.sample(n).x, z = l(t(1 / 128), t(1 / 128)), ft = b.sample(n.add(l(z.x, t(0)))).x, pt = b.sample(n.add(l(t(0), z.y))).x, xt = b.sample(n.add(l(z.x.negate(), t(0)))).x, ht = b.sample(n.add(l(t(0), z.y.negate()))).x, yt = ut.add(ft).add(pt).add(xt).add(ht).mul(t(0.2)), E = v(t(0), t(0.1), yt), I = l(t(1 / 128), t(1 / 128)), vt = F.sample(n).xy, wt = F.sample(n.add(l(I.x, t(0)))).xy, Ct = F.sample(n.add(l(t(0), I.y))).xy, gt = F.sample(n.add(l(I.x.negate(), t(0)))).xy, Mt = F.sample(n.add(l(t(0), I.y.negate()))).xy, g = vt.add(wt).add(Ct).add(gt).add(Mt).mul(t(0.2)), Ft = u.baseColor.uniform, bt = u.upColor.uniform, qt = u.downColor.uniform, Dt = u.leftColor.uniform, St = u.rightColor.uniform, V = g.x.mul(g.x).add(g.y.mul(g.y)).sqrt(), At = v(t(0.01), t(0.1), V), H = g.x.div(V.add(t(1e-3))), N = g.y.div(V.add(t(1e-3))), O = v(t(0), t(0.7), H.max(t(0))), P = v(t(0), t(0.7), H.negate().max(t(0))), Z = v(t(0), t(0.7), N.max(t(0))), k = v(t(0), t(0.7), N.negate().max(t(0))), Rt = Dt.mul(P).add(St.mul(O)), Xt = qt.mul(k).add(bt.mul(Z)), J = P.add(O), K = Z.add(k), Q = J.add(K).add(t(1e-3)), $ = dt(Ft, Rt.mul(J.div(Q)).add(Xt.mul(K.div(Q))), At);
|
|
127
|
-
return it($.rgb.mul(E), $.a.mul(E));
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
var Et = Wt;
|
|
131
|
-
export {
|
|
132
|
-
Wt as n,
|
|
133
|
-
Et as t
|
|
134
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { O as T } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
import { n as C } from "./transformations-CsrIJXh-.js";
|
|
3
|
-
const v = {
|
|
4
|
-
name: "ChromaticAberration",
|
|
5
|
-
category: "Stylize",
|
|
6
|
-
description: "Separate RGB channels for a prismatic distortion effect",
|
|
7
|
-
requiresRTT: !0,
|
|
8
|
-
requiresChild: !0,
|
|
9
|
-
props: {
|
|
10
|
-
strength: {
|
|
11
|
-
default: 0.2,
|
|
12
|
-
description: "Overall strength of the chromatic aberration effect",
|
|
13
|
-
ui: {
|
|
14
|
-
type: "range",
|
|
15
|
-
min: 0,
|
|
16
|
-
max: 1,
|
|
17
|
-
step: 0.01,
|
|
18
|
-
label: "Strength"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
angle: {
|
|
22
|
-
default: 0,
|
|
23
|
-
transform: C,
|
|
24
|
-
description: "Direction of the chromatic aberration in degrees",
|
|
25
|
-
ui: {
|
|
26
|
-
type: "range",
|
|
27
|
-
min: 0,
|
|
28
|
-
max: 360,
|
|
29
|
-
step: 1,
|
|
30
|
-
label: "Angle"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
redOffset: {
|
|
34
|
-
default: -1,
|
|
35
|
-
description: "Red channel offset multiplier",
|
|
36
|
-
ui: {
|
|
37
|
-
type: "range",
|
|
38
|
-
min: -2,
|
|
39
|
-
max: 2,
|
|
40
|
-
step: 0.1,
|
|
41
|
-
label: "Red Offset"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
greenOffset: {
|
|
45
|
-
default: 0,
|
|
46
|
-
description: "Green channel offset multiplier",
|
|
47
|
-
ui: {
|
|
48
|
-
type: "range",
|
|
49
|
-
min: -2,
|
|
50
|
-
max: 2,
|
|
51
|
-
step: 0.1,
|
|
52
|
-
label: "Green Offset"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
blueOffset: {
|
|
56
|
-
default: 1,
|
|
57
|
-
description: "Blue channel offset multiplier",
|
|
58
|
-
ui: {
|
|
59
|
-
type: "range",
|
|
60
|
-
min: -2,
|
|
61
|
-
max: 2,
|
|
62
|
-
step: 0.1,
|
|
63
|
-
label: "Blue Offset"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
fragmentNode: ({ uniforms: t, childNode: s, onCleanup: o }) => {
|
|
68
|
-
const { vec2: f, vec4: i, cos: c, sin: m, radians: u, screenUV: r, convertToTexture: d } = T;
|
|
69
|
-
if (!s) return i(0, 0, 0, 0);
|
|
70
|
-
const e = d(s);
|
|
71
|
-
o(() => {
|
|
72
|
-
e?.renderTarget?.dispose && e.renderTarget.dispose();
|
|
73
|
-
});
|
|
74
|
-
const l = u(t.angle.uniform), n = f(c(l), m(l)), a = t.strength.uniform.mul(0.1), p = r.add(n.mul(a).mul(t.redOffset.uniform)), g = r.add(n.mul(a).mul(t.greenOffset.uniform)), h = r.add(n.mul(a).mul(t.blueOffset.uniform)), b = e.sample(p).r, O = e.sample(g).g, x = e.sample(h).b, y = e.sample(r).a;
|
|
75
|
-
return i(b, O, x, y);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
var S = v;
|
|
79
|
-
export {
|
|
80
|
-
v as n,
|
|
81
|
-
S as t
|
|
82
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { O as g } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
import { o as v, r as y } from "./transformations-CsrIJXh-.js";
|
|
3
|
-
const x = {
|
|
4
|
-
name: "Circle",
|
|
5
|
-
category: "Base Layers",
|
|
6
|
-
description: "Generate a circle with adjustable size and softness",
|
|
7
|
-
acceptsUVContext: !0,
|
|
8
|
-
props: {
|
|
9
|
-
color: {
|
|
10
|
-
default: "#ffffff",
|
|
11
|
-
transform: y,
|
|
12
|
-
description: "The color of the circle",
|
|
13
|
-
ui: {
|
|
14
|
-
type: "color",
|
|
15
|
-
label: "Color"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
radius: {
|
|
19
|
-
default: 1,
|
|
20
|
-
description: "The radius of the circle. A value of one (1) is sets the circle to fit the canvas.",
|
|
21
|
-
ui: {
|
|
22
|
-
type: "range",
|
|
23
|
-
min: 0,
|
|
24
|
-
max: 2,
|
|
25
|
-
step: 0.01,
|
|
26
|
-
label: "Radius"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
softness: {
|
|
30
|
-
default: 0,
|
|
31
|
-
description: "Edge softness. Lower values like zero (0) are sharp, higher values like one (1) are softer.",
|
|
32
|
-
ui: {
|
|
33
|
-
type: "range",
|
|
34
|
-
min: 0,
|
|
35
|
-
max: 1,
|
|
36
|
-
step: 0.01,
|
|
37
|
-
label: "Softness"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
center: {
|
|
41
|
-
default: {
|
|
42
|
-
x: 0.5,
|
|
43
|
-
y: 0.5
|
|
44
|
-
},
|
|
45
|
-
transform: v,
|
|
46
|
-
description: "The center point of the circle",
|
|
47
|
-
ui: {
|
|
48
|
-
type: "position",
|
|
49
|
-
label: "Center Position"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
fragmentNode: ({ uniforms: e, uvContext: i }) => {
|
|
54
|
-
const { vec2: t, vec4: c, length: a, smoothstep: l, screenUV: f, viewportSize: o } = g, r = i ?? f, s = o.x.div(o.y), u = t(r.x.mul(s), r.y), p = t(e.center.uniform.x.mul(s), e.center.uniform.y.oneMinus()), d = a(u.sub(p)), m = e.softness.uniform, n = e.radius.uniform.mul(0.5), h = l(n, n.sub(m), d);
|
|
55
|
-
return c(e.color.uniform.rgb, e.color.uniform.a.mul(h));
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
var k = x;
|
|
59
|
-
export {
|
|
60
|
-
x as n,
|
|
61
|
-
k as t
|
|
62
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { a as m, i as e, l as b, n as c, r as d, s as r, t as u, u as o } from "./TSLBase-Bt7Z4hv_.js";
|
|
2
|
-
const f = /* @__PURE__ */ e(([s]) => g(s.rgb)), v = /* @__PURE__ */ e(([s, a = m(1)]) => a.mix(g(s.rgb), s.rgb)), l = /* @__PURE__ */ e(([s, a = m(1)]) => {
|
|
3
|
-
const n = d(s.r, s.g, s.b).div(3), t = s.r.max(s.g.max(s.b)), i = t.sub(n).mul(a).mul(-3);
|
|
4
|
-
return c(s.rgb, t, i);
|
|
5
|
-
}), p = /* @__PURE__ */ e(([s, a = m(1)]) => {
|
|
6
|
-
const n = r(0.57735, 0.57735, 0.57735), t = a.cos();
|
|
7
|
-
return r(s.rgb.mul(t).add(n.cross(s.rgb).mul(a.sin()).add(n.mul(u(n, s.rgb).mul(t.oneMinus())))));
|
|
8
|
-
}), g = (s, a = r(o.getLuminanceCoefficients(new b()))) => u(s, a);
|
|
9
|
-
export {
|
|
10
|
-
l as i,
|
|
11
|
-
p as n,
|
|
12
|
-
v as r,
|
|
13
|
-
f as t
|
|
14
|
-
};
|