shaders 2.2.23 → 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 -1604
- package/dist/core/shaderRegistry.d.ts.map +1 -1
- package/dist/core/shaders/AngularBlur/index.js +3 -7
- package/dist/core/shaders/Ascii/index.js +2 -6
- package/dist/core/shaders/Beam/index.d.ts +71 -0
- package/dist/core/shaders/Beam/index.d.ts.map +1 -0
- package/dist/core/shaders/Beam/index.js +4 -0
- 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/components/Beam.d.ts +31 -0
- package/dist/react/components/Beam.d.ts.map +1 -0
- package/dist/react/generatePresetCode-CCibXbtZ.js +645 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +7649 -104600
- package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/react/utils/generatePresetCode.js +2 -5
- package/dist/registry.js +224 -0
- package/dist/solid/components/Beam.d.ts +28 -0
- package/dist/solid/components/Beam.d.ts.map +1 -0
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.js +6691 -102524
- package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/solid/utils/generatePresetCode.js +586 -537
- package/dist/svelte/components/Beam.svelte.d.ts +19 -0
- package/dist/svelte/generatePresetCode-CymgoDq_.js +645 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +6175 -102455
- package/dist/svelte/utils/generatePresetCode.js +2 -5
- package/dist/vue/components/Beam.vue.d.ts +57 -0
- package/dist/vue/components/Beam.vue.d.ts.map +1 -0
- package/dist/vue/generatePresetCode-CRJmU8iF.js +649 -0
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +6929 -103492
- package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/vue/utils/generatePresetCode.js +2 -5
- package/package.json +12 -1
- package/dist/core/AngularBlur-ClvtyURQ.js +0 -56
- package/dist/core/Ascii-BT0-K_vw.js +0 -196
- package/dist/core/Blob-BlQ_1T_8.js +0 -169
- package/dist/core/Blur-421AjWLH.js +0 -64
- package/dist/core/Bulge-CZRVoR6C.js +0 -103
- package/dist/core/CRTScreen-C_U9g_IR.js +0 -91
- package/dist/core/ChannelBlur-5pzcB6Zv.js +0 -89
- package/dist/core/Checkerboard-CrQkqXhD.js +0 -75
- package/dist/core/ChromaFlow-CNrQdL8f.js +0 -134
- package/dist/core/ChromaticAberration-D9H7O17Y.js +0 -82
- package/dist/core/Circle-DnLaDn8V.js +0 -62
- package/dist/core/ColorAdjustment-CKwpE_4M.js +0 -14
- package/dist/core/CursorTrail-NY6n97VG.js +0 -105
- package/dist/core/DiffuseBlur-C_n01ABk.js +0 -69
- package/dist/core/Dither-4s-c4zh4.js +0 -61
- package/dist/core/DotGrid-BYl8XdMi.js +0 -61
- package/dist/core/Duotone-DbewOoB4.js +0 -66
- package/dist/core/FilmGrain-zA_-knOw.js +0 -28
- package/dist/core/FloatingParticles-BhVnqMsE.js +0 -160
- package/dist/core/GlassTiles-CFI57glh.js +0 -52
- package/dist/core/Glow-CQgl3IoS.js +0 -66
- package/dist/core/Godrays-BHMix_Bh.js +0 -105
- package/dist/core/Grayscale-CAEFLteL.js +0 -21
- package/dist/core/Grid-DlM-rVbZ.js +0 -50
- package/dist/core/GridDistortion-ZOZphSAT.js +0 -147
- package/dist/core/Group-BQAs3RiH.js +0 -17
- package/dist/core/Halftone-ci4ga-_J.js +0 -55
- package/dist/core/HueShift-CyxzPcJV.js +0 -32
- package/dist/core/ImageTexture-CdAGsPuH.js +0 -105
- package/dist/core/Invert-iPsiIqNZ.js +0 -20
- package/dist/core/LinearBlur-BEaaoIk-.js +0 -56
- package/dist/core/LinearGradient-DR_7RxLX.js +0 -111
- package/dist/core/Liquify-Bi02_ugh.js +0 -139
- package/dist/core/Pixelate-CSsdT1rr.js +0 -38
- package/dist/core/PolarCoordinates-D626ml58.js +0 -103
- package/dist/core/Posterize-DhZkMaC7.js +0 -46
- package/dist/core/ProgressiveBlur-CGtCfLF8.js +0 -102
- package/dist/core/RadialGradient-C0_WzmbH.js +0 -71
- package/dist/core/RectangularCoordinates-DfXw7fhI.js +0 -92
- package/dist/core/Ripples-DkemN3eh.js +0 -106
- package/dist/core/Saturation-Dup81Pnq.js +0 -31
- package/dist/core/SimplexNoise-BYEiCjDj.js +0 -94
- package/dist/core/SineWave-C6MRPtsy.js +0 -107
- package/dist/core/SolidColor-BZHRczgb.js +0 -22
- package/dist/core/Spherize-DOAnDx2l.js +0 -103
- package/dist/core/Spiral-BMjnWXh1.js +0 -115
- package/dist/core/Strands-BOVsuJLe.js +0 -125
- package/dist/core/Stretch-D6bHc6yp.js +0 -103
- package/dist/core/Swirl-BFoc0ImG.js +0 -148
- package/dist/core/TSLBase-BFMvTOak.js +0 -8053
- package/dist/core/TiltShift-BiNvvhzj.js +0 -114
- package/dist/core/Tritone-gdx2AA0m.js +0 -75
- package/dist/core/Twirl-BsV8YbqC.js +0 -82
- package/dist/core/Vibrance-C182fbSw.js +0 -31
- package/dist/core/WaveDistortion-CmaS2zDB.js +0 -132
- package/dist/core/ZoomBlur-DLf5xQ16.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-DaS7jkcT.js +0 -626
- package/dist/svelte/generatePresetCode-DaS7jkcT.js +0 -626
- package/dist/vue/generatePresetCode-Cd1B-Y9j.js +0 -632
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { D as Z, O as A } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
import { t as $ } from "./edges-CDzKsauJ.js";
|
|
3
|
-
import { a as B } from "./transformations-CsrIJXh-.js";
|
|
4
|
-
import { DataTexture as J, FloatType as K, LinearFilter as C, RGFormat as Q } from "three";
|
|
5
|
-
var r = 32, T = /* @__PURE__ */ new WeakMap(), G = (e) => {
|
|
6
|
-
let i = T.get(e);
|
|
7
|
-
if (!i) {
|
|
8
|
-
const l = new Float32Array(r * r * 2), t = new J(l, r, r, Q, K);
|
|
9
|
-
t.magFilter = C, t.minFilter = C, t.needsUpdate = !0, i = {
|
|
10
|
-
texture: t,
|
|
11
|
-
data: l,
|
|
12
|
-
tslNode: Z(t),
|
|
13
|
-
initialized: !1
|
|
14
|
-
}, T.set(e, i);
|
|
15
|
-
}
|
|
16
|
-
return i;
|
|
17
|
-
};
|
|
18
|
-
const ee = {
|
|
19
|
-
name: "Liquify",
|
|
20
|
-
category: "Interactive",
|
|
21
|
-
description: "Liquid-like interactive deformation effect",
|
|
22
|
-
requiresRTT: !0,
|
|
23
|
-
requiresChild: !0,
|
|
24
|
-
props: {
|
|
25
|
-
intensity: {
|
|
26
|
-
default: 1,
|
|
27
|
-
description: "Strength of the distortion effect",
|
|
28
|
-
ui: {
|
|
29
|
-
type: "range",
|
|
30
|
-
min: 0,
|
|
31
|
-
max: 5,
|
|
32
|
-
step: 0.1,
|
|
33
|
-
label: "Intensity"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
swirl: {
|
|
37
|
-
default: 0,
|
|
38
|
-
description: "Amount of swirl motion (0-1)",
|
|
39
|
-
ui: {
|
|
40
|
-
type: "range",
|
|
41
|
-
min: 0,
|
|
42
|
-
max: 1,
|
|
43
|
-
step: 0.01,
|
|
44
|
-
label: "Swirl"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
decay: {
|
|
48
|
-
default: 3,
|
|
49
|
-
description: "Rate of distortion decay (higher = faster)",
|
|
50
|
-
ui: {
|
|
51
|
-
type: "range",
|
|
52
|
-
min: 0,
|
|
53
|
-
max: 10,
|
|
54
|
-
step: 0.1,
|
|
55
|
-
label: "Decay"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
radius: {
|
|
59
|
-
default: 1,
|
|
60
|
-
description: "Radius of the distortion effect",
|
|
61
|
-
ui: {
|
|
62
|
-
type: "range",
|
|
63
|
-
min: 0,
|
|
64
|
-
max: 3,
|
|
65
|
-
step: 0.01,
|
|
66
|
-
label: "Radius"
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
edges: {
|
|
70
|
-
default: "stretch",
|
|
71
|
-
description: "How to handle edges when distortion pushes content out of bounds",
|
|
72
|
-
transform: B,
|
|
73
|
-
ui: {
|
|
74
|
-
type: "select",
|
|
75
|
-
options: [
|
|
76
|
-
{
|
|
77
|
-
label: "Stretch",
|
|
78
|
-
value: "stretch"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
label: "Transparent",
|
|
82
|
-
value: "transparent"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
label: "Mirror",
|
|
86
|
-
value: "mirror"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
label: "Wrap",
|
|
90
|
-
value: "wrap"
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
label: "Edges"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
uvTransformNode: ({ uv: e, uniforms: i }) => {
|
|
98
|
-
const { vec2: l, float: t } = A, d = G(i).tslNode.sample(e).xy, o = t(0.2), u = d.clamp(l(o.negate(), o.negate()), l(o, o));
|
|
99
|
-
return e.sub(u);
|
|
100
|
-
},
|
|
101
|
-
fragmentNode: ({ uniforms: e, onBeforeRender: i, childNode: l, onCleanup: t }) => {
|
|
102
|
-
const { vec2: d, vec4: o, float: u, uniform: w, screenUV: F, convertToTexture: H } = A, { texture: q, data: a, tslNode: O } = G(e), h = w(0), x = w(0);
|
|
103
|
-
let R = 0.5, S = 0.5, I = Date.now();
|
|
104
|
-
if (i(({ pointer: c }) => {
|
|
105
|
-
const U = Date.now(), s = Math.min((U - I) / 1e3, 0.016);
|
|
106
|
-
I = U;
|
|
107
|
-
const V = s > 0 ? (c.x - R) / s : 0, X = s > 0 ? (c.y - S) / s : 0;
|
|
108
|
-
h.value = h.value * 0.85 + V * 0.15, x.value = x.value * 0.85 + X * 0.15;
|
|
109
|
-
const Y = e.decay.uniform.value, _ = e.intensity.uniform.value, y = e.radius.uniform.value * 0.05, g = e.swirl.uniform.value;
|
|
110
|
-
for (let p = 0; p < r; p++) for (let f = 0; f < r; f++) {
|
|
111
|
-
const n = (p * r + f) * 2;
|
|
112
|
-
a[n] *= 1 - Y * s, a[n + 1] *= 1 - Y * s;
|
|
113
|
-
const z = (f + 0.5) / r, P = (p + 0.5) / r, M = z - c.x, b = P - c.y, D = Math.sqrt(M * M + b * b);
|
|
114
|
-
if (D < y * 2 && Math.abs(V) + Math.abs(X) > 0.01) {
|
|
115
|
-
const v = Math.exp(-D * D / (y * y));
|
|
116
|
-
if (a[n] += h.value * v * _ * s * 0.5, a[n + 1] += x.value * v * _ * s * 0.5, g > 0) {
|
|
117
|
-
const k = Math.atan2(b, M) + Math.PI * 0.5;
|
|
118
|
-
a[n] += Math.cos(k) * g * v * s * 2, a[n + 1] += Math.sin(k) * g * v * s * 2;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
a[n] = Math.max(-1, Math.min(1, a[n])), a[n + 1] = Math.max(-1, Math.min(1, a[n + 1]));
|
|
122
|
-
}
|
|
123
|
-
q.needsUpdate = !0, R = c.x, S = c.y;
|
|
124
|
-
}), t(() => {
|
|
125
|
-
q.dispose(), T.delete(e);
|
|
126
|
-
}), !l) return o(0, 0, 0, 0);
|
|
127
|
-
const m = H(l);
|
|
128
|
-
t(() => {
|
|
129
|
-
m?.renderTarget?.dispose && m.renderTarget.dispose();
|
|
130
|
-
});
|
|
131
|
-
const W = O.sample(F).xy, E = u(0.2), L = u(-0.2), j = W.clamp(d(L, L), d(E, E)), N = F.sub(j);
|
|
132
|
-
return $(N, m.sample(N), m, e.edges.uniform);
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
var re = ee;
|
|
136
|
-
export {
|
|
137
|
-
ee as n,
|
|
138
|
-
re as t
|
|
139
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { O as l } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
const p = {
|
|
3
|
-
name: "Pixelate",
|
|
4
|
-
category: "Stylize",
|
|
5
|
-
description: "Pixelation effect with adjustable cell size",
|
|
6
|
-
requiresRTT: !0,
|
|
7
|
-
requiresChild: !0,
|
|
8
|
-
props: { scale: {
|
|
9
|
-
default: 50,
|
|
10
|
-
description: "Pixel size - higher values create larger, more visible pixels",
|
|
11
|
-
ui: {
|
|
12
|
-
type: "range",
|
|
13
|
-
min: 1,
|
|
14
|
-
max: 200,
|
|
15
|
-
step: 1,
|
|
16
|
-
label: "Scale"
|
|
17
|
-
}
|
|
18
|
-
} },
|
|
19
|
-
uvTransformNode: ({ uv: t, uniforms: e }) => {
|
|
20
|
-
const { floor: i } = l, r = e.scale.uniform;
|
|
21
|
-
return i(t.mul(r)).div(r);
|
|
22
|
-
},
|
|
23
|
-
fragmentNode: ({ uniforms: t, childNode: e, onCleanup: i }) => {
|
|
24
|
-
const { vec4: r, floor: a, screenUV: n, convertToTexture: c } = l;
|
|
25
|
-
if (!e) return r(0, 0, 0, 0);
|
|
26
|
-
const s = c(e);
|
|
27
|
-
i(() => {
|
|
28
|
-
s?.renderTarget?.dispose && s.renderTarget.dispose();
|
|
29
|
-
});
|
|
30
|
-
const o = t.scale.uniform, u = a(n.mul(o)).div(o);
|
|
31
|
-
return s.sample(u);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
var f = p;
|
|
35
|
-
export {
|
|
36
|
-
p as n,
|
|
37
|
-
f as t
|
|
38
|
-
};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { O as y } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
import { t as T } from "./edges-CDzKsauJ.js";
|
|
3
|
-
import { a as w, o as C } from "./transformations-CsrIJXh-.js";
|
|
4
|
-
const P = {
|
|
5
|
-
name: "PolarCoordinates",
|
|
6
|
-
category: "Distortions",
|
|
7
|
-
description: "Convert rectangular coordinates to polar space",
|
|
8
|
-
requiresRTT: !0,
|
|
9
|
-
requiresChild: !0,
|
|
10
|
-
props: {
|
|
11
|
-
center: {
|
|
12
|
-
default: {
|
|
13
|
-
x: 0.5,
|
|
14
|
-
y: 0.5
|
|
15
|
-
},
|
|
16
|
-
transform: C,
|
|
17
|
-
description: "The center point for polar coordinate conversion",
|
|
18
|
-
ui: {
|
|
19
|
-
type: "position",
|
|
20
|
-
label: "Center"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
wrap: {
|
|
24
|
-
default: 1,
|
|
25
|
-
description: "Controls how much of the angular range to use (1 = full 360°, 0.5 = 180°)",
|
|
26
|
-
ui: {
|
|
27
|
-
type: "range",
|
|
28
|
-
min: 0,
|
|
29
|
-
max: 2,
|
|
30
|
-
step: 0.01,
|
|
31
|
-
label: "Wrap"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
radius: {
|
|
35
|
-
default: 1,
|
|
36
|
-
description: "Controls how much of the radius range to use (affects the radial mapping)",
|
|
37
|
-
ui: {
|
|
38
|
-
type: "range",
|
|
39
|
-
min: 0,
|
|
40
|
-
max: 2,
|
|
41
|
-
step: 0.01,
|
|
42
|
-
label: "Radius"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
intensity: {
|
|
46
|
-
default: 1,
|
|
47
|
-
description: "Blends between original UVs (0) and polar coordinates (1)",
|
|
48
|
-
ui: {
|
|
49
|
-
type: "range",
|
|
50
|
-
min: 0,
|
|
51
|
-
max: 1,
|
|
52
|
-
step: 0.01,
|
|
53
|
-
label: "Intensity"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
edges: {
|
|
57
|
-
default: "transparent",
|
|
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: t, viewportSize: i }) => {
|
|
85
|
-
const { vec2: r, length: u, atan: p, PI: l, mix: o } = y, a = i.x.div(i.y), m = r(e.x.mul(a), e.y), c = r(t.center.uniform.x.mul(a), t.center.uniform.y.oneMinus()), s = m.sub(c), n = p(s.y, s.x).add(l).div(l.mul(2)), d = u(s);
|
|
86
|
-
return o(e, r(n.mul(t.wrap.uniform), d.mul(t.radius.uniform)), t.intensity.uniform);
|
|
87
|
-
},
|
|
88
|
-
fragmentNode: ({ uniforms: e, childNode: t, onCleanup: i }) => {
|
|
89
|
-
const { vec2: r, vec4: u, length: p, atan: l, screenUV: o, viewportSize: a, convertToTexture: m, PI: c, mix: s } = y;
|
|
90
|
-
if (!t) return u(0, 0, 0, 0);
|
|
91
|
-
const n = m(t);
|
|
92
|
-
i(() => {
|
|
93
|
-
n?.renderTarget?.dispose && n.renderTarget.dispose();
|
|
94
|
-
});
|
|
95
|
-
const d = a.x.div(a.y), x = r(o.x.mul(d), o.y), h = r(e.center.uniform.x.mul(d), e.center.uniform.y.oneMinus()), f = x.sub(h), b = l(f.y, f.x).add(c).div(c.mul(2)), v = p(f), g = s(o, r(b.mul(e.wrap.uniform), v.mul(e.radius.uniform)), e.intensity.uniform);
|
|
96
|
-
return T(g, n.sample(g), n, e.edges.uniform);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
var I = P;
|
|
100
|
-
export {
|
|
101
|
-
P as n,
|
|
102
|
-
I as t
|
|
103
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { O as r } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
import { c as i, o as n } from "./TSLBase-BFMvTOak.js";
|
|
3
|
-
var a = class extends i {
|
|
4
|
-
static get type() {
|
|
5
|
-
return "PosterizeNode";
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Constructs a new posterize node.
|
|
9
|
-
*
|
|
10
|
-
* @param {Node} sourceNode - The input color.
|
|
11
|
-
* @param {Node} stepsNode - Controls the intensity of the posterization effect. A lower number results in a more blocky appearance.
|
|
12
|
-
*/
|
|
13
|
-
constructor(t, e) {
|
|
14
|
-
super(), this.sourceNode = t, this.stepsNode = e;
|
|
15
|
-
}
|
|
16
|
-
setup() {
|
|
17
|
-
const { sourceNode: t, stepsNode: e } = this;
|
|
18
|
-
return t.mul(e).floor().div(e);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const p = /* @__PURE__ */ n(a).setParameterLength(2), c = {
|
|
22
|
-
name: "Posterize",
|
|
23
|
-
category: "Adjustments",
|
|
24
|
-
description: "Reduce color depth to create a poster effect",
|
|
25
|
-
requiresChild: !0,
|
|
26
|
-
props: { intensity: {
|
|
27
|
-
default: 5,
|
|
28
|
-
description: "The intensity of the posterization effect (lower is more posterized)",
|
|
29
|
-
ui: {
|
|
30
|
-
type: "range",
|
|
31
|
-
min: 2,
|
|
32
|
-
max: 20,
|
|
33
|
-
step: 1,
|
|
34
|
-
label: "Intensity"
|
|
35
|
-
}
|
|
36
|
-
} },
|
|
37
|
-
fragmentNode: ({ uniforms: t, childNode: e }) => {
|
|
38
|
-
const { vec4: o, int: s } = r;
|
|
39
|
-
return e ? p(e || o(0, 0, 0, 0), s(t.intensity.uniform)) : (console.error("You must pass a child component into the Posterize shader."), o(0));
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
var m = c;
|
|
43
|
-
export {
|
|
44
|
-
c as n,
|
|
45
|
-
m as t
|
|
46
|
-
};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { O as M } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
import { n as U, o as O } from "./transformations-CsrIJXh-.js";
|
|
3
|
-
const j = {
|
|
4
|
-
name: "ProgressiveBlur",
|
|
5
|
-
category: "Blurs",
|
|
6
|
-
description: "Blur that increases progressively in one direction",
|
|
7
|
-
requiresRTT: !0,
|
|
8
|
-
requiresChild: !0,
|
|
9
|
-
props: {
|
|
10
|
-
intensity: {
|
|
11
|
-
default: 50,
|
|
12
|
-
description: "Maximum intensity of the blur effect",
|
|
13
|
-
ui: {
|
|
14
|
-
type: "range",
|
|
15
|
-
min: 0,
|
|
16
|
-
max: 100,
|
|
17
|
-
step: 1,
|
|
18
|
-
label: "Intensity"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
angle: {
|
|
22
|
-
default: 0,
|
|
23
|
-
transform: U,
|
|
24
|
-
description: "Direction of the blur gradient (in degrees)",
|
|
25
|
-
ui: {
|
|
26
|
-
type: "range",
|
|
27
|
-
min: 0,
|
|
28
|
-
max: 360,
|
|
29
|
-
step: 1,
|
|
30
|
-
label: "Angle"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
center: {
|
|
34
|
-
default: {
|
|
35
|
-
x: 0,
|
|
36
|
-
y: 0.5
|
|
37
|
-
},
|
|
38
|
-
transform: O,
|
|
39
|
-
description: "Center point where blur begins",
|
|
40
|
-
ui: {
|
|
41
|
-
type: "position",
|
|
42
|
-
label: "Center"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
falloff: {
|
|
46
|
-
default: 1,
|
|
47
|
-
description: "Distance over which blur transitions to full strength",
|
|
48
|
-
ui: {
|
|
49
|
-
type: "range",
|
|
50
|
-
min: 0,
|
|
51
|
-
max: 1,
|
|
52
|
-
step: 0.01,
|
|
53
|
-
label: "Falloff"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
fragmentNode: ({ uniforms: r, childNode: g, onCleanup: h }) => {
|
|
58
|
-
const { vec2: o, vec4: s, float: e, screenUV: i, viewportSize: x, sin: C, cos: D, radians: P, max: v, smoothstep: S, Fn: y, convertToTexture: b } = M;
|
|
59
|
-
if (!g) return s(0, 0, 0, 0);
|
|
60
|
-
const a = b(g);
|
|
61
|
-
h(() => {
|
|
62
|
-
a?.renderTarget?.dispose && a.renderTarget.dispose();
|
|
63
|
-
});
|
|
64
|
-
const T = P(r.angle.uniform), V = o(D(T), C(T)), A = o(r.center.uniform[0], r.center.uniform[1].oneMinus()), R = i.sub(A), _ = v(e(0), R.dot(V)), q = v(e(1e-3), r.falloff.uniform), F = S(e(0), q, _), I = r.intensity.uniform.mul(0.06), w = F.mul(I), z = [
|
|
65
|
-
0.056,
|
|
66
|
-
0.135,
|
|
67
|
-
0.278,
|
|
68
|
-
0.487,
|
|
69
|
-
0.726,
|
|
70
|
-
0.923,
|
|
71
|
-
1,
|
|
72
|
-
0.923,
|
|
73
|
-
0.726,
|
|
74
|
-
0.487,
|
|
75
|
-
0.278,
|
|
76
|
-
0.135,
|
|
77
|
-
0.056
|
|
78
|
-
], B = 6.214, l = b(y(() => {
|
|
79
|
-
const c = i, u = o(1).div(x), n = s(0).toVar();
|
|
80
|
-
for (let t = -6; t <= 6; t++) {
|
|
81
|
-
const d = e(z[t + 6] / B), f = o(e(t), e(0)).mul(w).mul(u), m = c.add(f), p = a.sample(m).mul(d);
|
|
82
|
-
n.assign(n.add(p));
|
|
83
|
-
}
|
|
84
|
-
return n;
|
|
85
|
-
})());
|
|
86
|
-
return h(() => {
|
|
87
|
-
l?.renderTarget?.dispose && l.renderTarget.dispose();
|
|
88
|
-
}), y(() => {
|
|
89
|
-
const c = i, u = o(1).div(x), n = s(0).toVar();
|
|
90
|
-
for (let t = -6; t <= 6; t++) {
|
|
91
|
-
const d = e(z[t + 6] / B), f = o(e(0), e(t)).mul(w).mul(u), m = c.add(f), p = l.sample(m).mul(d);
|
|
92
|
-
n.assign(n.add(p));
|
|
93
|
-
}
|
|
94
|
-
return n;
|
|
95
|
-
})();
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
var G = j;
|
|
99
|
-
export {
|
|
100
|
-
j as n,
|
|
101
|
-
G as t
|
|
102
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { O as d } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
import { i as f, o as m, r as n, t as u } from "./transformations-CsrIJXh-.js";
|
|
3
|
-
import { t as g } from "./colorMixing--dhzx0ch.js";
|
|
4
|
-
const h = {
|
|
5
|
-
name: "RadialGradient",
|
|
6
|
-
category: "Base Layers",
|
|
7
|
-
description: "Radial gradient radiating from a center point",
|
|
8
|
-
acceptsUVContext: !0,
|
|
9
|
-
props: {
|
|
10
|
-
colorA: {
|
|
11
|
-
default: "#ff0000",
|
|
12
|
-
transform: n,
|
|
13
|
-
description: "The starting color at the center of the gradient",
|
|
14
|
-
ui: {
|
|
15
|
-
type: "color",
|
|
16
|
-
label: "Color A"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
colorB: {
|
|
20
|
-
default: "#0000ff",
|
|
21
|
-
transform: n,
|
|
22
|
-
description: "The ending color at the edge of the gradient",
|
|
23
|
-
ui: {
|
|
24
|
-
type: "color",
|
|
25
|
-
label: "Color B"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
center: {
|
|
29
|
-
default: {
|
|
30
|
-
x: 0.5,
|
|
31
|
-
y: 0.5
|
|
32
|
-
},
|
|
33
|
-
transform: m,
|
|
34
|
-
description: "The center point of the radial gradient",
|
|
35
|
-
ui: {
|
|
36
|
-
type: "position",
|
|
37
|
-
label: "Center"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
radius: {
|
|
41
|
-
default: 1,
|
|
42
|
-
description: "The radius of the gradient (normalized, 0.0-1.0)",
|
|
43
|
-
ui: {
|
|
44
|
-
type: "range",
|
|
45
|
-
min: 0,
|
|
46
|
-
max: 2,
|
|
47
|
-
step: 0.01,
|
|
48
|
-
label: "Radius"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
colorSpace: {
|
|
52
|
-
default: "linear",
|
|
53
|
-
transform: f,
|
|
54
|
-
description: "Color space for color interpolation",
|
|
55
|
-
ui: {
|
|
56
|
-
type: "select",
|
|
57
|
-
options: u,
|
|
58
|
-
label: "Color Space"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
fragmentNode: ({ uniforms: o, uvContext: l }) => {
|
|
63
|
-
const { vec2: e, float: t, distance: c, screenUV: s, viewportSize: r } = d, a = l ?? s, i = r.x.div(r.y), p = c(e(a.x.mul(i), a.y), e(o.center.uniform.x.mul(i), o.center.uniform.y.oneMinus())).div(o.radius.uniform).clamp(t(0), t(1));
|
|
64
|
-
return g(o.colorA.uniform, o.colorB.uniform, p, o.colorSpace.uniform);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
var v = h;
|
|
68
|
-
export {
|
|
69
|
-
h as n,
|
|
70
|
-
v as t
|
|
71
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { O as x } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
import { t as T } from "./edges-CDzKsauJ.js";
|
|
3
|
-
import { a as C, o as P } from "./transformations-CsrIJXh-.js";
|
|
4
|
-
const w = {
|
|
5
|
-
name: "RectangularCoordinates",
|
|
6
|
-
category: "Distortions",
|
|
7
|
-
description: "Convert polar coordinates back to rectangular space",
|
|
8
|
-
requiresRTT: !0,
|
|
9
|
-
requiresChild: !0,
|
|
10
|
-
props: {
|
|
11
|
-
center: {
|
|
12
|
-
default: {
|
|
13
|
-
x: 0.5,
|
|
14
|
-
y: 0.5
|
|
15
|
-
},
|
|
16
|
-
transform: P,
|
|
17
|
-
description: "The center point for rectangular coordinate conversion",
|
|
18
|
-
ui: {
|
|
19
|
-
type: "position",
|
|
20
|
-
label: "Center"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
scale: {
|
|
24
|
-
default: 1,
|
|
25
|
-
description: "Scale factor for the rectangular output",
|
|
26
|
-
ui: {
|
|
27
|
-
type: "range",
|
|
28
|
-
min: 0.1,
|
|
29
|
-
max: 3,
|
|
30
|
-
step: 0.01,
|
|
31
|
-
label: "Scale"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
intensity: {
|
|
35
|
-
default: 1,
|
|
36
|
-
description: "Blends between original UVs (0) and rectangular coordinates (1)",
|
|
37
|
-
ui: {
|
|
38
|
-
type: "range",
|
|
39
|
-
min: 0,
|
|
40
|
-
max: 1,
|
|
41
|
-
step: 0.01,
|
|
42
|
-
label: "Intensity"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
edges: {
|
|
46
|
-
default: "transparent",
|
|
47
|
-
description: "How to handle edges when distortion pushes content out of bounds",
|
|
48
|
-
transform: C,
|
|
49
|
-
ui: {
|
|
50
|
-
type: "select",
|
|
51
|
-
options: [
|
|
52
|
-
{
|
|
53
|
-
label: "Stretch",
|
|
54
|
-
value: "stretch"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
label: "Transparent",
|
|
58
|
-
value: "transparent"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
label: "Mirror",
|
|
62
|
-
value: "mirror"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: "Wrap",
|
|
66
|
-
value: "wrap"
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
label: "Edges"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
uvTransformNode: ({ uv: e, uniforms: t, viewportSize: i }) => {
|
|
74
|
-
const { vec2: n, cos: d, sin: p, PI: c, mix: o } = x, a = e.x.mul(c.mul(2)).sub(c), l = e.y.mul(t.scale.uniform), u = l.mul(d(a)), m = l.mul(p(a)), r = i.x.div(i.y), s = n(t.center.uniform.x, t.center.uniform.y.oneMinus());
|
|
75
|
-
return o(e, n(u.div(r).add(s.x), m.add(s.y)), t.intensity.uniform);
|
|
76
|
-
},
|
|
77
|
-
fragmentNode: ({ uniforms: e, childNode: t, onCleanup: i }) => {
|
|
78
|
-
const { vec2: n, vec4: d, cos: p, sin: c, screenUV: o, viewportSize: a, convertToTexture: l, PI: u, mix: m } = x;
|
|
79
|
-
if (!t) return d(0, 0, 0, 0);
|
|
80
|
-
const r = l(t);
|
|
81
|
-
i(() => {
|
|
82
|
-
r?.renderTarget?.dispose && r.renderTarget.dispose();
|
|
83
|
-
});
|
|
84
|
-
const s = o.x.mul(u.mul(2)).sub(u), f = o.y.mul(e.scale.uniform), b = f.mul(p(s)), v = f.mul(c(s)), h = a.x.div(a.y), g = n(e.center.uniform.x, e.center.uniform.y.oneMinus()), y = m(o, n(b.div(h).add(g.x), v.add(g.y)), e.intensity.uniform);
|
|
85
|
-
return T(y, r.sample(y), r, e.edges.uniform);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
var R = w;
|
|
89
|
-
export {
|
|
90
|
-
w as n,
|
|
91
|
-
R as t
|
|
92
|
-
};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { O as T, d as w } from "./three.tsl-Btj1hLsf.js";
|
|
2
|
-
import { t as A } from "./time-DbRMw6Jm.js";
|
|
3
|
-
import { o as S, r as l } from "./transformations-CsrIJXh-.js";
|
|
4
|
-
import { t as q } from "./colorMixing--dhzx0ch.js";
|
|
5
|
-
const P = {
|
|
6
|
-
name: "Ripples",
|
|
7
|
-
category: "Base Layers",
|
|
8
|
-
description: "Concentric animated ripples emanating from a point",
|
|
9
|
-
acceptsUVContext: !0,
|
|
10
|
-
props: {
|
|
11
|
-
center: {
|
|
12
|
-
default: {
|
|
13
|
-
x: 0.5,
|
|
14
|
-
y: 0.5
|
|
15
|
-
},
|
|
16
|
-
transform: S,
|
|
17
|
-
description: "The center point where ripples emanate from",
|
|
18
|
-
ui: {
|
|
19
|
-
type: "position",
|
|
20
|
-
label: "Center"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
colorA: {
|
|
24
|
-
default: "#ffffff",
|
|
25
|
-
transform: l,
|
|
26
|
-
description: "Color of the ripple waves",
|
|
27
|
-
ui: {
|
|
28
|
-
type: "color",
|
|
29
|
-
label: "Color A"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
colorB: {
|
|
33
|
-
default: "#000000",
|
|
34
|
-
transform: l,
|
|
35
|
-
description: "Background color between ripples",
|
|
36
|
-
ui: {
|
|
37
|
-
type: "color",
|
|
38
|
-
label: "Color B"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
speed: {
|
|
42
|
-
default: 1,
|
|
43
|
-
description: "Speed of ripple animation",
|
|
44
|
-
ui: {
|
|
45
|
-
type: "range",
|
|
46
|
-
min: -5,
|
|
47
|
-
max: 5,
|
|
48
|
-
step: 0.1,
|
|
49
|
-
label: "Speed"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
frequency: {
|
|
53
|
-
default: 20,
|
|
54
|
-
description: "Number of ripples/spacing between them",
|
|
55
|
-
ui: {
|
|
56
|
-
type: "range",
|
|
57
|
-
min: 1,
|
|
58
|
-
max: 80,
|
|
59
|
-
step: 0.1,
|
|
60
|
-
label: "Frequency"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
softness: {
|
|
64
|
-
default: 0,
|
|
65
|
-
description: "Softness of ripple edges",
|
|
66
|
-
ui: {
|
|
67
|
-
type: "range",
|
|
68
|
-
min: 0,
|
|
69
|
-
max: 3,
|
|
70
|
-
step: 0.01,
|
|
71
|
-
label: "Softness"
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
thickness: {
|
|
75
|
-
default: 0.5,
|
|
76
|
-
description: "Thickness of each ripple band",
|
|
77
|
-
ui: {
|
|
78
|
-
type: "range",
|
|
79
|
-
min: 0,
|
|
80
|
-
max: 1,
|
|
81
|
-
step: 0.01,
|
|
82
|
-
label: "Thickness"
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
phase: {
|
|
86
|
-
default: 0,
|
|
87
|
-
description: "Phase offset for ripple animation",
|
|
88
|
-
ui: {
|
|
89
|
-
type: "range",
|
|
90
|
-
min: 0,
|
|
91
|
-
max: 6.28,
|
|
92
|
-
step: 0.01,
|
|
93
|
-
label: "Phase"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
fragmentNode: (o) => {
|
|
98
|
-
const { uniforms: e, uvContext: f } = o, { vec2: t, float: s, screenUV: m, sin: u, distance: d, viewportSize: n, smoothstep: h } = T, r = f ?? m, i = e.center.uniform, y = e.colorA.uniform, b = e.colorB.uniform, x = e.frequency.uniform, a = e.softness.uniform, g = e.thickness.uniform, C = e.phase.uniform, p = n.x.div(n.y), v = d(t(r.x.mul(p), r.y), t(i.x.mul(p), i.y.oneMinus())), k = A(o, e.speed), B = u(v.mul(x).sub(k).add(C)), c = g.mul(s(2)).sub(s(1));
|
|
99
|
-
return q(b, y, h(c.add(a), c.sub(a), B), w(0));
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
var V = P;
|
|
103
|
-
export {
|
|
104
|
-
P as n,
|
|
105
|
-
V as t
|
|
106
|
-
};
|