shaders 2.2.11 → 2.2.12
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/Godrays-D3VnYrAm.js +106 -0
- package/dist/core/Spherize-CqjZj4yV.js +104 -0
- package/dist/core/index.js +126 -124
- package/dist/core/shaderRegistry.d.ts.map +1 -1
- package/dist/core/shaders/Godrays/index.d.ts.map +1 -1
- package/dist/core/shaders/Godrays/index.js +1 -1
- package/dist/core/shaders/Spherize/index.d.ts +62 -0
- package/dist/core/shaders/Spherize/index.d.ts.map +1 -0
- package/dist/core/shaders/Spherize/index.js +7 -0
- package/dist/core/shaders/Spiral/index.js +1 -1
- package/dist/core/shaders/Strands/index.js +1 -1
- package/dist/core/shaders/Stretch/index.js +1 -1
- package/dist/core/shaders/Swirl/index.js +1 -1
- package/dist/core/shaders/TiltShift/index.js +1 -1
- package/dist/core/shaders/Tritone/index.js +1 -1
- package/dist/core/shaders/Twirl/index.js +1 -1
- package/dist/core/shaders/Vibrance/index.js +1 -1
- package/dist/core/shaders/WaveDistortion/index.js +1 -1
- package/dist/core/shaders/ZoomBlur/index.js +1 -1
- package/dist/react/{generatePresetCode-CbulNGo3.js → generatePresetCode-BXrrE8g5.js} +9 -4
- package/dist/react/{generatePresetCode-ClK4i9O1.cjs → generatePresetCode-DWBlTzlt.cjs} +2 -2
- package/dist/react/index.cjs +84 -84
- package/dist/react/index.js +10458 -10237
- package/dist/react/utils/generatePresetCode.cjs +1 -1
- package/dist/react/utils/generatePresetCode.js +1 -1
- package/dist/registry.js +166 -0
- package/dist/svelte/components/Spherize.svelte.d.ts +19 -0
- package/dist/svelte/{generatePresetCode-CbulNGo3.js → generatePresetCode-BXrrE8g5.js} +9 -4
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +11508 -11328
- package/dist/svelte/utils/generatePresetCode.js +1 -1
- package/dist/vue/{generatePresetCode-Baa8DyZE.js → generatePresetCode-nej_B_Ke.js} +30 -25
- package/dist/vue/index.js +10071 -9869
- package/dist/vue/utils/generatePresetCode.js +1 -1
- package/package.json +6 -1
- package/dist/core/Godrays-cUzAKVXn.js +0 -106
- /package/dist/core/{Spiral-CcyI8azF.js → Spiral-BRrismPI.js} +0 -0
- /package/dist/core/{Strands-Co4fkc05.js → Strands-DyrV6zDO.js} +0 -0
- /package/dist/core/{Stretch-C8iYAgNS.js → Stretch-DeBlJ-NH.js} +0 -0
- /package/dist/core/{Swirl-BpMwkNcm.js → Swirl-PxpHzkdC.js} +0 -0
- /package/dist/core/{TiltShift-D31nakFq.js → TiltShift-DiArippe.js} +0 -0
- /package/dist/core/{Tritone-Dx48G3b1.js → Tritone-KtJgZviA.js} +0 -0
- /package/dist/core/{Twirl-ng6pwyl2.js → Twirl-C6xj1p52.js} +0 -0
- /package/dist/core/{Vibrance-D0ArL0qp.js → Vibrance-C6lNgpWH.js} +0 -0
- /package/dist/core/{WaveDistortion-DGKrpUdb.js → WaveDistortion-DcXxPZ2w.js} +0 -0
- /package/dist/core/{ZoomBlur-uQyy5yko.js → ZoomBlur-_feIVJs6.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shaders",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.12",
|
|
4
4
|
"description": "Declarative shader components for Vue, React, and Svelte",
|
|
5
5
|
"author": "Simon Le Marchant<https://github.com/marchantweb>",
|
|
6
6
|
"homepage": "https://shaders.com/",
|
|
@@ -324,6 +324,11 @@
|
|
|
324
324
|
"types": "./dist/core/shaders/Stretch/index.d.ts",
|
|
325
325
|
"import": "./dist/core/shaders/Stretch/index.js",
|
|
326
326
|
"require": "./dist/core/shaders/Stretch/index.js"
|
|
327
|
+
},
|
|
328
|
+
"./core/Spherize": {
|
|
329
|
+
"types": "./dist/core/shaders/Spherize/index.d.ts",
|
|
330
|
+
"import": "./dist/core/shaders/Spherize/index.js",
|
|
331
|
+
"require": "./dist/core/shaders/Spherize/index.js"
|
|
327
332
|
}
|
|
328
333
|
},
|
|
329
334
|
"files": [
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { k as A, m as E, t as M } from "./three.tsl-BqgDcRt9.js";
|
|
2
|
-
import { o as j, r as _ } from "./transformations-DBjTkQ5b.js";
|
|
3
|
-
E();
|
|
4
|
-
const z = {
|
|
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: j,
|
|
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: _,
|
|
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: _,
|
|
79
|
-
description: "Background color",
|
|
80
|
-
ui: {
|
|
81
|
-
type: "color",
|
|
82
|
-
label: "Background Color"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
fragmentNode: ({ uniforms: e, uvContext: v }) => {
|
|
87
|
-
const { vec2: i, vec4: R, float: a, sin: T, atan2: B, length: D, pow: h, smoothstep: P, mix: m, clamp: x, screenUV: S, time: U, PI: w, Fn: g } = A, F = v ?? S, G = i(e.center.uniform.x, e.center.uniform.y.oneMinus()), d = F.sub(G), C = g(([n]) => {
|
|
88
|
-
const t = n.floor(), s = n.fract(), o = (u) => T(u.x.mul(127.1).add(u.y.mul(311.7))).mul(43758.5453).fract(), l = o(t), r = o(t.add(i(1, 0))), y = o(t.add(i(0, 1))), p = o(t.add(i(1, 1))), c = s.mul(s).mul(s.mul(-2).add(3));
|
|
89
|
-
return m(m(l, r, c.x), m(y, p, c.x), c.y);
|
|
90
|
-
}), f = g(([n, t, s, o]) => {
|
|
91
|
-
const l = B(n.y, n.x), r = i(l.mul(s), t), y = i(l.mod(w.mul(2)).mul(s), t), p = h(C(r), o);
|
|
92
|
-
return m(h(C(y), o), p, P(-0.15, 0.15, n.x));
|
|
93
|
-
}), k = g(() => {
|
|
94
|
-
const n = U.mul(e.speed.uniform).mul(0.2), t = D(d), s = a(6.5).mul(M(e.spotty.uniform)), o = a(4).sub(a(3).mul(x(e.intensity.uniform, 0, 1))), l = a(6).mul(e.density.uniform), r = a(0).toVar(), y = t.mul(1).sub(n.mul(3)), p = t.mul(0.5).mul(a(1).add(s)).sub(n.mul(2)), c = l.mul(5), u = f(d, y, c, o).toVar();
|
|
95
|
-
u.assign(u.mul(f(d, p, c.mul(4), o))), r.assign(r.add(u));
|
|
96
|
-
const N = t.mul(1.4).sub(n.mul(2.5)), q = t.mul(0.7).mul(a(1).add(s)).sub(n.mul(1.8)), V = l.mul(4.5), b = f(d, N, V, o).toVar();
|
|
97
|
-
return b.assign(b.mul(f(d, q, V.mul(3.5), o))), r.assign(r.add(b.mul(0.7))), x(r, 0, 1);
|
|
98
|
-
})(), I = e.rayColor.uniform.rgb, L = e.backgroundColor.uniform.rgb;
|
|
99
|
-
return R(m(L, I, k), e.backgroundColor.uniform.a.add(k.mul(e.rayColor.uniform.a)));
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
var K = z;
|
|
103
|
-
export {
|
|
104
|
-
z as n,
|
|
105
|
-
K as t
|
|
106
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|