shaders 2.5.93 → 2.5.94
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-56vuq_qL.js → Blob-CuRSRXmA.js} +22 -7
- package/dist/core/{CursorRipples-n_xEDr10.js → CursorRipples-Bo-3LZoC.js} +10 -3
- package/dist/core/{Glass-CR9981-Z.js → Glass-CRfTkmRy.js} +13 -7
- package/dist/core/{WaveDistortion-BVT1KuLK.js → WaveDistortion-CHb75HO3.js} +18 -5
- package/dist/core/effects/glass.d.ts +1 -1
- package/dist/core/effects/glass.d.ts.map +1 -1
- package/dist/core/index.js +5 -5
- package/dist/core/registry.js +5 -5
- package/dist/core/{shaderRegistry-BZ6QG12o.js → shaderRegistry-BzOzMO4V.js} +4 -4
- 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.map +1 -1
- package/dist/core/shaders/CursorRipples/index.js +1 -1
- package/dist/core/shaders/Glass/index.js +1 -1
- package/dist/core/shaders/WaveDistortion/index.d.ts.map +1 -1
- package/dist/core/shaders/WaveDistortion/index.js +1 -1
- package/dist/js/createShader.js +1 -1
- package/dist/react/Shader.js +1 -1
- package/dist/solid/engine/Shader.js +1 -1
- package/dist/svelte/index.js +1 -1
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as transformColor, l as transformPosition, o as transformColorSpace, t as colorSpaceOptions } from "./transformations-B5lM6fYX.js";
|
|
2
2
|
import { t as mixColors } from "./colorMixing-BPpDnR5I.js";
|
|
3
3
|
import { t as createAnimatedTime } from "./time-DUqSFWvT.js";
|
|
4
|
-
import { dot, float, length, max, normalize, pow, reflect, screenUV, sin, smoothstep, vec2, vec3, vec4, viewportSize } from "three/tsl";
|
|
4
|
+
import { dot, float, length, max, normalize, pow, reflect, screenUV, sin, smoothstep, uniform, vec2, vec3, vec4, viewportSize } from "three/tsl";
|
|
5
5
|
const componentDefinition = {
|
|
6
6
|
name: "Blob",
|
|
7
7
|
category: "Textures",
|
|
@@ -172,7 +172,7 @@ const componentDefinition = {
|
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
174
|
fragmentNode: (params) => {
|
|
175
|
-
const { uniforms } = params;
|
|
175
|
+
const { uniforms, onBeforeRender } = params;
|
|
176
176
|
const baseUV = screenUV;
|
|
177
177
|
const animTime = createAnimatedTime(params, uniforms.speed, uniforms.seed);
|
|
178
178
|
const colorA = uniforms.colorA.uniform;
|
|
@@ -181,9 +181,6 @@ const componentDefinition = {
|
|
|
181
181
|
const deformation = uniforms.deformation.uniform;
|
|
182
182
|
const softness = uniforms.softness.uniform;
|
|
183
183
|
const highlightIntensity = uniforms.highlightIntensity.uniform;
|
|
184
|
-
const highlightX = uniforms.highlightX.uniform;
|
|
185
|
-
const highlightY = uniforms.highlightY.uniform;
|
|
186
|
-
const highlightZ = uniforms.highlightZ.uniform;
|
|
187
184
|
const highlightColor = uniforms.highlightColor.uniform;
|
|
188
185
|
const edgeWidth = softness.mul(float(.3));
|
|
189
186
|
const edgeCurve = softness.mul(float(2)).add(float(.5));
|
|
@@ -201,12 +198,30 @@ const componentDefinition = {
|
|
|
201
198
|
const noiseAmount = noise1.add(noise2).add(noise3).add(noise4);
|
|
202
199
|
const organicRadius = baseRadius.add(noiseAmount);
|
|
203
200
|
const blobMask = pow(smoothstep(organicRadius.sub(edgeWidth), organicRadius.add(edgeWidth), dist).oneMinus(), edgeCurve);
|
|
204
|
-
const distFromCenter =
|
|
201
|
+
const distFromCenter = dist;
|
|
205
202
|
const sphereRadius = organicRadius;
|
|
206
203
|
const normalTilt = smoothstep(float(0), sphereRadius, distFromCenter);
|
|
207
204
|
const fakeZ = float(1).sub(normalTilt.mul(float(.1)));
|
|
208
205
|
const surfaceNormal = normalize(vec3(uv$1.x.mul(normalTilt.add(float(.2))), uv$1.y.mul(normalTilt.add(float(.2))), fakeZ));
|
|
209
|
-
const
|
|
206
|
+
const normLx = uniform(0);
|
|
207
|
+
const normLy = uniform(0);
|
|
208
|
+
const normLz = uniform(1);
|
|
209
|
+
onBeforeRender(() => {
|
|
210
|
+
const lx = uniforms.highlightX.uniform.value;
|
|
211
|
+
const ly = uniforms.highlightY.uniform.value;
|
|
212
|
+
const lz = uniforms.highlightZ.uniform.value;
|
|
213
|
+
const len = Math.sqrt(lx * lx + ly * ly + lz * lz);
|
|
214
|
+
if (len > 0) {
|
|
215
|
+
normLx.value = lx / len;
|
|
216
|
+
normLy.value = ly / len;
|
|
217
|
+
normLz.value = lz / len;
|
|
218
|
+
} else {
|
|
219
|
+
normLx.value = 0;
|
|
220
|
+
normLy.value = 0;
|
|
221
|
+
normLz.value = 0;
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
const lightDir = vec3(normLx, normLy, normLz);
|
|
210
225
|
const viewDir = vec3(float(0), float(0), float(1));
|
|
211
226
|
const reflectDir = reflect(lightDir.negate(), surfaceNormal);
|
|
212
227
|
const specularPower = float(32);
|
|
@@ -101,6 +101,7 @@ const componentDefinition = {
|
|
|
101
101
|
let prevX = .5;
|
|
102
102
|
let prevY = .5;
|
|
103
103
|
let lastTime = Date.now();
|
|
104
|
+
let prevMaxAbsVal = 1;
|
|
104
105
|
onBeforeRender(({ pointer }) => {
|
|
105
106
|
const currentTime = Date.now();
|
|
106
107
|
const dt = Math.min((currentTime - lastTime) / 1e3, .016);
|
|
@@ -112,7 +113,11 @@ const componentDefinition = {
|
|
|
112
113
|
const rawVelX = dt > 0 ? (pointer.x - prevX) / dt : 0;
|
|
113
114
|
const rawVelY = dt > 0 ? (pointer.y - prevY) / dt : 0;
|
|
114
115
|
const mouseSpeed = Math.min(Math.sqrt(rawVelX * rawVelX + rawVelY * rawVelY), 2);
|
|
116
|
+
prevX = pointer.x;
|
|
117
|
+
prevY = pointer.y;
|
|
118
|
+
if (mouseSpeed <= .01 && prevMaxAbsVal < 1e-6) return;
|
|
115
119
|
const dampFactor = 1 - decay * .004;
|
|
120
|
+
let maxAbsVal = 0;
|
|
116
121
|
for (let s = 0; s < substeps; s++) {
|
|
117
122
|
const curr$1 = buffers[currentBuffer];
|
|
118
123
|
const prev = buffers[1 - currentBuffer];
|
|
@@ -137,10 +142,14 @@ const componentDefinition = {
|
|
|
137
142
|
}
|
|
138
143
|
for (let i = 1; i < GRID_SIZE - 1; i++) for (let j = 1; j < GRID_SIZE - 1; j++) {
|
|
139
144
|
const idx = i * GRID_SIZE + j;
|
|
140
|
-
|
|
145
|
+
const next = ((curr$1[idx - 1] + curr$1[idx + 1] + curr$1[idx - GRID_SIZE] + curr$1[idx + GRID_SIZE]) * .5 - prev[idx]) * dampFactor;
|
|
146
|
+
prev[idx] = next;
|
|
147
|
+
const absNext = next < 0 ? -next : next;
|
|
148
|
+
if (absNext > maxAbsVal) maxAbsVal = absNext;
|
|
141
149
|
}
|
|
142
150
|
currentBuffer = 1 - currentBuffer;
|
|
143
151
|
}
|
|
152
|
+
prevMaxAbsVal = maxAbsVal;
|
|
144
153
|
const curr = buffers[currentBuffer];
|
|
145
154
|
for (let i = 1; i < GRID_SIZE - 1; i++) for (let j = 1; j < GRID_SIZE - 1; j++) {
|
|
146
155
|
const idx = i * GRID_SIZE + j;
|
|
@@ -149,8 +158,6 @@ const componentDefinition = {
|
|
|
149
158
|
displacementData[dIdx + 1] = (curr[idx + GRID_SIZE] - curr[idx - GRID_SIZE]) * .5;
|
|
150
159
|
}
|
|
151
160
|
displacementTexture.needsUpdate = true;
|
|
152
|
-
prevX = pointer.x;
|
|
153
|
-
prevY = pointer.y;
|
|
154
161
|
});
|
|
155
162
|
onCleanup(() => {
|
|
156
163
|
displacementTexture.dispose();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as transformColor, l as transformPosition } from "./transformations-B5lM6fYX.js";
|
|
2
2
|
import { n as createAnalyticSdfSampler, r as createSvgSdfSampler } from "./sdf-Bux00UoZ.js";
|
|
3
|
-
import { Fn, clamp, convertToTexture,
|
|
3
|
+
import { Fn, clamp, convertToTexture, dot, exp2, float, max, mix, pow, screenUV, smoothstep, sqrt, uniform, vec2, vec3, vec4, viewportSize } from "three/tsl";
|
|
4
4
|
var GOLDEN_ANGLE = 2.3999632297286535;
|
|
5
5
|
var BLUR_SAMPLE_COUNT = 9;
|
|
6
6
|
const BLUR_DISK = [];
|
|
@@ -10,7 +10,16 @@ for (let i = 0; i < BLUR_SAMPLE_COUNT; i++) {
|
|
|
10
10
|
BLUR_DISK.push([Math.cos(angle) * r, Math.sin(angle) * r]);
|
|
11
11
|
}
|
|
12
12
|
var INV_HLEN_GLASS = 1 / Math.sqrt(5);
|
|
13
|
-
function applyGlassEffect(childTexture, sdfSampler, uniforms) {
|
|
13
|
+
function applyGlassEffect(childTexture, sdfSampler, uniforms, onBeforeRender) {
|
|
14
|
+
const lx = uniform(0);
|
|
15
|
+
const ly = uniform(0);
|
|
16
|
+
const updateLightAngle = () => {
|
|
17
|
+
const rad = uniforms.lightAngle.uniform.value * Math.PI / 180;
|
|
18
|
+
lx.value = Math.cos(rad);
|
|
19
|
+
ly.value = Math.sin(rad);
|
|
20
|
+
};
|
|
21
|
+
updateLightAngle();
|
|
22
|
+
onBeforeRender?.(updateLightAngle);
|
|
14
23
|
return Fn(() => {
|
|
15
24
|
const uv$1 = screenUV;
|
|
16
25
|
const aspect = viewportSize.x.div(viewportSize.y);
|
|
@@ -27,9 +36,6 @@ function applyGlassEffect(childTexture, sdfSampler, uniforms) {
|
|
|
27
36
|
const gradY = sdfSampler(sdfUV.add(vec2(float(0), EPS))).r.sub(sdfRaw).div(EPS);
|
|
28
37
|
const rb1 = clamp(sdf.negate().div(sharp).mul(float(32)), float(0), float(1));
|
|
29
38
|
const rb2base = clamp(sdf.sub(pxH).negate().div(sharp).mul(float(16)), float(0), float(1)).sub(clamp(sdf.negate().div(sharp).mul(float(16)), float(0), float(1)));
|
|
30
|
-
const lightRad = uniforms.lightAngle.uniform.mul(float(Math.PI / 180));
|
|
31
|
-
const lx = cos(lightRad);
|
|
32
|
-
const ly = sin(lightRad);
|
|
33
39
|
const lightFacing = gradX.mul(lx).add(gradY.mul(ly)).mul(float(.5)).add(float(.5));
|
|
34
40
|
const rb2 = rb2base.mul(lightFacing).mul(uniforms.highlight.uniform);
|
|
35
41
|
const thicknessRange = uniforms.thickness.uniform.mul(float(.3)).max(float(.005));
|
|
@@ -383,8 +389,8 @@ const componentDefinition = {
|
|
|
383
389
|
};
|
|
384
390
|
}
|
|
385
391
|
})();
|
|
386
|
-
if (shapeSdfUrl) return applyGlassEffect(childTexture, createSvgSdfSampler(shapeSdfUrl, onBeforeRender, onCleanup), uniforms);
|
|
387
|
-
else return applyGlassEffect(childTexture, createAnalyticSdfSampler(uniforms.shapeType.uniform.value || initialConfig.type || "circleSDF", initialConfig, uniforms.shape, onBeforeRender), uniforms);
|
|
392
|
+
if (shapeSdfUrl) return applyGlassEffect(childTexture, createSvgSdfSampler(shapeSdfUrl, onBeforeRender, onCleanup), uniforms, onBeforeRender);
|
|
393
|
+
else return applyGlassEffect(childTexture, createAnalyticSdfSampler(uniforms.shapeType.uniform.value || initialConfig.type || "circleSDF", initialConfig, uniforms.shape, onBeforeRender), uniforms, onBeforeRender);
|
|
388
394
|
}
|
|
389
395
|
};
|
|
390
396
|
var Glass_default = componentDefinition;
|
|
@@ -2,7 +2,7 @@ import { t as applyEdgeHandling } from "./edges-CfGcQniB.js";
|
|
|
2
2
|
import { c as transformEdges } from "./transformations-B5lM6fYX.js";
|
|
3
3
|
import { t as unpremultiplyAlpha } from "./alpha-C4ptedXe.js";
|
|
4
4
|
import { t as createAnimatedTime } from "./time-DUqSFWvT.js";
|
|
5
|
-
import { PI, abs, convertToTexture, cos, float, fract, screenUV, sin, step, vec2, vec4, viewportSize } from "three/tsl";
|
|
5
|
+
import { PI, abs, convertToTexture, cos, float, fract, screenUV, sin, step, uniform, vec2, vec4, viewportSize } from "three/tsl";
|
|
6
6
|
const componentDefinition = {
|
|
7
7
|
name: "WaveDistortion",
|
|
8
8
|
category: "Distortions",
|
|
@@ -130,14 +130,27 @@ const componentDefinition = {
|
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
fragmentNode: (params) => {
|
|
133
|
-
const { uniforms, childNode, onCleanup } = params;
|
|
133
|
+
const { uniforms, childNode, onCleanup, onBeforeRender } = params;
|
|
134
134
|
if (!childNode) return vec4(0, 0, 0, 0);
|
|
135
135
|
const uvCoord = screenUV;
|
|
136
136
|
const aspect = viewportSize.x.div(viewportSize.y);
|
|
137
137
|
const t = createAnimatedTime(params, uniforms.speed).mul(.5);
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
let cosAngle, sinAngle;
|
|
139
|
+
if (uniforms.angle.uniform.isUniformNode) {
|
|
140
|
+
const precomputedCos = uniform(1);
|
|
141
|
+
const precomputedSin = uniform(0);
|
|
142
|
+
onBeforeRender(() => {
|
|
143
|
+
const rad = uniforms.angle.uniform.value * Math.PI / 180;
|
|
144
|
+
precomputedCos.value = Math.cos(rad);
|
|
145
|
+
precomputedSin.value = Math.sin(rad);
|
|
146
|
+
});
|
|
147
|
+
cosAngle = precomputedCos;
|
|
148
|
+
sinAngle = precomputedSin;
|
|
149
|
+
} else {
|
|
150
|
+
const angleRad = uniforms.angle.uniform.mul(PI).div(180);
|
|
151
|
+
cosAngle = cos(angleRad);
|
|
152
|
+
sinAngle = sin(angleRad);
|
|
153
|
+
}
|
|
141
154
|
const centeredUV = uvCoord.sub(vec2(.5, .5));
|
|
142
155
|
const aspectCorrectedUV = vec2(centeredUV.x.mul(aspect), centeredUV.y);
|
|
143
156
|
const phase = vec2(aspectCorrectedUV.x.mul(cosAngle).sub(aspectCorrectedUV.y.mul(sinAngle)), aspectCorrectedUV.x.mul(sinAngle).add(aspectCorrectedUV.y.mul(cosAngle))).y.add(.5).mul(uniforms.frequency.uniform).mul(PI.mul(2)).add(t);
|
|
@@ -61,5 +61,5 @@ export interface GlassEffectUniforms {
|
|
|
61
61
|
uniform: any;
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
export declare function applyGlassEffect(childTexture: any, sdfSampler: (uv: any) => any, uniforms: GlassEffectUniforms & UniformsMap): Node;
|
|
64
|
+
export declare function applyGlassEffect(childTexture: any, sdfSampler: (uv: any) => any, uniforms: GlassEffectUniforms & UniformsMap, onBeforeRender?: (callback: () => void) => void): Node;
|
|
65
65
|
//# sourceMappingURL=glass.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glass.d.ts","sourceRoot":"","sources":["../../src/effects/glass.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AAMzC,eAAO,MAAM,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAO,CAAA;AAO/C,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACxB,KAAK,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACvB,YAAY,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC9B,UAAU,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC5B,SAAS,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC3B,UAAU,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC5B,IAAI,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IACtB,SAAS,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC3B,aAAa,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAA;IAC/B,sBAAsB,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;K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I.js";
|
|
|
7
7
|
import { t as createAnimatedTime } from "./time-DUqSFWvT.js";
|
|
8
8
|
import "./Aurora-BPHeGEZ_.js";
|
|
9
9
|
import "./Beam-CAnoOWgt.js";
|
|
10
|
-
import "./Blob-
|
|
10
|
+
import "./Blob-CuRSRXmA.js";
|
|
11
11
|
import "./Blur-DTyNQt1R.js";
|
|
12
12
|
import "./BrightnessContrast-BoR9bi58.js";
|
|
13
13
|
import "./Bulge-DN2R75Hp.js";
|
|
@@ -24,7 +24,7 @@ import "./Crescent-DPxGWdPH.js";
|
|
|
24
24
|
import "./Cross-CDyzf8TT.js";
|
|
25
25
|
import "./CRTScreen-DolQEkb1.js";
|
|
26
26
|
import "./Crystal-DSuN8TNY.js";
|
|
27
|
-
import "./CursorRipples-
|
|
27
|
+
import "./CursorRipples-Bo-3LZoC.js";
|
|
28
28
|
import "./CursorTrail-C-0lpOV1.js";
|
|
29
29
|
import "./DiamondGradient-TsOxHjg_.js";
|
|
30
30
|
import "./DiffuseBlur-BqIV4JLM.js";
|
|
@@ -42,7 +42,7 @@ import "./Flower-B4xPp0Qa.js";
|
|
|
42
42
|
import "./FlowField-DpP32B1X.js";
|
|
43
43
|
import "./FlowingGradient-lSouJxmq.js";
|
|
44
44
|
import "./Form3D-DQD-0zrd.js";
|
|
45
|
-
import "./Glass-
|
|
45
|
+
import "./Glass-CRfTkmRy.js";
|
|
46
46
|
import "./GlassTiles-B7aAvcTQ.js";
|
|
47
47
|
import "./Glitch-CgmgjLea.js";
|
|
48
48
|
import "./Glow-CKWIRcBt.js";
|
|
@@ -104,11 +104,11 @@ import "./browser-DIoaEnIX.js";
|
|
|
104
104
|
import "./VideoTexture-BobyGZGr.js";
|
|
105
105
|
import "./Vignette-DB8x78Up.js";
|
|
106
106
|
import "./Voronoi-ALXxxHBo.js";
|
|
107
|
-
import "./WaveDistortion-
|
|
107
|
+
import "./WaveDistortion-CHb75HO3.js";
|
|
108
108
|
import "./Weave-j4CrCig4.js";
|
|
109
109
|
import "./WebcamTexture-BXj7sqND.js";
|
|
110
110
|
import "./ZoomBlur-Cl75kL8E.js";
|
|
111
|
-
import { t as getAllShaders } from "./shaderRegistry-
|
|
111
|
+
import { t as getAllShaders } from "./shaderRegistry-BzOzMO4V.js";
|
|
112
112
|
import { Material, Mesh, MeshBasicNodeMaterial, OrthographicCamera, PlaneGeometry, SRGBColorSpace, Scene, Vector2, WebGPURenderer } from "three/webgpu";
|
|
113
113
|
import { WebGLRenderer } from "three";
|
|
114
114
|
import { PI, abs, add, atan, clamp, convertToTexture, cos, div, dot, float, fract, max, min, mix, mul, pow, screenUV, sign, sin, smoothstep, sqrt, step, sub, time, uniform, uv, vec2, vec3, vec4 } from "three/tsl";
|
package/dist/core/registry.js
CHANGED
|
@@ -7,7 +7,7 @@ import "./colorMixing-BPpDnR5I.js";
|
|
|
7
7
|
import "./time-DUqSFWvT.js";
|
|
8
8
|
import "./Aurora-BPHeGEZ_.js";
|
|
9
9
|
import "./Beam-CAnoOWgt.js";
|
|
10
|
-
import "./Blob-
|
|
10
|
+
import "./Blob-CuRSRXmA.js";
|
|
11
11
|
import "./Blur-DTyNQt1R.js";
|
|
12
12
|
import "./BrightnessContrast-BoR9bi58.js";
|
|
13
13
|
import "./Bulge-DN2R75Hp.js";
|
|
@@ -24,7 +24,7 @@ import "./Crescent-DPxGWdPH.js";
|
|
|
24
24
|
import "./Cross-CDyzf8TT.js";
|
|
25
25
|
import "./CRTScreen-DolQEkb1.js";
|
|
26
26
|
import "./Crystal-DSuN8TNY.js";
|
|
27
|
-
import "./CursorRipples-
|
|
27
|
+
import "./CursorRipples-Bo-3LZoC.js";
|
|
28
28
|
import "./CursorTrail-C-0lpOV1.js";
|
|
29
29
|
import "./DiamondGradient-TsOxHjg_.js";
|
|
30
30
|
import "./DiffuseBlur-BqIV4JLM.js";
|
|
@@ -42,7 +42,7 @@ import "./Flower-B4xPp0Qa.js";
|
|
|
42
42
|
import "./FlowField-DpP32B1X.js";
|
|
43
43
|
import "./FlowingGradient-lSouJxmq.js";
|
|
44
44
|
import "./Form3D-DQD-0zrd.js";
|
|
45
|
-
import "./Glass-
|
|
45
|
+
import "./Glass-CRfTkmRy.js";
|
|
46
46
|
import "./GlassTiles-B7aAvcTQ.js";
|
|
47
47
|
import "./Glitch-CgmgjLea.js";
|
|
48
48
|
import "./Glow-CKWIRcBt.js";
|
|
@@ -104,9 +104,9 @@ import "./browser-DIoaEnIX.js";
|
|
|
104
104
|
import "./VideoTexture-BobyGZGr.js";
|
|
105
105
|
import "./Vignette-DB8x78Up.js";
|
|
106
106
|
import "./Voronoi-ALXxxHBo.js";
|
|
107
|
-
import "./WaveDistortion-
|
|
107
|
+
import "./WaveDistortion-CHb75HO3.js";
|
|
108
108
|
import "./Weave-j4CrCig4.js";
|
|
109
109
|
import "./WebcamTexture-BXj7sqND.js";
|
|
110
110
|
import "./ZoomBlur-Cl75kL8E.js";
|
|
111
|
-
import { a as shaderRegistry, i as getShadersByCategory, n as getShaderByName, r as getShaderCategories, t as getAllShaders } from "./shaderRegistry-
|
|
111
|
+
import { a as shaderRegistry, i as getShadersByCategory, n as getShaderByName, r as getShaderCategories, t as getAllShaders } from "./shaderRegistry-BzOzMO4V.js";
|
|
112
112
|
export { getAllShaders, getShaderByName, getShaderCategories, getShadersByCategory, shaderRegistry };
|
|
@@ -2,7 +2,7 @@ import { n as componentDefinition } from "./AngularBlur-BgZWbEjj.js";
|
|
|
2
2
|
import { n as componentDefinition$1 } from "./Ascii-BwSMmD6Z.js";
|
|
3
3
|
import { n as componentDefinition$2 } from "./Aurora-BPHeGEZ_.js";
|
|
4
4
|
import { n as componentDefinition$3 } from "./Beam-CAnoOWgt.js";
|
|
5
|
-
import { n as componentDefinition$4 } from "./Blob-
|
|
5
|
+
import { n as componentDefinition$4 } from "./Blob-CuRSRXmA.js";
|
|
6
6
|
import { n as componentDefinition$5 } from "./Blur-DTyNQt1R.js";
|
|
7
7
|
import { n as componentDefinition$6 } from "./BrightnessContrast-BoR9bi58.js";
|
|
8
8
|
import { n as componentDefinition$7 } from "./Bulge-DN2R75Hp.js";
|
|
@@ -18,7 +18,7 @@ import { n as componentDefinition$16 } from "./Crescent-DPxGWdPH.js";
|
|
|
18
18
|
import { n as componentDefinition$17 } from "./Cross-CDyzf8TT.js";
|
|
19
19
|
import { n as componentDefinition$18 } from "./CRTScreen-DolQEkb1.js";
|
|
20
20
|
import { n as componentDefinition$19 } from "./Crystal-DSuN8TNY.js";
|
|
21
|
-
import { n as componentDefinition$20 } from "./CursorRipples-
|
|
21
|
+
import { n as componentDefinition$20 } from "./CursorRipples-Bo-3LZoC.js";
|
|
22
22
|
import { n as componentDefinition$21 } from "./CursorTrail-C-0lpOV1.js";
|
|
23
23
|
import { n as componentDefinition$22 } from "./DiamondGradient-TsOxHjg_.js";
|
|
24
24
|
import { n as componentDefinition$23 } from "./DiffuseBlur-BqIV4JLM.js";
|
|
@@ -36,7 +36,7 @@ import { n as componentDefinition$34 } from "./Flower-B4xPp0Qa.js";
|
|
|
36
36
|
import { n as componentDefinition$35 } from "./FlowField-DpP32B1X.js";
|
|
37
37
|
import { n as componentDefinition$36 } from "./FlowingGradient-lSouJxmq.js";
|
|
38
38
|
import { n as componentDefinition$37 } from "./Form3D-DQD-0zrd.js";
|
|
39
|
-
import { n as componentDefinition$38 } from "./Glass-
|
|
39
|
+
import { n as componentDefinition$38 } from "./Glass-CRfTkmRy.js";
|
|
40
40
|
import { n as componentDefinition$39 } from "./GlassTiles-B7aAvcTQ.js";
|
|
41
41
|
import { n as componentDefinition$40 } from "./Glitch-CgmgjLea.js";
|
|
42
42
|
import { n as componentDefinition$41 } from "./Glow-CKWIRcBt.js";
|
|
@@ -97,7 +97,7 @@ import { n as componentDefinition$95 } from "./Vibrance-Dq1jBFJb.js";
|
|
|
97
97
|
import { n as componentDefinition$96 } from "./VideoTexture-BobyGZGr.js";
|
|
98
98
|
import { n as componentDefinition$97 } from "./Vignette-DB8x78Up.js";
|
|
99
99
|
import { n as componentDefinition$98 } from "./Voronoi-ALXxxHBo.js";
|
|
100
|
-
import { n as componentDefinition$99 } from "./WaveDistortion-
|
|
100
|
+
import { n as componentDefinition$99 } from "./WaveDistortion-CHb75HO3.js";
|
|
101
101
|
import { n as componentDefinition$100 } from "./Weave-j4CrCig4.js";
|
|
102
102
|
import { n as componentDefinition$101 } from "./WebcamTexture-BXj7sqND.js";
|
|
103
103
|
import { n as componentDefinition$102 } from "./ZoomBlur-Cl75kL8E.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Blob/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAIvE,OAAO,EAAC,cAAc,EAAE,iBAAiB,EAAyC,MAAM,qCAAqC,CAAA;AAI7H,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,MAAM,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;CAClD;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Blob/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAIvE,OAAO,EAAC,cAAc,EAAE,iBAAiB,EAAyC,MAAM,qCAAqC,CAAA;AAI7H,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,MAAM,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;CAClD;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAoQnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../transformations-B5lM6fYX.js";
|
|
2
2
|
import "../../colorMixing-BPpDnR5I.js";
|
|
3
3
|
import "../../time-DUqSFWvT.js";
|
|
4
|
-
import { n as componentDefinition, t as Blob_default } from "../../Blob-
|
|
4
|
+
import { n as componentDefinition, t as Blob_default } from "../../Blob-CuRSRXmA.js";
|
|
5
5
|
export { componentDefinition, Blob_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/CursorRipples/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AASvE,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;CAChB;AAID,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/CursorRipples/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AASvE,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;CAChB;AAID,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CA4NnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../edges-CfGcQniB.js";
|
|
2
2
|
import "../../transformations-B5lM6fYX.js";
|
|
3
3
|
import "../../alpha-C4ptedXe.js";
|
|
4
|
-
import { n as componentDefinition, t as CursorRipples_default } from "../../CursorRipples-
|
|
4
|
+
import { n as componentDefinition, t as CursorRipples_default } from "../../CursorRipples-Bo-3LZoC.js";
|
|
5
5
|
export { componentDefinition, CursorRipples_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../../transformations-B5lM6fYX.js";
|
|
2
2
|
import "../../sdf-Bux00UoZ.js";
|
|
3
|
-
import { n as componentDefinition, t as Glass_default } from "../../Glass-
|
|
3
|
+
import { n as componentDefinition, t as Glass_default } from "../../Glass-CRfTkmRy.js";
|
|
4
4
|
export { componentDefinition, Glass_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/WaveDistortion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AASvE,MAAM,WAAW,cAAc;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/WaveDistortion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AASvE,MAAM,WAAW,cAAc;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAuNnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -2,5 +2,5 @@ import "../../edges-CfGcQniB.js";
|
|
|
2
2
|
import "../../transformations-B5lM6fYX.js";
|
|
3
3
|
import "../../alpha-C4ptedXe.js";
|
|
4
4
|
import "../../time-DUqSFWvT.js";
|
|
5
|
-
import { n as componentDefinition, t as WaveDistortion_default } from "../../WaveDistortion-
|
|
5
|
+
import { n as componentDefinition, t as WaveDistortion_default } from "../../WaveDistortion-CHb75HO3.js";
|
|
6
6
|
export { componentDefinition, WaveDistortion_default as default };
|
package/dist/js/createShader.js
CHANGED
|
@@ -41,7 +41,7 @@ async function createShader(canvas, preset, options) {
|
|
|
41
41
|
if (isExternalUser()) {
|
|
42
42
|
const checkRendering = () => {
|
|
43
43
|
if (renderer.getPerformanceStats().fps > 0) {
|
|
44
|
-
telemetryCollector = startTelemetry(renderer, "2.5.
|
|
44
|
+
telemetryCollector = startTelemetry(renderer, "2.5.94", options?.disableTelemetry || false, false);
|
|
45
45
|
if (telemetryCollector) telemetryCollector.start();
|
|
46
46
|
telemetryStartTimeout = null;
|
|
47
47
|
} else telemetryStartTimeout = setTimeout(checkRendering, 500);
|
package/dist/react/Shader.js
CHANGED
|
@@ -89,7 +89,7 @@ const Shader = ({ children, disableTelemetry = false, colorSpace = "p3-linear",
|
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
if (rendererRef.current.getPerformanceStats().fps > 0) {
|
|
92
|
-
telemetryCollectorRef.current = startTelemetry(rendererRef.current, "2.5.
|
|
92
|
+
telemetryCollectorRef.current = startTelemetry(rendererRef.current, "2.5.94", disableTelemetry, isPreview);
|
|
93
93
|
if (telemetryCollectorRef.current) telemetryCollectorRef.current.start();
|
|
94
94
|
telemetryStartTimeoutRef.current = null;
|
|
95
95
|
} else telemetryStartTimeoutRef.current = window.setTimeout(checkRendering, 500);
|
|
@@ -67,7 +67,7 @@ function Shader(allProps) {
|
|
|
67
67
|
const checkRendering = () => {
|
|
68
68
|
const stats = rendererInstance.getPerformanceStats();
|
|
69
69
|
if (stats.fps > 0) {
|
|
70
|
-
const version = "2.5.
|
|
70
|
+
const version = "2.5.94";
|
|
71
71
|
telemetryCollector = startTelemetry(rendererInstance, version, props.disableTelemetry, props.isPreview);
|
|
72
72
|
if (telemetryCollector) {
|
|
73
73
|
telemetryCollector.start();
|
package/dist/svelte/index.js
CHANGED
|
@@ -20546,7 +20546,7 @@ function Shader($$anchor, $$props) {
|
|
|
20546
20546
|
const checkRendering = () => {
|
|
20547
20547
|
if (!rendererInstance) return;
|
|
20548
20548
|
if (rendererInstance.getPerformanceStats().fps > 0) {
|
|
20549
|
-
telemetryCollector = startTelemetry(rendererInstance, "2.5.
|
|
20549
|
+
telemetryCollector = startTelemetry(rendererInstance, "2.5.94", disableTelemetry(), isPreview());
|
|
20550
20550
|
if (telemetryCollector) telemetryCollector.start();
|
|
20551
20551
|
telemetryStartTimeout = null;
|
|
20552
20552
|
} else telemetryStartTimeout = window.setTimeout(checkRendering, 500);
|
|
@@ -60,7 +60,7 @@ var Shader_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineC
|
|
|
60
60
|
const startTelemetryWhenReady = () => {
|
|
61
61
|
const checkRendering = () => {
|
|
62
62
|
if (rendererInstance.value.getPerformanceStats().fps > 0) {
|
|
63
|
-
telemetryCollector = startTelemetry(rendererInstance.value, "2.5.
|
|
63
|
+
telemetryCollector = startTelemetry(rendererInstance.value, "2.5.94", props.disableTelemetry, props.isPreview);
|
|
64
64
|
if (telemetryCollector) telemetryCollector.start();
|
|
65
65
|
telemetryStartTimeout = null;
|
|
66
66
|
} else telemetryStartTimeout = setTimeout(checkRendering, 500);
|