shaders 2.2.0 → 2.2.2
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-BJi-Edw-.js → AngularBlur-BTUdXC0g.js} +7 -6
- package/dist/core/{Ascii-B1KHvM1u.js → Ascii-Bu8ii7oo.js} +32 -31
- package/dist/core/Blob-C0G0efjG.js +170 -0
- package/dist/core/{Blur-bz9Ubr0x.js → Blur-BzUO9yxF.js} +14 -13
- package/dist/core/Bulge-BCXYAzig.js +104 -0
- package/dist/core/{CRTScreen-BnfROw0f.js → CRTScreen-cJ3XHrI9.js} +13 -12
- package/dist/core/{ChannelBlur-DhWT-55L.js → ChannelBlur-BEK1qzGn.js} +23 -22
- package/dist/core/{Checkerboard-CgWGd9t7.js → Checkerboard-BPkiSF5I.js} +16 -14
- package/dist/core/{ChromaFlow-DOVrymVB.js → ChromaFlow-AHO3C4o3.js} +18 -17
- package/dist/core/{ChromaticAberration-CyTSXY7j.js → ChromaticAberration-nVg3r1FK.js} +12 -11
- package/dist/core/{Circle-0WHV1HrM.js → Circle-C8ltF4BZ.js} +15 -13
- package/dist/core/{CursorTrail-3zQ5rtjh.js → CursorTrail-BeJGeovB.js} +17 -16
- package/dist/core/DiffuseBlur-BdGvOoBw.js +40 -0
- package/dist/core/{Dither-Cnbknfji.js → Dither-CpN3vGSh.js} +13 -12
- package/dist/core/DotGrid-BFUzeSQw.js +62 -0
- package/dist/core/{Duotone-BI4tJI3k.js → Duotone-_nR_o3-g.js} +8 -7
- package/dist/core/FilmGrain-BAKXXtLg.js +29 -0
- package/dist/core/FloatingParticles-Fv8JIzKk.js +161 -0
- package/dist/core/GlassTiles-5MyBj1ff.js +53 -0
- package/dist/core/{Glow-BD0t9E1L.js → Glow-DvJj7BB7.js} +12 -11
- package/dist/core/{Godrays-CPIAbymT.js → Godrays-cUzAKVXn.js} +24 -22
- package/dist/core/{Grayscale-BtOqK43k.js → Grayscale-oWIF3PV5.js} +3 -2
- package/dist/core/Grid-Bov7AA9m.js +51 -0
- package/dist/core/GridDistortion-CWYom5Dw.js +148 -0
- package/dist/core/Group-CPk-7fiA.js +18 -0
- package/dist/core/{Halftone-B_MuXCD8.js → Halftone-F7fsdu7W.js} +11 -10
- package/dist/core/{HueShift-CKG9M-d2.js → HueShift-CiS4hdtk.js} +3 -2
- package/dist/core/{ImageTexture-B6zFP2fB.js → ImageTexture-B3Q29OHX.js} +24 -22
- package/dist/core/Invert-Cyc4JHWc.js +21 -0
- package/dist/core/{LinearBlur-JFLMQBY4.js → LinearBlur-BTC54qzk.js} +12 -11
- package/dist/core/{LinearGradient-Ztg5Lzwj.js → LinearGradient-LEMeW0KM.js} +18 -16
- package/dist/core/Liquify-D2nzMDzq.js +140 -0
- package/dist/core/Pixelate-irPzmtQm.js +39 -0
- package/dist/core/{PolarCoordinates-qzU8gNXR.js → PolarCoordinates-Ck5ZWrQO.js} +21 -16
- package/dist/core/{Posterize-BkBU8tnN.js → Posterize-DICq_t96.js} +9 -8
- package/dist/core/{ProgressiveBlur-HAQf188T.js → ProgressiveBlur-BuORe3VH.js} +17 -16
- package/dist/core/{RadialGradient-DISqJuTZ.js → RadialGradient-D0cN67jm.js} +17 -15
- package/dist/core/RectangularCoordinates-1LIDaeHR.js +93 -0
- package/dist/core/{Ripples-CX8Qgnog.js → Ripples-DH71sFJc.js} +14 -12
- package/dist/core/{Saturation-DMxPYmIU.js → Saturation-DbSXtSeK.js} +10 -9
- package/dist/core/{SimplexNoise-B5ygfckG.js → SimplexNoise-DPGC2OPJ.js} +14 -12
- package/dist/core/{SineWave-KPFlP3Wk.js → SineWave-CkWtnzHF.js} +16 -14
- package/dist/core/{SolidColor-B8oxlGge.js → SolidColor-DaB-FHNX.js} +8 -6
- package/dist/core/{Spiral-CX22hUJ3.js → Spiral-CcyI8azF.js} +19 -17
- package/dist/core/Strands-Co4fkc05.js +126 -0
- package/dist/core/{Swirl-CIXreSgZ.js → Swirl-BoveqtNV.js} +18 -16
- package/dist/core/{TiltShift-J0UUcoh-.js → TiltShift-D53azmRe.js} +14 -13
- package/dist/core/{Tritone-E9eHvjJV.js → Tritone-Cg1rX-hL.js} +13 -12
- package/dist/core/{Twirl-ClhPpapm.js → Twirl-raO5pe5X.js} +20 -15
- package/dist/core/{Vibrance-CqnE9Zco.js → Vibrance-DtekSkcz.js} +8 -7
- package/dist/core/WaveDistortion-C65qO_cZ.js +133 -0
- package/dist/core/{ZoomBlur-CaGbSDG3.js → ZoomBlur-B97ZjhXe.js} +11 -10
- package/dist/core/{colorMixing-C_ESXyqX.js → colorMixing-DPZ-Td4U.js} +3 -3
- package/dist/core/edges-B-tVdqcI.js +16 -0
- package/dist/core/index.js +1333 -948
- package/dist/core/performanceTracker.d.ts +2 -0
- package/dist/core/performanceTracker.d.ts.map +1 -1
- package/dist/core/renderer.d.ts +12 -0
- package/dist/core/renderer.d.ts.map +1 -1
- package/dist/core/shaderRegistry.d.ts.map +1 -1
- package/dist/core/shaders/AngularBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/AngularBlur/index.js +3 -3
- package/dist/core/shaders/Ascii/index.d.ts.map +1 -1
- package/dist/core/shaders/Ascii/index.js +2 -2
- package/dist/core/shaders/Blob/index.d.ts.map +1 -1
- package/dist/core/shaders/Blob/index.js +5 -5
- package/dist/core/shaders/Blur/index.d.ts.map +1 -1
- package/dist/core/shaders/Blur/index.js +2 -2
- package/dist/core/shaders/Bulge/index.d.ts.map +1 -1
- package/dist/core/shaders/Bulge/index.js +4 -4
- package/dist/core/shaders/CRTScreen/index.d.ts.map +1 -1
- package/dist/core/shaders/CRTScreen/index.js +2 -2
- package/dist/core/shaders/ChannelBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ChannelBlur/index.js +2 -2
- package/dist/core/shaders/Checkerboard/index.d.ts.map +1 -1
- package/dist/core/shaders/Checkerboard/index.js +4 -4
- package/dist/core/shaders/ChromaFlow/index.d.ts.map +1 -1
- package/dist/core/shaders/ChromaFlow/index.js +3 -3
- package/dist/core/shaders/ChromaticAberration/index.d.ts.map +1 -1
- package/dist/core/shaders/ChromaticAberration/index.js +3 -3
- package/dist/core/shaders/Circle/index.d.ts.map +1 -1
- package/dist/core/shaders/Circle/index.js +3 -3
- package/dist/core/shaders/CursorTrail/index.d.ts.map +1 -1
- package/dist/core/shaders/CursorTrail/index.js +4 -4
- package/dist/core/shaders/DiffuseBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/DiffuseBlur/index.js +2 -2
- package/dist/core/shaders/Dither/index.d.ts.map +1 -1
- package/dist/core/shaders/Dither/index.js +3 -3
- package/dist/core/shaders/DotGrid/index.d.ts.map +1 -1
- package/dist/core/shaders/DotGrid/index.js +3 -3
- package/dist/core/shaders/Duotone/index.d.ts.map +1 -1
- package/dist/core/shaders/Duotone/index.js +4 -4
- package/dist/core/shaders/FilmGrain/index.d.ts.map +1 -1
- package/dist/core/shaders/FilmGrain/index.js +2 -2
- package/dist/core/shaders/FloatingParticles/index.d.ts.map +1 -1
- package/dist/core/shaders/FloatingParticles/index.js +3 -3
- package/dist/core/shaders/GlassTiles/index.d.ts.map +1 -1
- package/dist/core/shaders/GlassTiles/index.js +2 -2
- package/dist/core/shaders/Glow/index.d.ts.map +1 -1
- package/dist/core/shaders/Glow/index.js +2 -2
- package/dist/core/shaders/Godrays/index.d.ts.map +1 -1
- package/dist/core/shaders/Godrays/index.js +3 -3
- package/dist/core/shaders/Grayscale/index.d.ts.map +1 -1
- package/dist/core/shaders/Grayscale/index.js +2 -2
- package/dist/core/shaders/Grid/index.d.ts.map +1 -1
- package/dist/core/shaders/Grid/index.js +3 -3
- package/dist/core/shaders/GridDistortion/index.d.ts.map +1 -1
- package/dist/core/shaders/GridDistortion/index.js +4 -4
- package/dist/core/shaders/Group/index.d.ts.map +1 -1
- package/dist/core/shaders/Group/index.js +2 -2
- package/dist/core/shaders/Halftone/index.d.ts.map +1 -1
- package/dist/core/shaders/Halftone/index.js +3 -3
- package/dist/core/shaders/HueShift/index.d.ts.map +1 -1
- package/dist/core/shaders/HueShift/index.js +2 -2
- package/dist/core/shaders/ImageTexture/index.d.ts +1 -1
- package/dist/core/shaders/ImageTexture/index.d.ts.map +1 -1
- package/dist/core/shaders/ImageTexture/index.js +2 -2
- package/dist/core/shaders/Invert/index.d.ts.map +1 -1
- package/dist/core/shaders/Invert/index.js +2 -2
- package/dist/core/shaders/LinearBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/LinearBlur/index.js +3 -3
- package/dist/core/shaders/LinearGradient/index.d.ts.map +1 -1
- package/dist/core/shaders/LinearGradient/index.js +4 -4
- package/dist/core/shaders/Liquify/index.d.ts.map +1 -1
- package/dist/core/shaders/Liquify/index.js +4 -4
- package/dist/core/shaders/Pixelate/index.d.ts.map +1 -1
- package/dist/core/shaders/Pixelate/index.js +2 -2
- package/dist/core/shaders/PolarCoordinates/index.d.ts.map +1 -1
- package/dist/core/shaders/PolarCoordinates/index.js +4 -4
- package/dist/core/shaders/Posterize/index.d.ts.map +1 -1
- package/dist/core/shaders/Posterize/index.js +2 -2
- package/dist/core/shaders/ProgressiveBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.js +3 -3
- package/dist/core/shaders/RadialGradient/index.d.ts.map +1 -1
- package/dist/core/shaders/RadialGradient/index.js +4 -4
- package/dist/core/shaders/RectangularCoordinates/index.d.ts +38 -0
- package/dist/core/shaders/RectangularCoordinates/index.d.ts.map +1 -0
- package/dist/core/shaders/RectangularCoordinates/index.js +8 -0
- package/dist/core/shaders/Ripples/index.d.ts.map +1 -1
- package/dist/core/shaders/Ripples/index.js +4 -4
- package/dist/core/shaders/Saturation/index.d.ts.map +1 -1
- package/dist/core/shaders/Saturation/index.js +2 -2
- package/dist/core/shaders/SimplexNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/SimplexNoise/index.js +4 -4
- package/dist/core/shaders/SineWave/index.d.ts.map +1 -1
- package/dist/core/shaders/SineWave/index.js +3 -3
- package/dist/core/shaders/SolidColor/index.d.ts.map +1 -1
- package/dist/core/shaders/SolidColor/index.js +3 -3
- package/dist/core/shaders/Spiral/index.d.ts.map +1 -1
- package/dist/core/shaders/Spiral/index.js +4 -4
- package/dist/core/shaders/Strands/index.d.ts.map +1 -1
- package/dist/core/shaders/Strands/index.js +4 -4
- package/dist/core/shaders/Swirl/index.d.ts.map +1 -1
- package/dist/core/shaders/Swirl/index.js +5 -5
- package/dist/core/shaders/TiltShift/index.d.ts.map +1 -1
- package/dist/core/shaders/TiltShift/index.js +3 -3
- package/dist/core/shaders/Tritone/index.d.ts.map +1 -1
- package/dist/core/shaders/Tritone/index.js +4 -4
- package/dist/core/shaders/Twirl/index.d.ts.map +1 -1
- package/dist/core/shaders/Twirl/index.js +4 -4
- package/dist/core/shaders/Vibrance/index.d.ts.map +1 -1
- package/dist/core/shaders/Vibrance/index.js +2 -2
- package/dist/core/shaders/WaveDistortion/index.d.ts.map +1 -1
- package/dist/core/shaders/WaveDistortion/index.js +6 -7
- package/dist/core/shaders/ZoomBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ZoomBlur/index.js +3 -3
- package/dist/core/telemetry/collector.d.ts.map +1 -1
- package/dist/core/telemetry/index.js +19 -19
- package/dist/core/{three.tsl-CgyjOhns.js → three.tsl-BqgDcRt9.js} +21 -20
- package/dist/core/{time-myrFQH-u.js → time-5uQ65blS.js} +1 -1
- package/dist/core/{transformations-Bs66Qh16.js → transformations-DBjTkQ5b.js} +1 -1
- package/dist/core/types.d.ts +85 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/utilities/edges.d.ts +13 -2
- package/dist/core/utilities/edges.d.ts.map +1 -1
- package/dist/core/utilities/uvTransform.d.ts +20 -0
- package/dist/core/utilities/uvTransform.d.ts.map +1 -1
- package/dist/react/components/RectangularCoordinates.d.ts +31 -0
- package/dist/react/components/RectangularCoordinates.d.ts.map +1 -0
- package/dist/react/index.cjs +233 -233
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +16218 -15498
- package/dist/react/utils/generatePresetCode.cjs +2 -2
- package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/react/utils/generatePresetCode.js +13 -1
- package/dist/registry.d.ts +3 -0
- package/dist/registry.js +376 -87
- package/dist/svelte/components/RectangularCoordinates.svelte.d.ts +19 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +15766 -15088
- package/dist/svelte/utils/generatePresetCode.js +13 -1
- package/dist/vue/components/RectangularCoordinates.vue.d.ts +57 -0
- package/dist/vue/components/RectangularCoordinates.vue.d.ts.map +1 -0
- package/dist/vue/{generatePresetCode-B6Ks_W3s.js → generatePresetCode-D4V6rBae.js} +13 -1
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +15240 -14552
- package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/vue/utils/generatePresetCode.js +1 -1
- package/package.json +6 -1
- package/dist/core/Blob-CBASKMfO.js +0 -168
- package/dist/core/Bulge-Ceythf-i.js +0 -99
- package/dist/core/DiffuseBlur-DLIKRsnf.js +0 -39
- package/dist/core/DotGrid-BkItF2C8.js +0 -60
- package/dist/core/FilmGrain-BAZORehh.js +0 -27
- package/dist/core/FloatingParticles-7wvOBUbD.js +0 -158
- package/dist/core/GlassTiles-C0y_PWTa.js +0 -48
- package/dist/core/Grid-Ro0Yi5WY.js +0 -49
- package/dist/core/GridDistortion-CuxRQdzs.js +0 -137
- package/dist/core/Group-DTXP-whY.js +0 -17
- package/dist/core/Invert-Cd7GK1vs.js +0 -20
- package/dist/core/Liquify-rmJGJAdt.js +0 -126
- package/dist/core/Pixelate-BIANS3t9.js +0 -34
- package/dist/core/Strands-Bv7RvyRC.js +0 -124
- package/dist/core/WaveDistortion-gecgVpvO.js +0 -129
- package/dist/core/edges-Cj8yVYgz.js +0 -10
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { O as N, m as Q } from "./three.tsl-CgyjOhns.js";
|
|
2
|
-
import { t as $ } from "./edges-Cj8yVYgz.js";
|
|
3
|
-
import { a as ee } from "./transformations-Bs66Qh16.js";
|
|
4
|
-
import { DataTexture as te, FloatType as ae, LinearFilter as q, RGFormat as ie } from "three";
|
|
5
|
-
Q();
|
|
6
|
-
const se = {
|
|
7
|
-
name: "GridDistortion",
|
|
8
|
-
category: "Interactive",
|
|
9
|
-
requiresRTT: !0,
|
|
10
|
-
requiresChild: !0,
|
|
11
|
-
props: {
|
|
12
|
-
intensity: {
|
|
13
|
-
default: 1,
|
|
14
|
-
description: "Strength of the distortion effect",
|
|
15
|
-
ui: {
|
|
16
|
-
type: "range",
|
|
17
|
-
min: 0,
|
|
18
|
-
max: 5,
|
|
19
|
-
step: 0.1,
|
|
20
|
-
label: "Intensity"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
swirl: {
|
|
24
|
-
default: 0,
|
|
25
|
-
description: "Amount of swirl motion",
|
|
26
|
-
ui: {
|
|
27
|
-
type: "range",
|
|
28
|
-
min: 0,
|
|
29
|
-
max: 2,
|
|
30
|
-
step: 0.1,
|
|
31
|
-
label: "Swirl"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
decay: {
|
|
35
|
-
default: 3,
|
|
36
|
-
description: "Rate of distortion decay (higher = faster)",
|
|
37
|
-
ui: {
|
|
38
|
-
type: "range",
|
|
39
|
-
min: 0,
|
|
40
|
-
max: 10,
|
|
41
|
-
step: 0.1,
|
|
42
|
-
label: "Decay"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
radius: {
|
|
46
|
-
default: 1,
|
|
47
|
-
description: "Radius of the distortion effect",
|
|
48
|
-
ui: {
|
|
49
|
-
type: "range",
|
|
50
|
-
min: 0,
|
|
51
|
-
max: 3,
|
|
52
|
-
step: 0.01,
|
|
53
|
-
label: "Radius"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
gridSize: {
|
|
57
|
-
default: 20,
|
|
58
|
-
description: "Resolution of the distortion grid (higher = more detailed)",
|
|
59
|
-
ui: {
|
|
60
|
-
type: "range",
|
|
61
|
-
min: 8,
|
|
62
|
-
max: 128,
|
|
63
|
-
step: 1,
|
|
64
|
-
label: "Grid Size"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
edges: {
|
|
68
|
-
default: "stretch",
|
|
69
|
-
description: "How to handle edges when distortion pushes content out of bounds",
|
|
70
|
-
transform: ee,
|
|
71
|
-
ui: {
|
|
72
|
-
type: "select",
|
|
73
|
-
options: [
|
|
74
|
-
{
|
|
75
|
-
label: "Stretch",
|
|
76
|
-
value: "stretch"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
label: "Transparent",
|
|
80
|
-
value: "transparent"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
label: "Mirror",
|
|
84
|
-
value: "mirror"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
label: "Wrap",
|
|
88
|
-
value: "wrap"
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
label: "Edges"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
fragmentNode: ({ uniforms: n, onBeforeRender: A, childNode: b, onCleanup: T }) => {
|
|
96
|
-
const { vec2: w, vec4: H, float: m, uniform: o, screenUV: D, texture: j, convertToTexture: C } = N;
|
|
97
|
-
if (!b) return H(0, 0, 0, 0);
|
|
98
|
-
const l = C(b);
|
|
99
|
-
T(() => {
|
|
100
|
-
l?.renderTarget?.dispose && l.renderTarget.dispose();
|
|
101
|
-
});
|
|
102
|
-
const i = Math.max(8, Math.min(128, Math.floor(n.gridSize.uniform.value))), e = new Float32Array(i * i * 2), r = new te(e, i, i, ie, ae);
|
|
103
|
-
r.magFilter = q, r.minFilter = q, r.needsUpdate = !0;
|
|
104
|
-
const L = j(r), O = o(0.5), P = o(0.5), p = o(0), f = o(0);
|
|
105
|
-
let S = 0.5, F = 0.5, R = Date.now();
|
|
106
|
-
A(({ pointer: s }) => {
|
|
107
|
-
const G = Date.now(), t = Math.min((G - R) / 1e3, 0.016);
|
|
108
|
-
R = G;
|
|
109
|
-
const I = t > 0 ? (s.x - S) / t : 0, V = t > 0 ? (s.y - F) / t : 0;
|
|
110
|
-
p.value = p.value * 0.85 + I * 0.15, f.value = f.value * 0.85 + V * 0.15, O.value = s.x, P.value = s.y;
|
|
111
|
-
const X = n.decay.uniform.value, Y = n.intensity.uniform.value, g = n.radius.uniform.value * 0.05, v = n.swirl.uniform.value;
|
|
112
|
-
for (let c = 0; c < i; c++) for (let d = 0; d < i; d++) {
|
|
113
|
-
const a = (c * i + d) * 2;
|
|
114
|
-
e[a] *= 1 - X * t, e[a + 1] *= 1 - X * t;
|
|
115
|
-
const J = (d + 0.5) / i, K = (c + 0.5) / i, x = J - s.x, y = K - s.y, M = Math.sqrt(x * x + y * y);
|
|
116
|
-
if (M < g * 2 && Math.abs(I) + Math.abs(V) > 0.01) {
|
|
117
|
-
const u = Math.exp(-M * M / (g * g));
|
|
118
|
-
if (e[a] += p.value * u * Y * t * 0.5, e[a + 1] += f.value * u * Y * t * 0.5, v > 0) {
|
|
119
|
-
const E = Math.atan2(y, x) + Math.PI * 0.5;
|
|
120
|
-
e[a] += Math.cos(E) * v * u * t * 2, e[a + 1] += Math.sin(E) * v * u * t * 2;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
e[a] = Math.max(-1, Math.min(1, e[a])), e[a + 1] = Math.max(-1, Math.min(1, e[a + 1]));
|
|
124
|
-
}
|
|
125
|
-
r.needsUpdate = !0, S = s.x, F = s.y;
|
|
126
|
-
}), T(() => {
|
|
127
|
-
r.dispose();
|
|
128
|
-
});
|
|
129
|
-
const W = n.gridSize.uniform, h = m(1).div(W), Z = D.div(h).floor().mul(h).add(h.mul(0.5)), k = L.sample(Z).xy, U = m(0.1), _ = m(-0.1), B = k.clamp(w(_, _), w(U, U)), z = D.sub(B);
|
|
130
|
-
return $(z, l.sample(z), l, n.edges.uniform);
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
var ce = se;
|
|
134
|
-
export {
|
|
135
|
-
se as n,
|
|
136
|
-
ce as t
|
|
137
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { O as r, m as o } from "./three.tsl-CgyjOhns.js";
|
|
2
|
-
o();
|
|
3
|
-
const n = {
|
|
4
|
-
name: "Group",
|
|
5
|
-
category: "Layout",
|
|
6
|
-
requiresChild: !0,
|
|
7
|
-
props: {},
|
|
8
|
-
fragmentNode: ({ childNode: t }) => {
|
|
9
|
-
const { vec4: e } = r;
|
|
10
|
-
return t || e(0);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
var a = n;
|
|
14
|
-
export {
|
|
15
|
-
n,
|
|
16
|
-
a as t
|
|
17
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { O as a, m as c } from "./three.tsl-CgyjOhns.js";
|
|
2
|
-
c();
|
|
3
|
-
const i = {
|
|
4
|
-
name: "Invert",
|
|
5
|
-
category: "Color Adjustments",
|
|
6
|
-
requiresChild: !0,
|
|
7
|
-
props: {},
|
|
8
|
-
fragmentNode: ({ childNode: r }) => {
|
|
9
|
-
const { vec4: t, vec3: o } = a;
|
|
10
|
-
if (!r)
|
|
11
|
-
return console.error("You must pass a child component into the Invert shader."), t(0);
|
|
12
|
-
const n = r || t(0, 0, 0, 0), e = n.a, s = e.greaterThan(0).select(n.rgb.div(e), o(0, 0, 0));
|
|
13
|
-
return t(o(1, 1, 1).sub(s).mul(e), e);
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
var l = i;
|
|
17
|
-
export {
|
|
18
|
-
i as n,
|
|
19
|
-
l as t
|
|
20
|
-
};
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { O as C, m as J } from "./three.tsl-CgyjOhns.js";
|
|
2
|
-
import { t as K } from "./edges-Cj8yVYgz.js";
|
|
3
|
-
import { a as N } from "./transformations-Bs66Qh16.js";
|
|
4
|
-
import { DataTexture as Q, FloatType as $, LinearFilter as L, RGFormat as ee } from "three";
|
|
5
|
-
J();
|
|
6
|
-
const te = {
|
|
7
|
-
name: "Liquify",
|
|
8
|
-
category: "Interactive",
|
|
9
|
-
requiresRTT: !0,
|
|
10
|
-
requiresChild: !0,
|
|
11
|
-
props: {
|
|
12
|
-
intensity: {
|
|
13
|
-
default: 1,
|
|
14
|
-
description: "Strength of the distortion effect",
|
|
15
|
-
ui: {
|
|
16
|
-
type: "range",
|
|
17
|
-
min: 0,
|
|
18
|
-
max: 5,
|
|
19
|
-
step: 0.1,
|
|
20
|
-
label: "Intensity"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
swirl: {
|
|
24
|
-
default: 0,
|
|
25
|
-
description: "Amount of swirl motion (0-1)",
|
|
26
|
-
ui: {
|
|
27
|
-
type: "range",
|
|
28
|
-
min: 0,
|
|
29
|
-
max: 1,
|
|
30
|
-
step: 0.01,
|
|
31
|
-
label: "Swirl"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
decay: {
|
|
35
|
-
default: 3,
|
|
36
|
-
description: "Rate of distortion decay (higher = faster)",
|
|
37
|
-
ui: {
|
|
38
|
-
type: "range",
|
|
39
|
-
min: 0,
|
|
40
|
-
max: 10,
|
|
41
|
-
step: 0.1,
|
|
42
|
-
label: "Decay"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
radius: {
|
|
46
|
-
default: 1,
|
|
47
|
-
description: "Radius of the distortion effect",
|
|
48
|
-
ui: {
|
|
49
|
-
type: "range",
|
|
50
|
-
min: 0,
|
|
51
|
-
max: 3,
|
|
52
|
-
step: 0.01,
|
|
53
|
-
label: "Radius"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
edges: {
|
|
57
|
-
default: "stretch",
|
|
58
|
-
description: "How to handle edges when distortion pushes content out of bounds",
|
|
59
|
-
transform: N,
|
|
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
|
-
fragmentNode: ({ uniforms: i, onBeforeRender: A, childNode: g, onCleanup: M }) => {
|
|
85
|
-
const { vec2: b, vec4: G, float: T, uniform: o, screenUV: w, texture: H, convertToTexture: j } = C;
|
|
86
|
-
if (!g) return G(0, 0, 0, 0);
|
|
87
|
-
const l = j(g);
|
|
88
|
-
M(() => {
|
|
89
|
-
l?.renderTarget?.dispose && l.renderTarget.dispose();
|
|
90
|
-
});
|
|
91
|
-
const s = 32, e = new Float32Array(s * s * 2), r = new Q(e, s, s, ee, $);
|
|
92
|
-
r.magFilter = L, r.minFilter = L, r.needsUpdate = !0;
|
|
93
|
-
const O = H(r), P = o(0.5), W = o(0.5), m = o(0), p = o(0);
|
|
94
|
-
let D = 0.5, F = 0.5, R = Date.now();
|
|
95
|
-
A(({ pointer: n }) => {
|
|
96
|
-
const X = Date.now(), t = Math.min((X - R) / 1e3, 0.016);
|
|
97
|
-
R = X;
|
|
98
|
-
const Y = t > 0 ? (n.x - D) / t : 0, E = t > 0 ? (n.y - F) / t : 0;
|
|
99
|
-
m.value = m.value * 0.85 + Y * 0.15, p.value = p.value * 0.85 + E * 0.15, P.value = n.x, W.value = n.y;
|
|
100
|
-
const S = i.decay.uniform.value, U = i.intensity.uniform.value, f = i.radius.uniform.value * 0.05, h = i.swirl.uniform.value;
|
|
101
|
-
for (let c = 0; c < s; c++) for (let u = 0; u < s; u++) {
|
|
102
|
-
const a = (c * s + u) * 2;
|
|
103
|
-
e[a] *= 1 - S * t, e[a + 1] *= 1 - S * t;
|
|
104
|
-
const z = (u + 0.5) / s, B = (c + 0.5) / s, y = z - n.x, v = B - n.y, x = Math.sqrt(y * y + v * v);
|
|
105
|
-
if (x < f * 2 && Math.abs(Y) + Math.abs(E) > 0.01) {
|
|
106
|
-
const d = Math.exp(-x * x / (f * f));
|
|
107
|
-
if (e[a] += m.value * d * U * t * 0.5, e[a + 1] += p.value * d * U * t * 0.5, h > 0) {
|
|
108
|
-
const V = Math.atan2(v, y) + Math.PI * 0.5;
|
|
109
|
-
e[a] += Math.cos(V) * h * d * t * 2, e[a + 1] += Math.sin(V) * h * d * t * 2;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
e[a] = Math.max(-1, Math.min(1, e[a])), e[a + 1] = Math.max(-1, Math.min(1, e[a + 1]));
|
|
113
|
-
}
|
|
114
|
-
r.needsUpdate = !0, D = n.x, F = n.y;
|
|
115
|
-
}), M(() => {
|
|
116
|
-
r.dispose();
|
|
117
|
-
});
|
|
118
|
-
const Z = O.sample(w).xy, _ = T(0.2), q = T(-0.2), k = Z.clamp(b(q, q), b(_, _)), I = w.sub(k);
|
|
119
|
-
return K(I, l.sample(I), l, i.edges.uniform);
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
var ie = te;
|
|
123
|
-
export {
|
|
124
|
-
te as n,
|
|
125
|
-
ie as t
|
|
126
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { O as p, m as u } from "./three.tsl-CgyjOhns.js";
|
|
2
|
-
u();
|
|
3
|
-
const m = {
|
|
4
|
-
name: "Pixelate",
|
|
5
|
-
category: "Effects",
|
|
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
|
-
fragmentNode: ({ uniforms: i, childNode: r, onCleanup: s }) => {
|
|
20
|
-
const { vec4: a, floor: n, screenUV: o, convertToTexture: l } = p;
|
|
21
|
-
if (!r) return a(0, 0, 0, 0);
|
|
22
|
-
const e = l(r);
|
|
23
|
-
s(() => {
|
|
24
|
-
e?.renderTarget?.dispose && e.renderTarget.dispose();
|
|
25
|
-
});
|
|
26
|
-
const t = i.scale.uniform, c = n(o.mul(t)).div(t);
|
|
27
|
-
return e.sample(c);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
var x = m;
|
|
31
|
-
export {
|
|
32
|
-
m as n,
|
|
33
|
-
x as t
|
|
34
|
-
};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { O as $, m as ee } from "./three.tsl-CgyjOhns.js";
|
|
2
|
-
import { t as te } from "./time-myrFQH-u.js";
|
|
3
|
-
import { o as z, r as ne } from "./transformations-Bs66Qh16.js";
|
|
4
|
-
ee();
|
|
5
|
-
const oe = {
|
|
6
|
-
name: "Strands",
|
|
7
|
-
category: "Generative",
|
|
8
|
-
requiresRTT: !1,
|
|
9
|
-
requiresChild: !1,
|
|
10
|
-
props: {
|
|
11
|
-
speed: {
|
|
12
|
-
default: 0.5,
|
|
13
|
-
description: "Overall animation speed",
|
|
14
|
-
ui: {
|
|
15
|
-
type: "range",
|
|
16
|
-
min: 0,
|
|
17
|
-
max: 1,
|
|
18
|
-
step: 0.01,
|
|
19
|
-
label: "Speed"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
amplitude: {
|
|
23
|
-
default: 1,
|
|
24
|
-
description: "Wave height amplitude",
|
|
25
|
-
ui: {
|
|
26
|
-
type: "range",
|
|
27
|
-
min: 0,
|
|
28
|
-
max: 5,
|
|
29
|
-
step: 0.1,
|
|
30
|
-
label: "Amplitude"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
frequency: {
|
|
34
|
-
default: 1,
|
|
35
|
-
description: "Wave frequency",
|
|
36
|
-
ui: {
|
|
37
|
-
type: "range",
|
|
38
|
-
min: 0,
|
|
39
|
-
max: 5,
|
|
40
|
-
step: 0.01,
|
|
41
|
-
label: "Frequency"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
lineCount: {
|
|
45
|
-
default: 12,
|
|
46
|
-
description: "Number of wave lines",
|
|
47
|
-
ui: {
|
|
48
|
-
type: "range",
|
|
49
|
-
min: 4,
|
|
50
|
-
max: 32,
|
|
51
|
-
step: 1,
|
|
52
|
-
label: "Line Count"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
lineWidth: {
|
|
56
|
-
default: 0.1,
|
|
57
|
-
description: "Width of wave lines",
|
|
58
|
-
ui: {
|
|
59
|
-
type: "range",
|
|
60
|
-
min: 0.01,
|
|
61
|
-
max: 0.5,
|
|
62
|
-
step: 0.01,
|
|
63
|
-
label: "Line Width"
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
waveColor: {
|
|
67
|
-
default: "#f1c907",
|
|
68
|
-
transform: ne,
|
|
69
|
-
description: "Color of the waves",
|
|
70
|
-
ui: {
|
|
71
|
-
type: "color",
|
|
72
|
-
label: "Wave Color"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
pinEdges: {
|
|
76
|
-
default: !0,
|
|
77
|
-
description: "Pin waves at edges (fade effect)",
|
|
78
|
-
ui: {
|
|
79
|
-
type: "checkbox",
|
|
80
|
-
label: "Pin Edges"
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
start: {
|
|
84
|
-
default: {
|
|
85
|
-
x: 0,
|
|
86
|
-
y: 0.5
|
|
87
|
-
},
|
|
88
|
-
transform: z,
|
|
89
|
-
description: "Starting point of the waves",
|
|
90
|
-
ui: {
|
|
91
|
-
type: "position",
|
|
92
|
-
label: "Start"
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
end: {
|
|
96
|
-
default: {
|
|
97
|
-
x: 1,
|
|
98
|
-
y: 0.5
|
|
99
|
-
},
|
|
100
|
-
transform: z,
|
|
101
|
-
description: "Ending point of the waves",
|
|
102
|
-
ui: {
|
|
103
|
-
type: "position",
|
|
104
|
-
label: "End"
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
fragmentNode: (v) => {
|
|
109
|
-
const { uniforms: e } = v, { vec2: s, vec4: a, cos: o, abs: L, smoothstep: d, mix: g, max: M, screenCoordinate: A, viewportSize: l, float: t, Fn: x } = $, y = te(v, e.speed), u = x(([n]) => o(n).add(o(n.mul(1.2).add(1.6))).add(o(n.mul(1.4).add(1.5))).div(3));
|
|
110
|
-
return x(([n]) => {
|
|
111
|
-
const m = l.x.div(l.y), h = s(e.start.uniform.x.mul(m), e.start.uniform.y.oneMinus()), D = s(e.end.uniform.x.mul(m), e.end.uniform.y.oneMinus()), I = s(n.x.mul(m), n.y), b = D.sub(h), C = b.length(), c = b.div(C), N = s(c.y.negate(), c.x), w = I.sub(h), i = w.dot(c).div(C), O = w.dot(N), S = i.mul(10), R = O.mul(10), V = e.pinEdges.uniform.select(d(t(0), t(0.1), i).mul(d(t(1), t(0.9), i)), t(1)), f = e.pinEdges.uniform.select(o(i.mul(6.28)).mul(0.5).add(0.5).oneMinus(), t(1)), k = o(i.mul(6.28)).mul(0.5).add(0.5).oneMinus(), p = a(0, 0, 0, 0).toVar(), P = e.lineCount.uniform;
|
|
112
|
-
for (let r = 0; r < 32; r++) {
|
|
113
|
-
const G = t(r).lessThan(P), W = t(r), U = W.div(P), j = t(0.5), B = t(1.33), q = y.mul(B), E = W.add(S.mul(j)), F = u(E.add(q)).mul(0.5).add(0.5), T = g(t(0.01), e.lineWidth.uniform, F.mul(f)).mul(0.5), H = t(0.6), J = t(2), K = u(E.add(q.mul(U.add(1)))).mul(g(H, J, f)).mul(e.amplitude.uniform), Q = u(S.mul(e.frequency.uniform).add(y)).mul(f).mul(e.amplitude.uniform).add(K), X = L(R.sub(Q)), _ = t(0.01), Y = d(T.add(_), T.sub(_), X), Z = a(e.waveColor.uniform.r, e.waveColor.uniform.g, e.waveColor.uniform.b, Y).mul(F);
|
|
114
|
-
p.assign(M(p, G.select(Z, a(0, 0, 0, 0))));
|
|
115
|
-
}
|
|
116
|
-
return p.mul(a(1, 1, 1, k.mul(V)));
|
|
117
|
-
})(A.div(l));
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
var re = oe;
|
|
121
|
-
export {
|
|
122
|
-
oe as n,
|
|
123
|
-
re as t
|
|
124
|
-
};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { O as z, m as F } from "./three.tsl-CgyjOhns.js";
|
|
2
|
-
import { t as I } from "./edges-Cj8yVYgz.js";
|
|
3
|
-
import { t as M } from "./time-myrFQH-u.js";
|
|
4
|
-
import { a as O } from "./transformations-Bs66Qh16.js";
|
|
5
|
-
F();
|
|
6
|
-
const X = {
|
|
7
|
-
name: "WaveDistortion",
|
|
8
|
-
category: "Distortions",
|
|
9
|
-
requiresRTT: !0,
|
|
10
|
-
requiresChild: !0,
|
|
11
|
-
props: {
|
|
12
|
-
strength: {
|
|
13
|
-
default: 0.3,
|
|
14
|
-
description: "Distortion intensity",
|
|
15
|
-
ui: {
|
|
16
|
-
type: "range",
|
|
17
|
-
min: 0,
|
|
18
|
-
max: 1,
|
|
19
|
-
step: 0.01,
|
|
20
|
-
label: "Strength"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
frequency: {
|
|
24
|
-
default: 1,
|
|
25
|
-
description: "Number of bends/waves",
|
|
26
|
-
ui: {
|
|
27
|
-
type: "range",
|
|
28
|
-
min: 0.1,
|
|
29
|
-
max: 10,
|
|
30
|
-
step: 0.1,
|
|
31
|
-
label: "Frequency"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
speed: {
|
|
35
|
-
default: 1,
|
|
36
|
-
description: "Animation speed",
|
|
37
|
-
ui: {
|
|
38
|
-
type: "range",
|
|
39
|
-
min: 0,
|
|
40
|
-
max: 5,
|
|
41
|
-
step: 0.1,
|
|
42
|
-
label: "Speed"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
angle: {
|
|
46
|
-
default: 0,
|
|
47
|
-
description: "Direction of wave distortion in degrees",
|
|
48
|
-
ui: {
|
|
49
|
-
type: "range",
|
|
50
|
-
min: 0,
|
|
51
|
-
max: 360,
|
|
52
|
-
step: 1,
|
|
53
|
-
label: "Angle"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
waveType: {
|
|
57
|
-
default: "sine",
|
|
58
|
-
description: "Shape of the distortion wave",
|
|
59
|
-
transform: (a) => ({
|
|
60
|
-
sine: 0,
|
|
61
|
-
triangle: 1,
|
|
62
|
-
square: 2,
|
|
63
|
-
sawtooth: 3
|
|
64
|
-
})[a] ?? 0,
|
|
65
|
-
ui: {
|
|
66
|
-
type: "select",
|
|
67
|
-
options: [
|
|
68
|
-
{
|
|
69
|
-
label: "Sine",
|
|
70
|
-
value: "sine"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
label: "Triangle",
|
|
74
|
-
value: "triangle"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
label: "Square",
|
|
78
|
-
value: "square"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
label: "Sawtooth",
|
|
82
|
-
value: "sawtooth"
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
label: "Wave Type"
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
edges: {
|
|
89
|
-
default: "stretch",
|
|
90
|
-
description: "How to handle edges when distortion pushes content out of bounds",
|
|
91
|
-
transform: O,
|
|
92
|
-
ui: {
|
|
93
|
-
type: "select",
|
|
94
|
-
options: [
|
|
95
|
-
{
|
|
96
|
-
label: "Stretch",
|
|
97
|
-
value: "stretch"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
label: "Transparent",
|
|
101
|
-
value: "transparent"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
label: "Mirror",
|
|
105
|
-
value: "mirror"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
label: "Wrap",
|
|
109
|
-
value: "wrap"
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
label: "Edges"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
fragmentNode: (a) => {
|
|
117
|
-
const { uniforms: n, childNode: p, onCleanup: y } = a, { vec2: o, vec4: T, sin: f, cos: w, abs: x, fract: q, step: e, convertToTexture: S, screenUV: W, float: t, PI: l } = z;
|
|
118
|
-
if (!p) return T(0, 0, 0, 0);
|
|
119
|
-
const u = W, D = M(a, n.speed).mul(0.5), g = n.angle.uniform.mul(l).div(180), d = w(g), m = f(g), r = u.sub(o(0.5, 0.5)), v = o(r.x.mul(d).sub(r.y.mul(m)), r.x.mul(m).add(r.y.mul(d))).add(o(0.5, 0.5)).y.mul(n.frequency.uniform).mul(l.mul(2)).add(D), c = q(v.div(l.mul(2))), A = f(v), _ = x(c.mul(2).sub(1)).mul(2).sub(1), V = e(t(0.5), c).mul(2).sub(1), C = c.mul(2).sub(1), s = n.waveType.uniform, E = e(s, t(0.5)), N = e(t(0.5), s).mul(e(s, t(1.5))), U = e(t(1.5), s).mul(e(s, t(2.5))), H = e(t(2.5), s), b = A.mul(E).add(_.mul(N)).add(V.mul(U)).add(C.mul(H)).mul(n.strength.uniform).mul(0.5), P = b.mul(d), R = b.mul(m), h = o(u.x.add(P), u.y.add(R)), i = S(p);
|
|
120
|
-
return y(() => {
|
|
121
|
-
i?.renderTarget?.dispose && i.renderTarget.dispose();
|
|
122
|
-
}), I(h, i.sample(h), i, n.edges.uniform);
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
var G = X;
|
|
126
|
-
export {
|
|
127
|
-
X as n,
|
|
128
|
-
G as t
|
|
129
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { O as f, m as g } from "./three.tsl-CgyjOhns.js";
|
|
2
|
-
g();
|
|
3
|
-
var { vec2: p, vec4: h, step: s, abs: u, mod: x, fract: y, float: n, select: o } = f;
|
|
4
|
-
const C = (r, a, m, c) => {
|
|
5
|
-
const b = s(n(0), r.x).mul(s(r.x, n(1))), _ = s(n(0), r.y).mul(s(r.y, n(1))), v = b.mul(_), B = h(a.rgb, a.a.mul(v)), t = x(u(r.x), n(2)), l = x(u(r.y), n(2)), w = p(o(s(n(1), t), n(2).sub(t), t), o(s(n(1), l), n(2).sub(l), l)), X = m.sample(w), Y = p(y(r.x), y(r.y)), e = m.sample(Y);
|
|
6
|
-
return o(s(n(0.5), c), o(s(n(1.5), c), o(s(n(2.5), c), e, X), B), a);
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
C as t
|
|
10
|
-
};
|