shaders 2.0.652 → 2.0.654
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/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/vue/index.js +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -45292,7 +45292,7 @@ const ufe = (t) => {
|
|
|
45292
45292
|
}
|
|
45293
45293
|
return /* @__PURE__ */ Nt(Pe.Provider, { value: h, children: t.children });
|
|
45294
45294
|
}, Eh = { name: "Spiral", props: { colorBack: { default: "#000000", transform: Ts, description: "Background color", ui: { type: "color", label: "Background Color" } }, colorFront: { default: "#ffffff", transform: Ts, description: "Spiral stroke color", ui: { type: "color", label: "Spiral Color" } }, strokeWidth: { default: 0.5, description: "Thickness of spiral stroke", ui: { type: "range", min: 0, max: 2, step: 0.01, label: "Stroke Width" } }, strokeFalloff: { default: 0, description: "Stroke losing width further from center", ui: { type: "range", min: 0, max: 1, step: 0.01, label: "Stroke Falloff" } }, softness: { default: 0, description: "Color transition sharpness (0 = hard edge, 1 = smooth fade)", ui: { type: "range", min: 0, max: 1, step: 0.01, label: "Softness" } }, speed: { default: 1, description: "Animation speed (negative values reverse direction)", ui: { type: "range", min: -3, max: 3, step: 0.1, label: "Speed" } }, center: { default: { x: 0.5, y: 0.5 }, transform: bp, description: "The center point of the spiral" }, scale: { default: 1, description: "Scale factor for spiral bands (higher = more bands, lower = fewer bands)", ui: { type: "range", min: 0.1, max: 5, step: 0.1, label: "Scale" } } }, fragmentNode: ({ uniforms: t }) => {
|
|
45295
|
-
let { vec2: e, vec4: r, float: s,
|
|
45295
|
+
let { vec2: e, vec4: r, float: s, atan: i, length: n, clamp: a, fract: o, abs: l, mix: h, smoothstep: u, screenUV: c, time: d, fwidth: p, viewportSize: m } = At, f = m.x.div(m.y), g = e(c.x.mul(f), c.y), b = e(t.center.uniform.x.mul(f), t.center.uniform.y.oneMinus()), v = g.sub(b), w = d.mul(t.speed.uniform), T = n(v), N = T, S = i(v.y, v.x).sub(w), M = s(6.283185307), A = S.div(M), U = N.mul(t.scale.uniform).add(A), Q = o(U), Z = l(Q.sub(0.5)).mul(2), te = a(t.strokeWidth.uniform, t.strokeFalloff.uniform.mul(5e-3), 1), ee = a(t.strokeFalloff.uniform, 0, 1).mul(T).oneMinus(), ae = te.mul(ee), ne = p(U), ye = s(4).sub(u(0.05, 0.4, t.strokeWidth.uniform.mul(2)).mul(u(0.05, 0.4, t.strokeWidth.uniform.oneMinus().mul(2))).mul(3)), fe = h(ye.mul(ne), p(Z), a(ne, 0, 1)), Te = u(ae.sub(fe).sub(t.softness.uniform), ae.add(fe).add(t.softness.uniform), Z), me = t.colorFront.uniform.rgb.mul(t.colorFront.uniform.a), ue = t.colorFront.uniform.a, we = t.colorBack.uniform.rgb.mul(t.colorBack.uniform.a), je = t.colorBack.uniform.a, qe = me.mul(Te), yt = ue.mul(Te), ct = qe.add(we.mul(yt.oneMinus())), It = yt.add(je.mul(yt.oneMinus()));
|
|
45296
45296
|
return r(ct, It);
|
|
45297
45297
|
} };
|
|
45298
45298
|
function ume(t, e) {
|