shaders 2.3.52 → 2.3.54
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/{Blob-BgN4aVOR.js → Blob-CunyZ0A6.js} +4 -7
- package/dist/core/CursorRipples-Dn_rE8nA.js +177 -0
- package/dist/core/{VideoTexture-CH9n_1hI.js → VideoTexture-DfsNWCXk.js} +32 -17
- package/dist/core/{WebcamTexture-wlrwZXeq.js → WebcamTexture-Cxppkhiu.js} +35 -18
- package/dist/core/browser-Dcr7w1AA.js +6 -0
- package/dist/core/registry.js +118 -115
- package/dist/core/shaderRegistry.d.ts.map +1 -1
- package/dist/core/shaders/Blob/index.d.ts.map +1 -1
- package/dist/core/shaders/Blob/index.js +1 -1
- package/dist/core/shaders/CursorRipples/index.d.ts +42 -0
- package/dist/core/shaders/CursorRipples/index.d.ts.map +1 -0
- package/dist/core/shaders/CursorRipples/index.js +4 -0
- package/dist/core/shaders/CursorTrail/index.js +1 -1
- package/dist/core/shaders/DiffuseBlur/index.js +1 -1
- package/dist/core/shaders/Dither/index.js +1 -1
- package/dist/core/shaders/DotGrid/index.js +1 -1
- package/dist/core/shaders/Duotone/index.js +1 -1
- package/dist/core/shaders/FilmGrain/index.js +1 -1
- package/dist/core/shaders/FloatingParticles/index.js +1 -1
- package/dist/core/shaders/FlowField/index.js +1 -1
- package/dist/core/shaders/GlassTiles/index.js +1 -1
- package/dist/core/shaders/Glitch/index.js +1 -1
- package/dist/core/shaders/Glow/index.js +1 -1
- package/dist/core/shaders/Godrays/index.js +1 -1
- package/dist/core/shaders/Grayscale/index.js +1 -1
- package/dist/core/shaders/Grid/index.js +1 -1
- package/dist/core/shaders/GridDistortion/index.js +1 -1
- package/dist/core/shaders/Group/index.js +1 -1
- package/dist/core/shaders/Halftone/index.js +1 -1
- package/dist/core/shaders/HueShift/index.js +1 -1
- package/dist/core/shaders/ImageTexture/index.js +1 -1
- package/dist/core/shaders/Invert/index.js +1 -1
- package/dist/core/shaders/Kaleidoscope/index.js +1 -1
- package/dist/core/shaders/LensFlare/index.js +1 -1
- package/dist/core/shaders/LinearBlur/index.js +1 -1
- package/dist/core/shaders/LinearGradient/index.js +1 -1
- package/dist/core/shaders/Liquify/index.js +1 -1
- package/dist/core/shaders/Mirror/index.js +1 -1
- package/dist/core/shaders/Perspective/index.js +1 -1
- package/dist/core/shaders/Pixelate/index.js +1 -1
- package/dist/core/shaders/Plasma/index.js +1 -1
- package/dist/core/shaders/PolarCoordinates/index.js +1 -1
- package/dist/core/shaders/Posterize/index.js +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.js +1 -1
- package/dist/core/shaders/RadialGradient/index.js +1 -1
- package/dist/core/shaders/RectangularCoordinates/index.js +1 -1
- package/dist/core/shaders/Ripples/index.js +1 -1
- package/dist/core/shaders/Saturation/index.js +1 -1
- package/dist/core/shaders/Sharpness/index.js +1 -1
- package/dist/core/shaders/Shatter/index.js +1 -1
- package/dist/core/shaders/SimplexNoise/index.js +1 -1
- package/dist/core/shaders/SineWave/index.js +1 -1
- package/dist/core/shaders/SolidColor/index.js +1 -1
- package/dist/core/shaders/Spherize/index.js +1 -1
- 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/Stripes/index.js +1 -1
- package/dist/core/shaders/StudioBackground/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/Tint/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/VideoTexture/index.d.ts.map +1 -1
- package/dist/core/shaders/VideoTexture/index.js +2 -1
- package/dist/core/shaders/WaveDistortion/index.js +1 -1
- package/dist/core/shaders/WebcamTexture/index.d.ts.map +1 -1
- package/dist/core/shaders/WebcamTexture/index.js +2 -1
- package/dist/core/shaders/ZoomBlur/index.js +1 -1
- package/dist/core/utilities/browser.d.ts +2 -0
- package/dist/core/utilities/browser.d.ts.map +1 -0
- package/dist/react/CursorRipples.js +164 -0
- package/dist/react/components/CursorRipples.d.ts +31 -0
- package/dist/react/components/CursorRipples.d.ts.map +1 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +2 -1
- package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/react/utils/generatePresetCode.js +10 -0
- package/dist/registry.js +168 -0
- package/dist/solid/components/CursorRipples.d.ts +28 -0
- package/dist/solid/components/CursorRipples.d.ts.map +1 -0
- package/dist/solid/components/CursorRipples.js +168 -0
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.js +118 -116
- package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/solid/utils/generatePresetCode.js +10 -0
- package/dist/svelte/components/CursorRipples.svelte.d.ts +19 -0
- package/dist/svelte/{generatePresetCode-DXODN9t6.js → generatePresetCode-DN-iUvZN.js} +10 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +392 -262
- package/dist/svelte/utils/generatePresetCode.js +1 -1
- package/dist/vue/CursorRipples.js +3 -0
- package/dist/vue/CursorRipples.vue_vue_type_script_setup_true_lang.js +148 -0
- package/dist/vue/components/CursorRipples.vue.d.ts +54 -0
- package/dist/vue/components/CursorRipples.vue.d.ts.map +1 -0
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +2 -1
- package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/vue/utils/generatePresetCode.js +10 -0
- package/package.json +10 -2
- /package/dist/core/{CursorTrail-DpegyvgZ.js → CursorTrail-DD4YxAqo.js} +0 -0
- /package/dist/core/{DiffuseBlur-BXcJHOEK.js → DiffuseBlur-GlibDd8O.js} +0 -0
- /package/dist/core/{Dither-BKUz66yF.js → Dither-BOWyA2dp.js} +0 -0
- /package/dist/core/{DotGrid-CQ3Bqk7F.js → DotGrid-Cm-wz6WU.js} +0 -0
- /package/dist/core/{Duotone-BW1JYEPc.js → Duotone-C8mRw_1e.js} +0 -0
- /package/dist/core/{FilmGrain-GEWzNIxN.js → FilmGrain-BzD2zoUK.js} +0 -0
- /package/dist/core/{FloatingParticles--9Vfk8l7.js → FloatingParticles-GkVY1twT.js} +0 -0
- /package/dist/core/{FlowField-cpaUwFHC.js → FlowField-S_LXjhaN.js} +0 -0
- /package/dist/core/{GlassTiles-BdeSNj7g.js → GlassTiles--hbefQlc.js} +0 -0
- /package/dist/core/{Glitch-CROTuIoh.js → Glitch-lbgQYebN.js} +0 -0
- /package/dist/core/{Glow-DQDMXgcr.js → Glow-DM9zbhbr.js} +0 -0
- /package/dist/core/{Godrays-ByIS3bRa.js → Godrays-DVo1ikUR.js} +0 -0
- /package/dist/core/{Grayscale-DpKuVrqO.js → Grayscale-CRYK8foe.js} +0 -0
- /package/dist/core/{Grid-CkcYMWZi.js → Grid-BmYSb6Ur.js} +0 -0
- /package/dist/core/{GridDistortion-CATS8be1.js → GridDistortion-PNU8pi2I.js} +0 -0
- /package/dist/core/{Group-DqEcpVau.js → Group-D-QMn-Co.js} +0 -0
- /package/dist/core/{Halftone-DPnEJWAR.js → Halftone-BlY2LuT8.js} +0 -0
- /package/dist/core/{HueShift-BuAL_IUD.js → HueShift-p4t6HfqE.js} +0 -0
- /package/dist/core/{ImageTexture-BxUmKJDM.js → ImageTexture-BAOtuVAy.js} +0 -0
- /package/dist/core/{Invert-CnrYMYHq.js → Invert-oYct5uwC.js} +0 -0
- /package/dist/core/{Kaleidoscope-w7bcRTGG.js → Kaleidoscope-BXKsOJl2.js} +0 -0
- /package/dist/core/{LensFlare-D42C5m1g.js → LensFlare-BWl8PWjv.js} +0 -0
- /package/dist/core/{LinearBlur-PB7AuAdN.js → LinearBlur-gV1sIMuQ.js} +0 -0
- /package/dist/core/{LinearGradient-xd6zdc9k.js → LinearGradient-C5kz9RSs.js} +0 -0
- /package/dist/core/{Liquify-BfUbY9Aa.js → Liquify-CtUvuV0S.js} +0 -0
- /package/dist/core/{Mirror-CBuDbabq.js → Mirror-C3Bn9m7T.js} +0 -0
- /package/dist/core/{Perspective-BWEoTtAq.js → Perspective-NsMXVWAS.js} +0 -0
- /package/dist/core/{Pixelate-C1kcXBSy.js → Pixelate-C-LbtIjf.js} +0 -0
- /package/dist/core/{Plasma-BaKvTyBi.js → Plasma-Dr516u2H.js} +0 -0
- /package/dist/core/{PolarCoordinates-tXYdB1hR.js → PolarCoordinates-HVxz9oX-.js} +0 -0
- /package/dist/core/{Posterize-D4f1xM4m.js → Posterize-DbPe3f5d.js} +0 -0
- /package/dist/core/{ProgressiveBlur-CmBI0c7e.js → ProgressiveBlur-Cf2pKf8U.js} +0 -0
- /package/dist/core/{RadialGradient-BOWu2cE6.js → RadialGradient-Bel2cjwV.js} +0 -0
- /package/dist/core/{RectangularCoordinates-C2KYwree.js → RectangularCoordinates-BfeH7Mp6.js} +0 -0
- /package/dist/core/{Ripples-C3rm4Nv6.js → Ripples-DBqbjqb_.js} +0 -0
- /package/dist/core/{Saturation-Bw3ToVIJ.js → Saturation-4L5KnzYg.js} +0 -0
- /package/dist/core/{Sharpness-Dm4dZVlk.js → Sharpness-C5h9h3NY.js} +0 -0
- /package/dist/core/{Shatter-C5oF85Mn.js → Shatter-BDTHZrbz.js} +0 -0
- /package/dist/core/{SimplexNoise-CzJ9JuBO.js → SimplexNoise-DU-QPbwp.js} +0 -0
- /package/dist/core/{SineWave-DMogWzg5.js → SineWave-CsoVJf9C.js} +0 -0
- /package/dist/core/{SolidColor-CmqDLEvX.js → SolidColor-BOK2t0JT.js} +0 -0
- /package/dist/core/{Spherize-BmA6-b8n.js → Spherize-BxUTtFAg.js} +0 -0
- /package/dist/core/{Spiral-DmYzx8BO.js → Spiral-DVURsiiQ.js} +0 -0
- /package/dist/core/{Strands-CmEblLfF.js → Strands-C2l4JaUt.js} +0 -0
- /package/dist/core/{Stretch-szy_xiYc.js → Stretch-uSJDtqi2.js} +0 -0
- /package/dist/core/{Stripes-Bze5bkdm.js → Stripes-IFl3of9w.js} +0 -0
- /package/dist/core/{StudioBackground-Ci26l_Xb.js → StudioBackground-DbBGv5fk.js} +0 -0
- /package/dist/core/{Swirl-BUKxPesY.js → Swirl-C16tmwEg.js} +0 -0
- /package/dist/core/{TiltShift-YxZeQ5Et.js → TiltShift-C5t3YMVT.js} +0 -0
- /package/dist/core/{Tint-Bss3hfZG.js → Tint-VTnDmiKF.js} +0 -0
- /package/dist/core/{Tritone-CVr6_qy3.js → Tritone-v6z_O967.js} +0 -0
- /package/dist/core/{Twirl-CKwGdb3_.js → Twirl-BWpsT8iI.js} +0 -0
- /package/dist/core/{Vibrance-BiW7HP94.js → Vibrance-C_DSuzwf.js} +0 -0
- /package/dist/core/{WaveDistortion-BYmLNaT1.js → WaveDistortion-xj8fjAf_.js} +0 -0
- /package/dist/core/{ZoomBlur-BtGAMd_0.js → ZoomBlur-BePhHTgF.js} +0 -0
|
@@ -186,7 +186,6 @@ const componentDefinition = {
|
|
|
186
186
|
const highlightColor = uniforms.highlightColor.uniform;
|
|
187
187
|
const edgeWidth = softness.mul(float(.3));
|
|
188
188
|
const edgeCurve = softness.mul(float(2)).add(float(.5));
|
|
189
|
-
const edgeComplexity = float(.5);
|
|
190
189
|
const aspect = viewportSize.x.div(viewportSize.y);
|
|
191
190
|
const aspectCorrectedUV = vec2(baseUV.x.mul(aspect), baseUV.y);
|
|
192
191
|
const centerPos = vec2(uniforms.center.uniform.x.mul(aspect), uniforms.center.uniform.y.oneMinus());
|
|
@@ -195,12 +194,10 @@ const componentDefinition = {
|
|
|
195
194
|
const baseRadius = size;
|
|
196
195
|
const noiseScale = float(4);
|
|
197
196
|
const noise1 = sin(uv$1.x.mul(noiseScale.mul(float(.8))).add(animTime.mul(float(.8)))).mul(sin(uv$1.y.mul(noiseScale.mul(float(.7))).add(animTime.mul(float(.6))))).add(sin(uv$1.x.mul(noiseScale.mul(float(1.2))).sub(uv$1.y.mul(noiseScale.mul(float(.9))).add(animTime.mul(float(.4)))))).mul(float(.15)).mul(deformation);
|
|
198
|
-
const noise2 = sin(uv$1.x.mul(noiseScale.mul(float(1.4))).sub(animTime.mul(float(.5)))).mul(sin(uv$1.y.mul(noiseScale.mul(float(1.1))).add(animTime.mul(float(.7))))).mul(float(.12)).mul(deformation)
|
|
199
|
-
const noise3 = sin(uv$1.x.mul(noiseScale.mul(float(1.8))).add(uv$1.y.mul(noiseScale.mul(float(1.6))).add(animTime.mul(float(.3))))).add(sin(uv$1.x.mul(noiseScale.mul(float(.6))).sub(animTime.mul(float(.9))))).mul(float(.1)).mul(deformation)
|
|
200
|
-
const noise4 = sin(uv$1.x.mul(noiseScale.mul(float(2.2))).add(animTime.mul(float(.2)))).mul(sin(uv$1.y.mul(noiseScale.mul(float(1.9))).sub(animTime.mul(float(.8))))).mul(float(.
|
|
201
|
-
const
|
|
202
|
-
const noise6 = sin(uv$1.x.mul(noiseScale.mul(float(3.2))).add(animTime.mul(float(1.1)))).add(sin(uv$1.y.mul(noiseScale.mul(float(3.5))).sub(animTime.mul(float(.4))))).mul(float(.04)).mul(deformation).mul(smoothstep(float(.75), float(.85), edgeComplexity));
|
|
203
|
-
const noiseAmount = noise1.add(noise2).add(noise3).add(noise4).add(noise5).add(noise6);
|
|
197
|
+
const noise2 = sin(uv$1.x.mul(noiseScale.mul(float(1.4))).sub(animTime.mul(float(.5)))).mul(sin(uv$1.y.mul(noiseScale.mul(float(1.1))).add(animTime.mul(float(.7))))).mul(float(.12)).mul(deformation);
|
|
198
|
+
const noise3 = sin(uv$1.x.mul(noiseScale.mul(float(1.8))).add(uv$1.y.mul(noiseScale.mul(float(1.6))).add(animTime.mul(float(.3))))).add(sin(uv$1.x.mul(noiseScale.mul(float(.6))).sub(animTime.mul(float(.9))))).mul(float(.1)).mul(deformation);
|
|
199
|
+
const noise4 = sin(uv$1.x.mul(noiseScale.mul(float(2.2))).add(animTime.mul(float(.2)))).mul(sin(uv$1.y.mul(noiseScale.mul(float(1.9))).sub(animTime.mul(float(.8))))).mul(float(.04)).mul(deformation);
|
|
200
|
+
const noiseAmount = noise1.add(noise2).add(noise3).add(noise4);
|
|
204
201
|
const organicRadius = baseRadius.add(noiseAmount);
|
|
205
202
|
const blobMask = pow(smoothstep(organicRadius.sub(edgeWidth), organicRadius.add(edgeWidth), dist).oneMinus(), edgeCurve);
|
|
206
203
|
const distFromCenter = length(uv$1);
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { t as applyEdgeHandling } from "./edges-Bd7GP4s2.js";
|
|
2
|
+
import { o as transformEdges } from "./transformations-CC_c-QAT.js";
|
|
3
|
+
import { DataTexture, FloatType, LinearFilter, RGFormat } from "three";
|
|
4
|
+
import { convertToTexture, float, screenUV, texture, vec2, vec4 } from "three/tsl";
|
|
5
|
+
var GRID_SIZE = 128;
|
|
6
|
+
const componentDefinition = {
|
|
7
|
+
name: "CursorRipples",
|
|
8
|
+
category: "Interactive",
|
|
9
|
+
description: "Fluid-like ripple distortion",
|
|
10
|
+
requiresRTT: true,
|
|
11
|
+
requiresChild: true,
|
|
12
|
+
props: {
|
|
13
|
+
intensity: {
|
|
14
|
+
default: 10,
|
|
15
|
+
description: "Strength of the ripple distortion",
|
|
16
|
+
ui: {
|
|
17
|
+
type: "range",
|
|
18
|
+
min: 0,
|
|
19
|
+
max: 20,
|
|
20
|
+
step: .1,
|
|
21
|
+
label: "Intensity",
|
|
22
|
+
group: "Effect"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
decay: {
|
|
26
|
+
default: 10,
|
|
27
|
+
description: "How quickly ripples fade (higher = faster)",
|
|
28
|
+
ui: {
|
|
29
|
+
type: "range",
|
|
30
|
+
min: 0,
|
|
31
|
+
max: 20,
|
|
32
|
+
step: .1,
|
|
33
|
+
label: "Decay",
|
|
34
|
+
group: "Effect"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
radius: {
|
|
38
|
+
default: .5,
|
|
39
|
+
description: "Radius of cursor influence",
|
|
40
|
+
ui: {
|
|
41
|
+
type: "range",
|
|
42
|
+
min: .1,
|
|
43
|
+
max: 1,
|
|
44
|
+
step: .1,
|
|
45
|
+
label: "Radius",
|
|
46
|
+
group: "Effect"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
chromaticSplit: {
|
|
50
|
+
default: 1,
|
|
51
|
+
description: "RGB channel separation along ripple edges",
|
|
52
|
+
ui: {
|
|
53
|
+
type: "range",
|
|
54
|
+
min: 0,
|
|
55
|
+
max: 3,
|
|
56
|
+
step: .1,
|
|
57
|
+
label: "Chromatic Split",
|
|
58
|
+
group: "Effect"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
edges: {
|
|
62
|
+
default: "stretch",
|
|
63
|
+
description: "How to handle edges when distortion pushes content out of bounds",
|
|
64
|
+
transform: transformEdges,
|
|
65
|
+
ui: {
|
|
66
|
+
type: "select",
|
|
67
|
+
options: [
|
|
68
|
+
{
|
|
69
|
+
label: "Stretch",
|
|
70
|
+
value: "stretch"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: "Transparent",
|
|
74
|
+
value: "transparent"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: "Mirror",
|
|
78
|
+
value: "mirror"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: "Wrap",
|
|
82
|
+
value: "wrap"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
label: "Edges",
|
|
86
|
+
group: "Effect"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
fragmentNode: ({ uniforms, onBeforeRender, childNode, onCleanup, dimensions }) => {
|
|
91
|
+
const buffers = [new Float32Array(GRID_SIZE * GRID_SIZE), new Float32Array(GRID_SIZE * GRID_SIZE)];
|
|
92
|
+
let currentBuffer = 0;
|
|
93
|
+
const displacementData = new Float32Array(GRID_SIZE * GRID_SIZE * 2);
|
|
94
|
+
const displacementTexture = new DataTexture(displacementData, GRID_SIZE, GRID_SIZE, RGFormat, FloatType);
|
|
95
|
+
displacementTexture.magFilter = LinearFilter;
|
|
96
|
+
displacementTexture.minFilter = LinearFilter;
|
|
97
|
+
displacementTexture.needsUpdate = true;
|
|
98
|
+
const displacementField = texture(displacementTexture);
|
|
99
|
+
let prevX = .5;
|
|
100
|
+
let prevY = .5;
|
|
101
|
+
let lastTime = Date.now();
|
|
102
|
+
onBeforeRender(({ pointer }) => {
|
|
103
|
+
const currentTime = Date.now();
|
|
104
|
+
const dt = Math.min((currentTime - lastTime) / 1e3, .016);
|
|
105
|
+
lastTime = currentTime;
|
|
106
|
+
const aspect = dimensions.width / dimensions.height;
|
|
107
|
+
const substeps = 1;
|
|
108
|
+
const decay = uniforms.decay.uniform.value;
|
|
109
|
+
const radius = uniforms.radius.uniform.value * .05;
|
|
110
|
+
const rawVelX = dt > 0 ? (pointer.x - prevX) / dt : 0;
|
|
111
|
+
const rawVelY = dt > 0 ? (pointer.y - prevY) / dt : 0;
|
|
112
|
+
const mouseSpeed = Math.min(Math.sqrt(rawVelX * rawVelX + rawVelY * rawVelY), 2);
|
|
113
|
+
const dampFactor = 1 - decay * .004;
|
|
114
|
+
for (let s = 0; s < substeps; s++) {
|
|
115
|
+
const curr$1 = buffers[currentBuffer];
|
|
116
|
+
const prev = buffers[1 - currentBuffer];
|
|
117
|
+
if (s === 0 && mouseSpeed > .01) {
|
|
118
|
+
const influenceRadius = radius * 3;
|
|
119
|
+
const minJ = Math.max(1, Math.floor((pointer.x - influenceRadius) * GRID_SIZE));
|
|
120
|
+
const maxJ = Math.min(GRID_SIZE - 2, Math.ceil((pointer.x + influenceRadius) * GRID_SIZE));
|
|
121
|
+
const minI = Math.max(1, Math.floor((pointer.y - influenceRadius) * GRID_SIZE));
|
|
122
|
+
const maxI = Math.min(GRID_SIZE - 2, Math.ceil((pointer.y + influenceRadius) * GRID_SIZE));
|
|
123
|
+
for (let i = minI; i <= maxI; i++) for (let j = minJ; j <= maxJ; j++) {
|
|
124
|
+
const idx = i * GRID_SIZE + j;
|
|
125
|
+
const cellX = (j + .5) / GRID_SIZE;
|
|
126
|
+
const cellY = (i + .5) / GRID_SIZE;
|
|
127
|
+
const ddx = aspect >= 1 ? (cellX - pointer.x) * aspect : cellX - pointer.x;
|
|
128
|
+
const ddy = aspect >= 1 ? cellY - pointer.y : (cellY - pointer.y) / aspect;
|
|
129
|
+
const dist = Math.sqrt(ddx * ddx + ddy * ddy);
|
|
130
|
+
if (dist < influenceRadius) {
|
|
131
|
+
const influence = Math.exp(-dist * dist / (radius * radius));
|
|
132
|
+
curr$1[idx] -= influence * mouseSpeed * dt * 3;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
for (let i = 1; i < GRID_SIZE - 1; i++) for (let j = 1; j < GRID_SIZE - 1; j++) {
|
|
137
|
+
const idx = i * GRID_SIZE + j;
|
|
138
|
+
prev[idx] = ((curr$1[idx - 1] + curr$1[idx + 1] + curr$1[idx - GRID_SIZE] + curr$1[idx + GRID_SIZE]) * .5 - prev[idx]) * dampFactor;
|
|
139
|
+
}
|
|
140
|
+
currentBuffer = 1 - currentBuffer;
|
|
141
|
+
}
|
|
142
|
+
const curr = buffers[currentBuffer];
|
|
143
|
+
for (let i = 1; i < GRID_SIZE - 1; i++) for (let j = 1; j < GRID_SIZE - 1; j++) {
|
|
144
|
+
const idx = i * GRID_SIZE + j;
|
|
145
|
+
const dIdx = idx * 2;
|
|
146
|
+
displacementData[dIdx] = (curr[idx + 1] - curr[idx - 1]) * .5;
|
|
147
|
+
displacementData[dIdx + 1] = (curr[idx + GRID_SIZE] - curr[idx - GRID_SIZE]) * .5;
|
|
148
|
+
}
|
|
149
|
+
displacementTexture.needsUpdate = true;
|
|
150
|
+
prevX = pointer.x;
|
|
151
|
+
prevY = pointer.y;
|
|
152
|
+
});
|
|
153
|
+
onCleanup(() => {
|
|
154
|
+
displacementTexture.dispose();
|
|
155
|
+
});
|
|
156
|
+
if (!childNode) return vec4(0, 0, 0, 0);
|
|
157
|
+
const childTexture = convertToTexture(childNode);
|
|
158
|
+
onCleanup(() => {
|
|
159
|
+
if (childTexture?.renderTarget?.dispose) childTexture.renderTarget.dispose();
|
|
160
|
+
});
|
|
161
|
+
const displacement = displacementField.sample(screenUV).xy;
|
|
162
|
+
const intensityScale = uniforms.intensity.uniform.mul(.1);
|
|
163
|
+
const scaledDisplacement = displacement.mul(intensityScale);
|
|
164
|
+
const maxDisp = float(.15);
|
|
165
|
+
const clampedDisplacement = scaledDisplacement.clamp(vec2(maxDisp.negate(), maxDisp.negate()), vec2(maxDisp, maxDisp));
|
|
166
|
+
const chromaticScale = uniforms.chromaticSplit.uniform.mul(.1);
|
|
167
|
+
const rUV = screenUV.sub(clampedDisplacement.mul(float(1).add(chromaticScale)));
|
|
168
|
+
const gUV = screenUV.sub(clampedDisplacement);
|
|
169
|
+
const bUV = screenUV.sub(clampedDisplacement.mul(float(1).sub(chromaticScale)));
|
|
170
|
+
const rSample = applyEdgeHandling(rUV, childTexture.sample(rUV), childTexture, uniforms.edges.uniform);
|
|
171
|
+
const gSample = applyEdgeHandling(gUV, childTexture.sample(gUV), childTexture, uniforms.edges.uniform);
|
|
172
|
+
const bSample = applyEdgeHandling(bUV, childTexture.sample(bUV), childTexture, uniforms.edges.uniform);
|
|
173
|
+
return vec4(rSample.r, gSample.g, bSample.b, gSample.a);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
var CursorRipples_default = componentDefinition;
|
|
177
|
+
export { componentDefinition as n, CursorRipples_default as t };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as needsVideoCanvasWorkaround } from "./browser-Dcr7w1AA.js";
|
|
2
|
+
import { CanvasTexture, SRGBColorSpace, VideoTexture } from "three/webgpu";
|
|
2
3
|
import { float, max, min, or, screenUV, select, step, texture, uniform, vec2, vec4, viewportSize } from "three/tsl";
|
|
3
4
|
const componentDefinition = {
|
|
4
5
|
name: "VideoTexture",
|
|
@@ -67,19 +68,29 @@ const componentDefinition = {
|
|
|
67
68
|
fragmentNode: ({ uniforms, onCleanup, onBeforeRender }) => {
|
|
68
69
|
const baseUV = screenUV;
|
|
69
70
|
let videoElement = null;
|
|
70
|
-
let videoTexture = null;
|
|
71
71
|
let currentUrl = "";
|
|
72
72
|
let isLoading = false;
|
|
73
73
|
let isDisposed = false;
|
|
74
74
|
const videoAspectUniform = uniform(1);
|
|
75
75
|
const videoWidthUniform = uniform(640);
|
|
76
76
|
const videoHeightUniform = uniform(480);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
let canvas = null;
|
|
78
|
+
let ctx = null;
|
|
79
|
+
let activeTexture;
|
|
80
|
+
if (needsVideoCanvasWorkaround()) {
|
|
81
|
+
canvas = document.createElement("canvas");
|
|
82
|
+
canvas.width = 640;
|
|
83
|
+
canvas.height = 480;
|
|
84
|
+
ctx = canvas.getContext("2d");
|
|
85
|
+
activeTexture = new CanvasTexture(canvas);
|
|
86
|
+
} else {
|
|
87
|
+
const placeholderVideo = document.createElement("video");
|
|
88
|
+
placeholderVideo.playsInline = true;
|
|
89
|
+
placeholderVideo.muted = true;
|
|
90
|
+
activeTexture = new VideoTexture(placeholderVideo);
|
|
91
|
+
}
|
|
92
|
+
activeTexture.colorSpace = SRGBColorSpace;
|
|
93
|
+
const textureNode = texture(activeTexture);
|
|
83
94
|
const loadVideo = async (url) => {
|
|
84
95
|
if (!url || url.trim() === "" || isLoading || isDisposed) return;
|
|
85
96
|
isLoading = true;
|
|
@@ -115,10 +126,6 @@ const componentDefinition = {
|
|
|
115
126
|
videoElement.src = "";
|
|
116
127
|
videoElement = null;
|
|
117
128
|
}
|
|
118
|
-
if (videoTexture) videoTexture.dispose();
|
|
119
|
-
videoTexture = new VideoTexture(video);
|
|
120
|
-
videoTexture.colorSpace = SRGBColorSpace;
|
|
121
|
-
textureNode.value = videoTexture;
|
|
122
129
|
videoElement = video;
|
|
123
130
|
currentUrl = url;
|
|
124
131
|
try {
|
|
@@ -126,6 +133,14 @@ const componentDefinition = {
|
|
|
126
133
|
} catch (error) {
|
|
127
134
|
console.warn("[VideoTexture] Autoplay failed (browser policy):", error);
|
|
128
135
|
}
|
|
136
|
+
activeTexture.dispose();
|
|
137
|
+
if (needsVideoCanvasWorkaround()) {
|
|
138
|
+
canvas.width = width;
|
|
139
|
+
canvas.height = height;
|
|
140
|
+
activeTexture = new CanvasTexture(canvas);
|
|
141
|
+
} else activeTexture = new VideoTexture(video);
|
|
142
|
+
activeTexture.colorSpace = SRGBColorSpace;
|
|
143
|
+
textureNode.value = activeTexture;
|
|
129
144
|
isLoading = false;
|
|
130
145
|
} catch (error) {
|
|
131
146
|
console.error("[VideoTexture] Failed to load video:", error);
|
|
@@ -142,6 +157,10 @@ const componentDefinition = {
|
|
|
142
157
|
if (videoElement) {
|
|
143
158
|
const loopValue = uniforms.loop?.uniform?.value ?? true;
|
|
144
159
|
if (videoElement.loop !== loopValue) videoElement.loop = loopValue;
|
|
160
|
+
if (needsVideoCanvasWorkaround() && !videoElement.paused && videoElement.readyState >= 2) {
|
|
161
|
+
ctx.drawImage(videoElement, 0, 0, canvas.width, canvas.height);
|
|
162
|
+
activeTexture.needsUpdate = true;
|
|
163
|
+
}
|
|
145
164
|
}
|
|
146
165
|
});
|
|
147
166
|
onCleanup(() => {
|
|
@@ -151,11 +170,7 @@ const componentDefinition = {
|
|
|
151
170
|
videoElement.src = "";
|
|
152
171
|
videoElement = null;
|
|
153
172
|
}
|
|
154
|
-
|
|
155
|
-
videoTexture.dispose();
|
|
156
|
-
videoTexture = null;
|
|
157
|
-
}
|
|
158
|
-
placeholderVideo.src = "";
|
|
173
|
+
activeTexture.dispose();
|
|
159
174
|
currentUrl = "";
|
|
160
175
|
});
|
|
161
176
|
const uv$1 = baseUV;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as needsVideoCanvasWorkaround } from "./browser-Dcr7w1AA.js";
|
|
2
|
+
import { CanvasTexture, SRGBColorSpace, VideoTexture } from "three/webgpu";
|
|
2
3
|
import { float, max, min, or, screenUV, select, step, texture, uniform, vec2, vec4, viewportSize } from "three/tsl";
|
|
3
4
|
const componentDefinition = {
|
|
4
5
|
name: "WebcamTexture",
|
|
@@ -55,22 +56,32 @@ const componentDefinition = {
|
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
},
|
|
58
|
-
fragmentNode: ({ uniforms, onCleanup }) => {
|
|
59
|
+
fragmentNode: ({ uniforms, onCleanup, onBeforeRender }) => {
|
|
59
60
|
const baseUV = screenUV;
|
|
60
61
|
let mediaStream = null;
|
|
61
62
|
let videoElement = null;
|
|
62
|
-
let videoTexture = null;
|
|
63
63
|
let isInitialized = false;
|
|
64
64
|
let isDisposed = false;
|
|
65
65
|
const videoAspectUniform = uniform(1);
|
|
66
66
|
const videoWidthUniform = uniform(640);
|
|
67
67
|
const videoHeightUniform = uniform(480);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
let canvas = null;
|
|
69
|
+
let ctx = null;
|
|
70
|
+
let activeTexture;
|
|
71
|
+
if (needsVideoCanvasWorkaround()) {
|
|
72
|
+
canvas = document.createElement("canvas");
|
|
73
|
+
canvas.width = 640;
|
|
74
|
+
canvas.height = 480;
|
|
75
|
+
ctx = canvas.getContext("2d");
|
|
76
|
+
activeTexture = new CanvasTexture(canvas);
|
|
77
|
+
} else {
|
|
78
|
+
const placeholderVideo = document.createElement("video");
|
|
79
|
+
placeholderVideo.playsInline = true;
|
|
80
|
+
placeholderVideo.muted = true;
|
|
81
|
+
activeTexture = new VideoTexture(placeholderVideo);
|
|
82
|
+
}
|
|
83
|
+
activeTexture.colorSpace = SRGBColorSpace;
|
|
84
|
+
const textureNode = texture(activeTexture);
|
|
74
85
|
const startWebcam = async () => {
|
|
75
86
|
if (isInitialized || isDisposed) return;
|
|
76
87
|
try {
|
|
@@ -108,10 +119,14 @@ const componentDefinition = {
|
|
|
108
119
|
videoAspectUniform.value = width / height;
|
|
109
120
|
videoWidthUniform.value = width;
|
|
110
121
|
videoHeightUniform.value = height;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
122
|
+
activeTexture.dispose();
|
|
123
|
+
if (needsVideoCanvasWorkaround()) {
|
|
124
|
+
canvas.width = width;
|
|
125
|
+
canvas.height = height;
|
|
126
|
+
activeTexture = new CanvasTexture(canvas);
|
|
127
|
+
} else activeTexture = new VideoTexture(videoElement);
|
|
128
|
+
activeTexture.colorSpace = SRGBColorSpace;
|
|
129
|
+
textureNode.value = activeTexture;
|
|
115
130
|
isInitialized = true;
|
|
116
131
|
console.log(`[WebcamTexture] Webcam started: ${width}x${height}`);
|
|
117
132
|
} catch (error) {
|
|
@@ -123,21 +138,23 @@ const componentDefinition = {
|
|
|
123
138
|
}
|
|
124
139
|
};
|
|
125
140
|
startWebcam();
|
|
141
|
+
onBeforeRender(() => {
|
|
142
|
+
if (needsVideoCanvasWorkaround() && videoElement && isInitialized && !videoElement.paused && videoElement.readyState >= 2) {
|
|
143
|
+
ctx.drawImage(videoElement, 0, 0, canvas.width, canvas.height);
|
|
144
|
+
activeTexture.needsUpdate = true;
|
|
145
|
+
}
|
|
146
|
+
});
|
|
126
147
|
onCleanup(() => {
|
|
127
148
|
isDisposed = true;
|
|
128
149
|
if (mediaStream) {
|
|
129
150
|
mediaStream.getTracks().forEach((track) => track.stop());
|
|
130
151
|
mediaStream = null;
|
|
131
152
|
}
|
|
132
|
-
if (videoTexture) {
|
|
133
|
-
videoTexture.dispose();
|
|
134
|
-
videoTexture = null;
|
|
135
|
-
}
|
|
136
153
|
if (videoElement) {
|
|
137
154
|
videoElement.srcObject = null;
|
|
138
155
|
videoElement = null;
|
|
139
156
|
}
|
|
140
|
-
|
|
157
|
+
activeTexture.dispose();
|
|
141
158
|
isInitialized = false;
|
|
142
159
|
});
|
|
143
160
|
const uv$1 = baseUV;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var _needsCanvasWorkaround = null;
|
|
2
|
+
function needsVideoCanvasWorkaround() {
|
|
3
|
+
if (_needsCanvasWorkaround === null) _needsCanvasWorkaround = typeof navigator !== "undefined" && /Firefox/.test(navigator.userAgent);
|
|
4
|
+
return _needsCanvasWorkaround;
|
|
5
|
+
}
|
|
6
|
+
export { needsVideoCanvasWorkaround as t };
|
package/dist/core/registry.js
CHANGED
|
@@ -6,7 +6,7 @@ import { n as componentDefinition$1 } from "./Ascii-BmSlALjq.js";
|
|
|
6
6
|
import "./colorMixing-Ehw-Hfs_.js";
|
|
7
7
|
import { n as componentDefinition$2 } from "./Aurora-BDnL1XdK.js";
|
|
8
8
|
import { n as componentDefinition$3 } from "./Beam-CyRoRQEj.js";
|
|
9
|
-
import { n as componentDefinition$4 } from "./Blob-
|
|
9
|
+
import { n as componentDefinition$4 } from "./Blob-CunyZ0A6.js";
|
|
10
10
|
import { n as componentDefinition$5 } from "./Blur-NNElJwzj.js";
|
|
11
11
|
import { n as componentDefinition$6 } from "./BrightnessContrast-FdkKMaQQ.js";
|
|
12
12
|
import { n as componentDefinition$7 } from "./Bulge-Ca9hW7y4.js";
|
|
@@ -18,63 +18,65 @@ import { n as componentDefinition$12 } from "./Circle-C9DYXDnD.js";
|
|
|
18
18
|
import { n as componentDefinition$13 } from "./ConcentricSpin-CnuAW_6I.js";
|
|
19
19
|
import { n as componentDefinition$14 } from "./ContourLines-DJ0R9q6Y.js";
|
|
20
20
|
import { n as componentDefinition$15 } from "./CRTScreen-BHKDJ9_0.js";
|
|
21
|
-
import { n as componentDefinition$16 } from "./
|
|
22
|
-
import { n as componentDefinition$17 } from "./
|
|
23
|
-
import { n as componentDefinition$18 } from "./
|
|
24
|
-
import { n as componentDefinition$19 } from "./
|
|
25
|
-
import { n as componentDefinition$20 } from "./
|
|
26
|
-
import { n as componentDefinition$21 } from "./
|
|
27
|
-
import { n as componentDefinition$22 } from "./
|
|
28
|
-
import { n as componentDefinition$23 } from "./
|
|
29
|
-
import { n as componentDefinition$24 } from "./
|
|
30
|
-
import { n as componentDefinition$25 } from "./
|
|
31
|
-
import { n as componentDefinition$26 } from "./
|
|
32
|
-
import { n as componentDefinition$27 } from "./
|
|
33
|
-
import { n as componentDefinition$28 } from "./
|
|
34
|
-
import { n as componentDefinition$29 } from "./
|
|
35
|
-
import { n as componentDefinition$30 } from "./
|
|
36
|
-
import { n as componentDefinition$31 } from "./
|
|
37
|
-
import { n as componentDefinition$32 } from "./
|
|
38
|
-
import { n as componentDefinition$33 } from "./
|
|
39
|
-
import { n as componentDefinition$34 } from "./
|
|
40
|
-
import { n as componentDefinition$35 } from "./
|
|
41
|
-
import { n as componentDefinition$36 } from "./
|
|
42
|
-
import { n as componentDefinition$37 } from "./
|
|
43
|
-
import { n as componentDefinition$38 } from "./
|
|
44
|
-
import { n as componentDefinition$39 } from "./
|
|
45
|
-
import { n as componentDefinition$40 } from "./
|
|
46
|
-
import { n as componentDefinition$41 } from "./
|
|
47
|
-
import { n as componentDefinition$42 } from "./
|
|
48
|
-
import { n as componentDefinition$43 } from "./
|
|
49
|
-
import { n as componentDefinition$44 } from "./
|
|
50
|
-
import { n as componentDefinition$45 } from "./
|
|
51
|
-
import { n as componentDefinition$46 } from "./
|
|
52
|
-
import { n as componentDefinition$47 } from "./
|
|
53
|
-
import { n as componentDefinition$48 } from "./
|
|
54
|
-
import { n as componentDefinition$49 } from "./
|
|
55
|
-
import { n as componentDefinition$50 } from "./
|
|
56
|
-
import { n as componentDefinition$51 } from "./
|
|
57
|
-
import { n as componentDefinition$52 } from "./
|
|
58
|
-
import { n as componentDefinition$53 } from "./
|
|
59
|
-
import { n as componentDefinition$54 } from "./
|
|
60
|
-
import { n as componentDefinition$55 } from "./
|
|
61
|
-
import { n as componentDefinition$56 } from "./
|
|
62
|
-
import { n as componentDefinition$57 } from "./
|
|
63
|
-
import { n as componentDefinition$58 } from "./
|
|
64
|
-
import { n as componentDefinition$59 } from "./
|
|
65
|
-
import { n as componentDefinition$60 } from "./
|
|
66
|
-
import { n as componentDefinition$61 } from "./
|
|
67
|
-
import { n as componentDefinition$62 } from "./
|
|
68
|
-
import { n as componentDefinition$63 } from "./
|
|
69
|
-
import { n as componentDefinition$64 } from "./
|
|
70
|
-
import { n as componentDefinition$65 } from "./
|
|
71
|
-
import { n as componentDefinition$66 } from "./
|
|
72
|
-
import { n as componentDefinition$67 } from "./
|
|
73
|
-
import { n as componentDefinition$68 } from "./
|
|
74
|
-
import { n as componentDefinition$69 } from "./
|
|
75
|
-
import
|
|
76
|
-
import { n as componentDefinition$
|
|
77
|
-
import { n as componentDefinition$
|
|
21
|
+
import { n as componentDefinition$16 } from "./CursorRipples-Dn_rE8nA.js";
|
|
22
|
+
import { n as componentDefinition$17 } from "./CursorTrail-DD4YxAqo.js";
|
|
23
|
+
import { n as componentDefinition$18 } from "./DiffuseBlur-GlibDd8O.js";
|
|
24
|
+
import { n as componentDefinition$19 } from "./Dither-BOWyA2dp.js";
|
|
25
|
+
import { n as componentDefinition$20 } from "./DotGrid-Cm-wz6WU.js";
|
|
26
|
+
import { n as componentDefinition$21 } from "./Duotone-C8mRw_1e.js";
|
|
27
|
+
import { n as componentDefinition$22 } from "./FilmGrain-BzD2zoUK.js";
|
|
28
|
+
import { n as componentDefinition$23 } from "./FloatingParticles-GkVY1twT.js";
|
|
29
|
+
import { n as componentDefinition$24 } from "./FlowField-S_LXjhaN.js";
|
|
30
|
+
import { n as componentDefinition$25 } from "./GlassTiles--hbefQlc.js";
|
|
31
|
+
import { n as componentDefinition$26 } from "./Glitch-lbgQYebN.js";
|
|
32
|
+
import { n as componentDefinition$27 } from "./Glow-DM9zbhbr.js";
|
|
33
|
+
import { n as componentDefinition$28 } from "./Godrays-DVo1ikUR.js";
|
|
34
|
+
import { n as componentDefinition$29 } from "./Grayscale-CRYK8foe.js";
|
|
35
|
+
import { n as componentDefinition$30 } from "./Grid-BmYSb6Ur.js";
|
|
36
|
+
import { n as componentDefinition$31 } from "./GridDistortion-PNU8pi2I.js";
|
|
37
|
+
import { n as componentDefinition$32 } from "./Group-D-QMn-Co.js";
|
|
38
|
+
import { n as componentDefinition$33 } from "./Halftone-BlY2LuT8.js";
|
|
39
|
+
import { n as componentDefinition$34 } from "./HueShift-p4t6HfqE.js";
|
|
40
|
+
import { n as componentDefinition$35 } from "./ImageTexture-BAOtuVAy.js";
|
|
41
|
+
import { n as componentDefinition$36 } from "./Invert-oYct5uwC.js";
|
|
42
|
+
import { n as componentDefinition$37 } from "./Kaleidoscope-BXKsOJl2.js";
|
|
43
|
+
import { n as componentDefinition$38 } from "./LensFlare-BWl8PWjv.js";
|
|
44
|
+
import { n as componentDefinition$39 } from "./LinearBlur-gV1sIMuQ.js";
|
|
45
|
+
import { n as componentDefinition$40 } from "./LinearGradient-C5kz9RSs.js";
|
|
46
|
+
import { n as componentDefinition$41 } from "./Liquify-CtUvuV0S.js";
|
|
47
|
+
import { n as componentDefinition$42 } from "./Mirror-C3Bn9m7T.js";
|
|
48
|
+
import { n as componentDefinition$43 } from "./Perspective-NsMXVWAS.js";
|
|
49
|
+
import { n as componentDefinition$44 } from "./Pixelate-C-LbtIjf.js";
|
|
50
|
+
import { n as componentDefinition$45 } from "./Plasma-Dr516u2H.js";
|
|
51
|
+
import { n as componentDefinition$46 } from "./PolarCoordinates-HVxz9oX-.js";
|
|
52
|
+
import { n as componentDefinition$47 } from "./Posterize-DbPe3f5d.js";
|
|
53
|
+
import { n as componentDefinition$48 } from "./ProgressiveBlur-Cf2pKf8U.js";
|
|
54
|
+
import { n as componentDefinition$49 } from "./RadialGradient-Bel2cjwV.js";
|
|
55
|
+
import { n as componentDefinition$50 } from "./RectangularCoordinates-BfeH7Mp6.js";
|
|
56
|
+
import { n as componentDefinition$51 } from "./Ripples-DBqbjqb_.js";
|
|
57
|
+
import { n as componentDefinition$52 } from "./Saturation-4L5KnzYg.js";
|
|
58
|
+
import { n as componentDefinition$53 } from "./Sharpness-C5h9h3NY.js";
|
|
59
|
+
import { n as componentDefinition$54 } from "./Shatter-BDTHZrbz.js";
|
|
60
|
+
import { n as componentDefinition$55 } from "./SimplexNoise-DU-QPbwp.js";
|
|
61
|
+
import { n as componentDefinition$56 } from "./SineWave-CsoVJf9C.js";
|
|
62
|
+
import { n as componentDefinition$57 } from "./SolidColor-BOK2t0JT.js";
|
|
63
|
+
import { n as componentDefinition$58 } from "./Spherize-BxUTtFAg.js";
|
|
64
|
+
import { n as componentDefinition$59 } from "./Spiral-DVURsiiQ.js";
|
|
65
|
+
import { n as componentDefinition$60 } from "./Strands-C2l4JaUt.js";
|
|
66
|
+
import { n as componentDefinition$61 } from "./Stretch-uSJDtqi2.js";
|
|
67
|
+
import { n as componentDefinition$62 } from "./Stripes-IFl3of9w.js";
|
|
68
|
+
import { n as componentDefinition$63 } from "./StudioBackground-DbBGv5fk.js";
|
|
69
|
+
import { n as componentDefinition$64 } from "./Swirl-C16tmwEg.js";
|
|
70
|
+
import { n as componentDefinition$65 } from "./TiltShift-C5t3YMVT.js";
|
|
71
|
+
import { n as componentDefinition$66 } from "./Tint-VTnDmiKF.js";
|
|
72
|
+
import { n as componentDefinition$67 } from "./Tritone-v6z_O967.js";
|
|
73
|
+
import { n as componentDefinition$68 } from "./Twirl-BWpsT8iI.js";
|
|
74
|
+
import { n as componentDefinition$69 } from "./Vibrance-C_DSuzwf.js";
|
|
75
|
+
import "./browser-Dcr7w1AA.js";
|
|
76
|
+
import { n as componentDefinition$70 } from "./VideoTexture-DfsNWCXk.js";
|
|
77
|
+
import { n as componentDefinition$71 } from "./WaveDistortion-xj8fjAf_.js";
|
|
78
|
+
import { n as componentDefinition$72 } from "./WebcamTexture-Cxppkhiu.js";
|
|
79
|
+
import { n as componentDefinition$73 } from "./ZoomBlur-BePhHTgF.js";
|
|
78
80
|
var createShaderRegistry = () => {
|
|
79
81
|
const registry = {};
|
|
80
82
|
const shaderDefinitions = {
|
|
@@ -94,63 +96,64 @@ var createShaderRegistry = () => {
|
|
|
94
96
|
ConcentricSpin: componentDefinition$13,
|
|
95
97
|
ContourLines: componentDefinition$14,
|
|
96
98
|
CRTScreen: componentDefinition$15,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
99
|
+
CursorRipples: componentDefinition$16,
|
|
100
|
+
CursorTrail: componentDefinition$17,
|
|
101
|
+
DiffuseBlur: componentDefinition$18,
|
|
102
|
+
Dither: componentDefinition$19,
|
|
103
|
+
DotGrid: componentDefinition$20,
|
|
104
|
+
Duotone: componentDefinition$21,
|
|
105
|
+
FilmGrain: componentDefinition$22,
|
|
106
|
+
FloatingParticles: componentDefinition$23,
|
|
107
|
+
FlowField: componentDefinition$24,
|
|
108
|
+
GlassTiles: componentDefinition$25,
|
|
109
|
+
Glitch: componentDefinition$26,
|
|
110
|
+
Glow: componentDefinition$27,
|
|
111
|
+
Godrays: componentDefinition$28,
|
|
112
|
+
Grayscale: componentDefinition$29,
|
|
113
|
+
Grid: componentDefinition$30,
|
|
114
|
+
GridDistortion: componentDefinition$31,
|
|
115
|
+
Group: componentDefinition$32,
|
|
116
|
+
Halftone: componentDefinition$33,
|
|
117
|
+
HueShift: componentDefinition$34,
|
|
118
|
+
ImageTexture: componentDefinition$35,
|
|
119
|
+
Invert: componentDefinition$36,
|
|
120
|
+
Kaleidoscope: componentDefinition$37,
|
|
121
|
+
LensFlare: componentDefinition$38,
|
|
122
|
+
LinearBlur: componentDefinition$39,
|
|
123
|
+
LinearGradient: componentDefinition$40,
|
|
124
|
+
Liquify: componentDefinition$41,
|
|
125
|
+
Mirror: componentDefinition$42,
|
|
126
|
+
Perspective: componentDefinition$43,
|
|
127
|
+
Pixelate: componentDefinition$44,
|
|
128
|
+
Plasma: componentDefinition$45,
|
|
129
|
+
PolarCoordinates: componentDefinition$46,
|
|
130
|
+
Posterize: componentDefinition$47,
|
|
131
|
+
ProgressiveBlur: componentDefinition$48,
|
|
132
|
+
RadialGradient: componentDefinition$49,
|
|
133
|
+
RectangularCoordinates: componentDefinition$50,
|
|
134
|
+
Ripples: componentDefinition$51,
|
|
135
|
+
Saturation: componentDefinition$52,
|
|
136
|
+
Sharpness: componentDefinition$53,
|
|
137
|
+
Shatter: componentDefinition$54,
|
|
138
|
+
SimplexNoise: componentDefinition$55,
|
|
139
|
+
SineWave: componentDefinition$56,
|
|
140
|
+
SolidColor: componentDefinition$57,
|
|
141
|
+
Spherize: componentDefinition$58,
|
|
142
|
+
Spiral: componentDefinition$59,
|
|
143
|
+
Strands: componentDefinition$60,
|
|
144
|
+
Stretch: componentDefinition$61,
|
|
145
|
+
Stripes: componentDefinition$62,
|
|
146
|
+
StudioBackground: componentDefinition$63,
|
|
147
|
+
Swirl: componentDefinition$64,
|
|
148
|
+
TiltShift: componentDefinition$65,
|
|
149
|
+
Tint: componentDefinition$66,
|
|
150
|
+
Tritone: componentDefinition$67,
|
|
151
|
+
Twirl: componentDefinition$68,
|
|
152
|
+
Vibrance: componentDefinition$69,
|
|
153
|
+
VideoTexture: componentDefinition$70,
|
|
154
|
+
WaveDistortion: componentDefinition$71,
|
|
155
|
+
WebcamTexture: componentDefinition$72,
|
|
156
|
+
ZoomBlur: componentDefinition$73
|
|
154
157
|
};
|
|
155
158
|
Object.entries(shaderDefinitions).forEach(([fileName, def]) => {
|
|
156
159
|
const propsMetadata = {};
|