shaders 2.2.11 → 2.2.14

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.
Files changed (67) hide show
  1. package/dist/core/{Blob-C0G0efjG.js → Blob-CzWSpVTR.js} +1 -1
  2. package/dist/core/{Checkerboard-BPkiSF5I.js → Checkerboard-B8CnUlbi.js} +1 -1
  3. package/dist/core/{CursorTrail-BeJGeovB.js → CursorTrail-BcaRHjU5.js} +1 -1
  4. package/dist/core/{Duotone-_nR_o3-g.js → Duotone-DGNEAlye.js} +1 -1
  5. package/dist/core/Godrays-D3VnYrAm.js +106 -0
  6. package/dist/core/{LinearGradient-LEMeW0KM.js → LinearGradient-DPe-Z-lw.js} +1 -1
  7. package/dist/core/{RadialGradient-D0cN67jm.js → RadialGradient-CbaCbOJj.js} +1 -1
  8. package/dist/core/{Ripples-DH71sFJc.js → Ripples-0Ufm3-fY.js} +9 -8
  9. package/dist/core/{SimplexNoise-DPGC2OPJ.js → SimplexNoise-BKB94dhx.js} +7 -6
  10. package/dist/core/Spherize-CqjZj4yV.js +104 -0
  11. package/dist/core/{Spiral-CcyI8azF.js → Spiral-BkzSmPUL.js} +1 -1
  12. package/dist/core/{Swirl-BpMwkNcm.js → Swirl-BHn9Ji7_.js} +1 -1
  13. package/dist/core/{Tritone-Dx48G3b1.js → Tritone-DrzxJUaq.js} +1 -1
  14. package/dist/core/colorMixing-C-FChLp0.js +22 -0
  15. package/dist/core/index.js +135 -133
  16. package/dist/core/shaderRegistry.d.ts.map +1 -1
  17. package/dist/core/shaders/Blob/index.js +2 -2
  18. package/dist/core/shaders/Checkerboard/index.js +2 -2
  19. package/dist/core/shaders/CursorTrail/index.js +2 -2
  20. package/dist/core/shaders/Duotone/index.js +2 -2
  21. package/dist/core/shaders/Godrays/index.d.ts.map +1 -1
  22. package/dist/core/shaders/Godrays/index.js +1 -1
  23. package/dist/core/shaders/LinearGradient/index.js +2 -2
  24. package/dist/core/shaders/RadialGradient/index.js +2 -2
  25. package/dist/core/shaders/Ripples/index.d.ts.map +1 -1
  26. package/dist/core/shaders/Ripples/index.js +4 -3
  27. package/dist/core/shaders/SimplexNoise/index.d.ts.map +1 -1
  28. package/dist/core/shaders/SimplexNoise/index.js +4 -3
  29. package/dist/core/shaders/Spherize/index.d.ts +62 -0
  30. package/dist/core/shaders/Spherize/index.d.ts.map +1 -0
  31. package/dist/core/shaders/Spherize/index.js +7 -0
  32. package/dist/core/shaders/Spiral/index.js +2 -2
  33. package/dist/core/shaders/Strands/index.js +1 -1
  34. package/dist/core/shaders/Stretch/index.js +1 -1
  35. package/dist/core/shaders/Swirl/index.js +2 -2
  36. package/dist/core/shaders/TiltShift/index.js +1 -1
  37. package/dist/core/shaders/Tritone/index.js +2 -2
  38. package/dist/core/shaders/Twirl/index.js +1 -1
  39. package/dist/core/shaders/Vibrance/index.js +1 -1
  40. package/dist/core/shaders/WaveDistortion/index.js +1 -1
  41. package/dist/core/shaders/ZoomBlur/index.js +1 -1
  42. package/dist/core/utilities/colorMixing.d.ts.map +1 -1
  43. package/dist/react/{generatePresetCode-CbulNGo3.js → generatePresetCode-BXrrE8g5.js} +9 -4
  44. package/dist/react/{generatePresetCode-ClK4i9O1.cjs → generatePresetCode-DWBlTzlt.cjs} +2 -2
  45. package/dist/react/index.cjs +71 -71
  46. package/dist/react/index.js +9016 -8795
  47. package/dist/react/utils/generatePresetCode.cjs +1 -1
  48. package/dist/react/utils/generatePresetCode.js +1 -1
  49. package/dist/registry.js +166 -0
  50. package/dist/svelte/components/Spherize.svelte.d.ts +19 -0
  51. package/dist/svelte/{generatePresetCode-CbulNGo3.js → generatePresetCode-BXrrE8g5.js} +9 -4
  52. package/dist/svelte/index.d.ts +1 -0
  53. package/dist/svelte/index.js +8244 -8064
  54. package/dist/svelte/utils/generatePresetCode.js +1 -1
  55. package/dist/vue/{generatePresetCode-Baa8DyZE.js → generatePresetCode-nej_B_Ke.js} +30 -25
  56. package/dist/vue/index.js +7848 -7646
  57. package/dist/vue/utils/generatePresetCode.js +1 -1
  58. package/package.json +6 -1
  59. package/dist/core/Godrays-cUzAKVXn.js +0 -106
  60. package/dist/core/colorMixing-DPZ-Td4U.js +0 -22
  61. /package/dist/core/{Strands-Co4fkc05.js → Strands-DyrV6zDO.js} +0 -0
  62. /package/dist/core/{Stretch-C8iYAgNS.js → Stretch-DeBlJ-NH.js} +0 -0
  63. /package/dist/core/{TiltShift-D31nakFq.js → TiltShift-DiArippe.js} +0 -0
  64. /package/dist/core/{Twirl-ng6pwyl2.js → Twirl-C6xj1p52.js} +0 -0
  65. /package/dist/core/{Vibrance-D0ArL0qp.js → Vibrance-C6lNgpWH.js} +0 -0
  66. /package/dist/core/{WaveDistortion-DGKrpUdb.js → WaveDistortion-DcXxPZ2w.js} +0 -0
  67. /package/dist/core/{ZoomBlur-uQyy5yko.js → ZoomBlur-_feIVJs6.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { k as fo, m as bo } from "./three.tsl-BqgDcRt9.js";
2
2
  import { t as yo } from "./time-5uQ65blS.js";
3
3
  import { i as xo, o as Co, r as g, t as vo } from "./transformations-DBjTkQ5b.js";
4
- import { t as So } from "./colorMixing-DPZ-Td4U.js";
4
+ import { t as So } from "./colorMixing-C-FChLp0.js";
5
5
  bo();
6
6
  const Ao = {
7
7
  name: "Blob",
@@ -1,6 +1,6 @@
1
1
  import { k as B, m as U } from "./three.tsl-BqgDcRt9.js";
2
2
  import { i as _, r as f, t as w } from "./transformations-DBjTkQ5b.js";
3
- import { t as A } from "./colorMixing-DPZ-Td4U.js";
3
+ import { t as A } from "./colorMixing-C-FChLp0.js";
4
4
  U();
5
5
  const F = {
6
6
  name: "Checkerboard",
@@ -1,6 +1,6 @@
1
1
  import { j as p, k as at, m as et } from "./three.tsl-BqgDcRt9.js";
2
2
  import { i as ot, r as _, t as rt } from "./transformations-DBjTkQ5b.js";
3
- import { t as lt } from "./colorMixing-DPZ-Td4U.js";
3
+ import { t as lt } from "./colorMixing-C-FChLp0.js";
4
4
  import { DataTexture as st, FloatType as nt, LinearFilter as B, RGBAFormat as it } from "three";
5
5
  et();
6
6
  const ct = {
@@ -1,6 +1,6 @@
1
1
  import { k as f, m as b } from "./three.tsl-BqgDcRt9.js";
2
2
  import { i as C, r as a, t as g } from "./transformations-DBjTkQ5b.js";
3
- import { t as T } from "./colorMixing-DPZ-Td4U.js";
3
+ import { t as T } from "./colorMixing-C-FChLp0.js";
4
4
  b();
5
5
  const h = {
6
6
  name: "Duotone",
@@ -0,0 +1,106 @@
1
+ import { k as K, m as O, t as Q } from "./three.tsl-BqgDcRt9.js";
2
+ import { o as W, r as v } from "./transformations-DBjTkQ5b.js";
3
+ O();
4
+ const X = {
5
+ name: "Godrays",
6
+ category: "Base Layers",
7
+ description: "Volumetric light rays emanating from a point",
8
+ requiresRTT: !1,
9
+ acceptsUVContext: !0,
10
+ props: {
11
+ center: {
12
+ default: {
13
+ x: 0,
14
+ y: 0
15
+ },
16
+ transform: W,
17
+ description: "The center point of the god rays",
18
+ ui: {
19
+ type: "position",
20
+ label: "Center"
21
+ }
22
+ },
23
+ density: {
24
+ default: 0.3,
25
+ description: "Frequency of ray sectors",
26
+ ui: {
27
+ type: "range",
28
+ min: 0,
29
+ max: 1,
30
+ step: 0.01,
31
+ label: "Density"
32
+ }
33
+ },
34
+ intensity: {
35
+ default: 0.8,
36
+ description: "Ray visibility within sectors",
37
+ ui: {
38
+ type: "range",
39
+ min: 0,
40
+ max: 1,
41
+ step: 0.01,
42
+ label: "Intensity"
43
+ }
44
+ },
45
+ spotty: {
46
+ default: 1,
47
+ description: "Density of spots on rays (higher = more spots)",
48
+ ui: {
49
+ type: "range",
50
+ min: 0,
51
+ max: 1,
52
+ step: 0.01,
53
+ label: "Spotty"
54
+ }
55
+ },
56
+ speed: {
57
+ default: 0.5,
58
+ description: "Animation speed of the rays",
59
+ ui: {
60
+ type: "range",
61
+ min: 0,
62
+ max: 2,
63
+ step: 0.01,
64
+ label: "Speed"
65
+ }
66
+ },
67
+ rayColor: {
68
+ default: "#4283fb",
69
+ transform: v,
70
+ description: "Color of the light rays",
71
+ ui: {
72
+ type: "color",
73
+ label: "Ray Color"
74
+ }
75
+ },
76
+ backgroundColor: {
77
+ default: "transparent",
78
+ transform: v,
79
+ description: "Background color",
80
+ ui: {
81
+ type: "color",
82
+ label: "Background Color"
83
+ }
84
+ }
85
+ },
86
+ fragmentNode: ({ uniforms: s, uvContext: B }) => {
87
+ const { vec2: i, vec4: _, float: r, sin: G, atan2: T, length: D, pow: x, smoothstep: P, mix: p, clamp: g, screenUV: S, time: U, PI: w, Fn: h } = K, F = B ?? S, I = i(s.center.uniform.x, s.center.uniform.y.oneMinus()), m = F.sub(I), V = h(([n]) => {
88
+ const t = n.floor(), e = n.fract(), o = (u) => G(u.x.mul(127.1).add(u.y.mul(311.7))).mul(43758.5453).fract(), l = o(t), a = o(t.add(i(1, 0))), d = o(t.add(i(0, 1))), y = o(t.add(i(1, 1))), c = e.mul(e).mul(e.mul(-2).add(3));
89
+ return p(p(l, a, c.x), p(d, y, c.x), c.y);
90
+ }), f = h(([n, t, e, o]) => {
91
+ const l = T(n.y, n.x), a = i(l.mul(e), t), d = i(l.mod(w.mul(2)).mul(e), t), y = x(V(a), o);
92
+ return p(x(V(d), o), y, P(-0.15, 0.15, n.x));
93
+ }), L = h(() => {
94
+ const n = U.mul(s.speed.uniform).mul(0.2), t = D(m), e = r(6.5).mul(Q(s.spotty.uniform)), o = r(4).sub(r(3).mul(g(s.intensity.uniform, 0, 1))), l = r(6).mul(s.density.uniform), a = r(0).toVar(), d = t.mul(1).sub(n.mul(3)), y = t.mul(0.5).mul(r(1).add(e)).sub(n.mul(2)), c = l.mul(5), u = f(m, d, c, o).toVar();
95
+ u.assign(u.mul(f(m, y, c.mul(4), o))), a.assign(a.add(u));
96
+ const H = t.mul(1.4).sub(n.mul(2.5)), J = t.mul(0.7).mul(r(1).add(e)).sub(n.mul(1.8)), R = l.mul(4.5), C = f(m, H, R, o).toVar();
97
+ return C.assign(C.mul(f(m, J, R.mul(3.5), o))), a.assign(a.add(C.mul(0.7))), g(a, 0, 1);
98
+ })(), N = s.rayColor.uniform.rgb, q = s.rayColor.uniform.a, E = s.backgroundColor.uniform.rgb, k = s.backgroundColor.uniform.a, b = L.mul(q), A = b.add(k.mul(r(1).sub(b))), M = g(A, 1e-3, 1), j = N.mul(b), z = E.mul(k).mul(r(1).sub(b));
99
+ return _(j.add(z).div(M), A);
100
+ }
101
+ };
102
+ var $ = X;
103
+ export {
104
+ X as n,
105
+ $ as t
106
+ };
@@ -1,6 +1,6 @@
1
1
  import { k as R, m as W } from "./three.tsl-BqgDcRt9.js";
2
2
  import { a as X, i as Y, n as j, o as h, r as b, t as F } from "./transformations-DBjTkQ5b.js";
3
- import { t as I } from "./colorMixing-DPZ-Td4U.js";
3
+ import { t as I } from "./colorMixing-C-FChLp0.js";
4
4
  W();
5
5
  const J = {
6
6
  name: "LinearGradient",
@@ -1,6 +1,6 @@
1
1
  import { k as d, m as f } from "./three.tsl-BqgDcRt9.js";
2
2
  import { i as m, o as u, r as n, t as g } from "./transformations-DBjTkQ5b.js";
3
- import { t as h } from "./colorMixing-DPZ-Td4U.js";
3
+ import { t as h } from "./colorMixing-C-FChLp0.js";
4
4
  f();
5
5
  const y = {
6
6
  name: "RadialGradient",
@@ -1,8 +1,9 @@
1
- import { k as w, m as A } from "./three.tsl-BqgDcRt9.js";
1
+ import { d as T, k as w, m as A } from "./three.tsl-BqgDcRt9.js";
2
2
  import { t as S } from "./time-5uQ65blS.js";
3
3
  import { o as _, r as l } from "./transformations-DBjTkQ5b.js";
4
+ import { t as q } from "./colorMixing-C-FChLp0.js";
4
5
  A();
5
- const q = {
6
+ const P = {
6
7
  name: "Ripples",
7
8
  category: "Base Layers",
8
9
  description: "Concentric animated ripples emanating from a point",
@@ -94,13 +95,13 @@ const q = {
94
95
  }
95
96
  }
96
97
  },
97
- fragmentNode: (t) => {
98
- const { uniforms: e, uvContext: f } = t, { vec2: o, float: s, screenUV: m, sin: u, distance: d, viewportSize: n, mix: h, smoothstep: y } = w, r = f ?? m, i = e.center.uniform, b = e.colorA.uniform, x = e.colorB.uniform, g = e.frequency.uniform, a = e.softness.uniform, k = e.thickness.uniform, v = e.phase.uniform, p = n.x.div(n.y), C = d(o(r.x.mul(p), r.y), o(i.x.mul(p), i.y.oneMinus())), B = S(t, e.speed), T = u(C.mul(g).sub(B).add(v)), c = k.mul(s(2)).sub(s(1));
99
- return h(x, b, y(c.add(a), c.sub(a), T));
98
+ fragmentNode: (o) => {
99
+ const { uniforms: e, uvContext: f } = o, { vec2: t, float: s, screenUV: m, sin: u, distance: d, viewportSize: n, smoothstep: h } = w, 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), k = d(t(r.x.mul(p), r.y), t(i.x.mul(p), i.y.oneMinus())), v = S(o, e.speed), B = u(k.mul(x).sub(v).add(C)), c = g.mul(s(2)).sub(s(1));
100
+ return q(b, y, h(c.add(a), c.sub(a), B), T(0));
100
101
  }
101
102
  };
102
- var U = q;
103
+ var z = P;
103
104
  export {
104
- q as n,
105
- U as t
105
+ P as n,
106
+ z as t
106
107
  };
@@ -1,6 +1,7 @@
1
- import { M as u, P as r, S as f, _ as x, a as y, j as g, m as v, u as b, y as S } from "./three.tsl-BqgDcRt9.js";
2
- import { t as h } from "./time-5uQ65blS.js";
1
+ import { M as f, P as r, S as u, a as x, d as y, j as g, m as v, u as b, y as C } from "./three.tsl-BqgDcRt9.js";
2
+ import { t as S } from "./time-5uQ65blS.js";
3
3
  import { r as n } from "./transformations-DBjTkQ5b.js";
4
+ import { t as h } from "./colorMixing-C-FChLp0.js";
4
5
  v();
5
6
  const B = {
6
7
  name: "SimplexNoise",
@@ -83,12 +84,12 @@ const B = {
83
84
  }
84
85
  },
85
86
  fragmentNode: (t) => {
86
- const { uniforms: e, uvContext: i } = t, o = i ?? f, s = r.x.div(r.y), l = g(o.x.mul(s), o.y), c = h(t, e.speed), a = l.mul(b(e.scale.uniform)).add(e.seed.uniform), m = S(u(a.x, a.y, c.mul(0.5))), p = e.contrast.uniform.add(1), d = y(0, 1, m.mul(p).add(e.balance.uniform).mul(0.5).add(0.5));
87
- return x(e.colorB.uniform, e.colorA.uniform, d);
87
+ const { uniforms: e, uvContext: i } = t, o = i ?? u, s = r.x.div(r.y), l = g(o.x.mul(s), o.y), c = S(t, e.speed), a = l.mul(b(e.scale.uniform)).add(e.seed.uniform), m = C(f(a.x, a.y, c.mul(0.5))), p = e.contrast.uniform.add(1), d = x(0, 1, m.mul(p).add(e.balance.uniform).mul(0.5).add(0.5));
88
+ return h(e.colorB.uniform, e.colorA.uniform, d, y(0));
88
89
  }
89
90
  };
90
- var w = B;
91
+ var P = B;
91
92
  export {
92
93
  B as n,
93
- w as t
94
+ P as t
94
95
  };
@@ -0,0 +1,104 @@
1
+ import { k as O, m as Q } from "./three.tsl-BqgDcRt9.js";
2
+ import { o as z, r as W } from "./transformations-DBjTkQ5b.js";
3
+ Q();
4
+ const X = {
5
+ name: "Spherize",
6
+ category: "Distortions",
7
+ description: "Map content onto a 3D sphere surface with depth distortion",
8
+ requiresRTT: !0,
9
+ requiresChild: !0,
10
+ props: {
11
+ radius: {
12
+ default: 1,
13
+ description: "Radius of the sphere (1 = half viewport height)",
14
+ ui: {
15
+ type: "range",
16
+ min: 0.1,
17
+ max: 3,
18
+ step: 0.01,
19
+ label: "Radius"
20
+ }
21
+ },
22
+ depth: {
23
+ default: 1,
24
+ description: "How much the sphere bulges toward viewer (0 = flat, higher = more bulge)",
25
+ ui: {
26
+ type: "range",
27
+ min: 0,
28
+ max: 3,
29
+ step: 0.01,
30
+ label: "Depth"
31
+ }
32
+ },
33
+ center: {
34
+ default: {
35
+ x: 0.5,
36
+ y: 0.5
37
+ },
38
+ transform: z,
39
+ description: "The center point of the sphere",
40
+ ui: {
41
+ type: "position",
42
+ label: "Center"
43
+ }
44
+ },
45
+ lightPosition: {
46
+ default: {
47
+ x: 0.3,
48
+ y: 0.3
49
+ },
50
+ transform: z,
51
+ description: "Position of the specular light source",
52
+ ui: {
53
+ type: "position",
54
+ label: "Light Position"
55
+ }
56
+ },
57
+ lightIntensity: {
58
+ default: 0.5,
59
+ description: "Intensity of the rim light (0 = off)",
60
+ ui: {
61
+ type: "range",
62
+ min: 0,
63
+ max: 1,
64
+ step: 0.01,
65
+ label: "Light Intensity"
66
+ }
67
+ },
68
+ lightSoftness: {
69
+ default: 0.5,
70
+ description: "Softness of the rim light falloff (0 = hard edge, 1 = soft glow)",
71
+ ui: {
72
+ type: "range",
73
+ min: 0,
74
+ max: 1,
75
+ step: 0.01,
76
+ label: "Light Softness"
77
+ }
78
+ },
79
+ lightColor: {
80
+ default: "#ffffff",
81
+ transform: W,
82
+ description: "Color of the specular highlight",
83
+ ui: {
84
+ type: "color",
85
+ label: "Light Color"
86
+ }
87
+ }
88
+ },
89
+ fragmentNode: ({ uniforms: e, childNode: m, onCleanup: T }) => {
90
+ const { vec2: o, vec3: l, vec4: p, float: t, screenUV: I, convertToTexture: L, viewportSize: g, sqrt: _, max: a, smoothstep: q, pow: y, normalize: u, dot: x } = O;
91
+ if (!m) return p(0, 0, 0, 0);
92
+ const d = L(m);
93
+ T(() => {
94
+ d?.renderTarget?.dispose && d.renderTarget.dispose();
95
+ });
96
+ const b = I, v = g.x.div(g.y), s = o(e.center.uniform.x, e.center.uniform.y.oneMinus()), w = e.radius.uniform, i = o(b.x.sub(s.x).mul(v), b.y.sub(s.y)).mul(2).div(w), C = i.x.mul(i.x).add(i.y.mul(i.y)), R = t(1).sub(q(t(0.98), t(1), C)), D = _(a(t(0), t(1).sub(C))), U = t(1).add(D.mul(e.depth.uniform)), P = i.div(U).mul(w).div(2), V = o(P.x.div(v).add(s.x), P.y.add(s.y)), n = d.sample(V), S = o(e.lightPosition.uniform.x, e.lightPosition.uniform.y.oneMinus()), M = e.lightIntensity.uniform, A = e.lightSoftness.uniform, c = l(e.lightColor.uniform.x, e.lightColor.uniform.y, e.lightColor.uniform.z), h = u(l(i.x, i.y, D)), B = l(0, 0, 1), k = t(1).add(t(4).mul(t(1).sub(A))), F = y(t(1).sub(a(x(h, B), t(0))), k), G = o(S.x.sub(t(0.5)).mul(2), S.y.sub(t(0.5)).mul(2)), H = u(o(h.x, h.y).add(o(1e-4, 1e-4))), N = u(G.add(o(1e-4, 1e-4))), j = y(a(t(0), x(H, N)), t(2)), f = F.mul(j).mul(M).mul(t(2)), E = n.x.add(c.x.mul(f)), J = n.y.add(c.y.mul(f)), K = n.z.add(c.z.mul(f)), r = n.w.mul(R);
97
+ return p(E.mul(r), J.mul(r), K.mul(r), r);
98
+ }
99
+ };
100
+ var $ = X;
101
+ export {
102
+ X as n,
103
+ $ as t
104
+ };
@@ -1,6 +1,6 @@
1
1
  import { k as N, m as O } from "./three.tsl-BqgDcRt9.js";
2
2
  import { i as j, o as D, r as g, t as I } from "./transformations-DBjTkQ5b.js";
3
- import { t as R } from "./colorMixing-DPZ-Td4U.js";
3
+ import { t as R } from "./colorMixing-C-FChLp0.js";
4
4
  O();
5
5
  const q = {
6
6
  name: "Spiral",
@@ -1,7 +1,7 @@
1
1
  import { k as L, m as U } from "./three.tsl-BqgDcRt9.js";
2
2
  import { t as N } from "./time-5uQ65blS.js";
3
3
  import { i as O, r as v, t as T } from "./transformations-DBjTkQ5b.js";
4
- import { t as j } from "./colorMixing-DPZ-Td4U.js";
4
+ import { t as j } from "./colorMixing-C-FChLp0.js";
5
5
  U();
6
6
  const E = {
7
7
  name: "Swirl",
@@ -1,6 +1,6 @@
1
1
  import { k as g, m as C } from "./three.tsl-BqgDcRt9.js";
2
2
  import { i as M, r as i, t as T } from "./transformations-DBjTkQ5b.js";
3
- import { t as l } from "./colorMixing-DPZ-Td4U.js";
3
+ import { t as l } from "./colorMixing-C-FChLp0.js";
4
4
  C();
5
5
  const S = {
6
6
  name: "Tritone",
@@ -0,0 +1,22 @@
1
+ import { h as C, k as E, m as G } from "./three.tsl-BqgDcRt9.js";
2
+ G();
3
+ var { vec3: o, vec4: M, float: n, pow: r, sqrt: H, atan: P, cos: j, sin: D } = E, k = (u) => o(u.x.mul(1.2249401).sub(u.y.mul(0.2249404)).sub(u.z.mul(0)), u.x.mul(-0.0420569).add(u.y.mul(1.0420571)).add(u.z.mul(0)), u.x.mul(-0.0196376).sub(u.y.mul(0.0786361)).add(u.z.mul(1.0982735))), v = (u) => o(u.x.mul(0.8224621).add(u.y.mul(0.177538)).add(u.z.mul(0)), u.x.mul(0.0331941).add(u.y.mul(0.9668058)).add(u.z.mul(0)), u.x.mul(0.0170826).add(u.y.mul(0.0723974)).add(u.z.mul(0.9105199))), _ = (u) => {
4
+ const s = u.x, l = u.y, t = u.z, c = s.mul(0.4122214708).add(l.mul(0.5363325363)).add(t.mul(0.0514459929)), e = s.mul(0.2119034982).add(l.mul(0.6806995451).add(t.mul(0.1073969566))), x = s.mul(0.0883024619).add(l.mul(0.2817188376)).add(t.mul(0.6299787005)), d = r(c, n(1 / 3)), m = r(e, n(1 / 3)), a = r(x, n(1 / 3));
5
+ return o(d.mul(0.2104542553).add(m.mul(0.793617785)).sub(a.mul(0.0040720468)), d.mul(1.9779984951).sub(m.mul(2.428592205)).add(a.mul(0.4505937099)), d.mul(0.0259040371).add(m.mul(0.7827717662)).sub(a.mul(0.808675766)));
6
+ }, T = (u) => {
7
+ const s = u.x, l = u.y, t = u.z, c = s.add(l.mul(0.3963377774)).add(t.mul(0.2158037573)), e = s.sub(l.mul(0.1055613458)).sub(t.mul(0.0638541728)), x = s.sub(l.mul(0.0894841775)).sub(t.mul(1.291485548)), d = r(c, n(3)), m = r(e, n(3)), a = r(x, n(3));
8
+ return o(d.mul(4.0767416621).sub(m.mul(3.3077115913)).add(a.mul(0.2309699292)), d.mul(-1.2684380046).add(m.mul(2.6097574011)).sub(a.mul(0.3413193965)), d.mul(-0.0041960863).sub(m.mul(0.7034186147)).add(a.mul(1.707614701)));
9
+ }, w = (u) => {
10
+ const s = u.x, l = u.y, t = u.z;
11
+ return o(s, H(l.mul(l).add(t.mul(t))), P(t, l));
12
+ }, F = (u) => {
13
+ const s = u.x, l = u.y, t = u.z;
14
+ return o(s, l.mul(j(t)), l.mul(D(t)));
15
+ };
16
+ const J = (u, s, l, t) => {
17
+ const c = o(u.x, u.y, u.z), e = o(s.x, s.y, s.z), x = u.w, d = s.w, m = x.mul(n(1).sub(l)), a = d.mul(l), b = m.add(a), R = C(b, n(1e-3)), h = (p, A) => p.mul(m).add(A.mul(a)).div(R), g = h(c, e), B = k(c), O = k(e), y = _(B), z = _(O), f = v(T(F(h(w(y), w(z))))), q = v(T(h(y, z))), L = t.greaterThanEqual(n(0.5)), i = t.greaterThanEqual(n(1.5)).select(q, L.select(f, g)), W = b;
18
+ return M(i.x, i.y, i.z, W);
19
+ };
20
+ export {
21
+ J as t
22
+ };