shaders 2.2.10 → 2.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/DiffuseBlur-Dq_vFrB1.js +70 -0
- package/dist/core/Godrays-D3VnYrAm.js +106 -0
- package/dist/core/Spherize-CqjZj4yV.js +104 -0
- package/dist/core/index.js +127 -125
- package/dist/core/shaderRegistry.d.ts.map +1 -1
- package/dist/core/shaders/DiffuseBlur/index.d.ts +7 -0
- package/dist/core/shaders/DiffuseBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/DiffuseBlur/index.js +3 -1
- package/dist/core/shaders/Godrays/index.d.ts.map +1 -1
- package/dist/core/shaders/Godrays/index.js +1 -1
- package/dist/core/shaders/Spherize/index.d.ts +62 -0
- package/dist/core/shaders/Spherize/index.d.ts.map +1 -0
- package/dist/core/shaders/Spherize/index.js +7 -0
- package/dist/core/shaders/Spiral/index.js +1 -1
- package/dist/core/shaders/Strands/index.js +1 -1
- package/dist/core/shaders/Stretch/index.js +1 -1
- package/dist/core/shaders/Swirl/index.js +1 -1
- package/dist/core/shaders/TiltShift/index.js +1 -1
- package/dist/core/shaders/Tritone/index.js +1 -1
- package/dist/core/shaders/Twirl/index.js +1 -1
- package/dist/core/shaders/Vibrance/index.js +1 -1
- package/dist/core/shaders/WaveDistortion/index.js +1 -1
- package/dist/core/shaders/ZoomBlur/index.js +1 -1
- package/dist/react/{generatePresetCode-CbulNGo3.js → generatePresetCode-BXrrE8g5.js} +9 -4
- package/dist/react/{generatePresetCode-ClK4i9O1.cjs → generatePresetCode-DWBlTzlt.cjs} +2 -2
- package/dist/react/index.cjs +84 -84
- package/dist/react/index.js +10964 -10715
- package/dist/react/utils/generatePresetCode.cjs +1 -1
- package/dist/react/utils/generatePresetCode.js +1 -1
- package/dist/registry.js +220 -2
- package/dist/svelte/components/Spherize.svelte.d.ts +19 -0
- package/dist/svelte/{generatePresetCode-CbulNGo3.js → generatePresetCode-BXrrE8g5.js} +9 -4
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +11152 -10944
- package/dist/svelte/utils/generatePresetCode.js +1 -1
- package/dist/vue/{generatePresetCode-Baa8DyZE.js → generatePresetCode-nej_B_Ke.js} +30 -25
- package/dist/vue/index.js +10418 -10187
- package/dist/vue/utils/generatePresetCode.js +1 -1
- package/package.json +6 -1
- package/dist/core/DiffuseBlur-BdGvOoBw.js +0 -40
- package/dist/core/Godrays-cUzAKVXn.js +0 -106
- /package/dist/core/{Spiral-CcyI8azF.js → Spiral-BRrismPI.js} +0 -0
- /package/dist/core/{Strands-Co4fkc05.js → Strands-DyrV6zDO.js} +0 -0
- /package/dist/core/{Stretch-C8iYAgNS.js → Stretch-DeBlJ-NH.js} +0 -0
- /package/dist/core/{Swirl-BpMwkNcm.js → Swirl-PxpHzkdC.js} +0 -0
- /package/dist/core/{TiltShift-D31nakFq.js → TiltShift-DiArippe.js} +0 -0
- /package/dist/core/{Tritone-Dx48G3b1.js → Tritone-KtJgZviA.js} +0 -0
- /package/dist/core/{Twirl-ng6pwyl2.js → Twirl-C6xj1p52.js} +0 -0
- /package/dist/core/{Vibrance-D0ArL0qp.js → Vibrance-C6lNgpWH.js} +0 -0
- /package/dist/core/{WaveDistortion-DGKrpUdb.js → WaveDistortion-DcXxPZ2w.js} +0 -0
- /package/dist/core/{ZoomBlur-uQyy5yko.js → ZoomBlur-_feIVJs6.js} +0 -0
|
@@ -174,6 +174,10 @@ var c = {
|
|
|
174
174
|
opacity: 1,
|
|
175
175
|
blendMode: "normal"
|
|
176
176
|
},
|
|
177
|
+
Spherize: {
|
|
178
|
+
opacity: 1,
|
|
179
|
+
blendMode: "normal"
|
|
180
|
+
},
|
|
177
181
|
Spiral: {
|
|
178
182
|
opacity: 1,
|
|
179
183
|
blendMode: "normal"
|
|
@@ -215,49 +219,49 @@ var c = {
|
|
|
215
219
|
blendMode: "normal"
|
|
216
220
|
}
|
|
217
221
|
};
|
|
218
|
-
function s(a, t,
|
|
219
|
-
return Object.entries(a).filter(([
|
|
222
|
+
function s(a, t, e = " ") {
|
|
223
|
+
return Object.entries(a).filter(([o, r]) => {
|
|
220
224
|
const n = c[t] || {};
|
|
221
|
-
if (n.hasOwnProperty(
|
|
222
|
-
const l = n[
|
|
225
|
+
if (n.hasOwnProperty(o)) {
|
|
226
|
+
const l = n[o];
|
|
223
227
|
return typeof r == "object" && typeof l == "object" ? JSON.stringify(r) !== JSON.stringify(l) : r !== l;
|
|
224
228
|
}
|
|
225
|
-
return !(
|
|
226
|
-
}).map(([
|
|
227
|
-
const n = p(
|
|
229
|
+
return !(o === "opacity" && r === 1 || o === "blendMode" && r === "normal");
|
|
230
|
+
}).map(([o, r]) => {
|
|
231
|
+
const n = p(o);
|
|
228
232
|
return typeof r == "string" ? `${n}="${r}"` : typeof r == "object" ? `:${n}="${JSON.stringify(r).replace(/"/g, "'").replace(/'/g, "'")}"` : `:${n}="${r}"`;
|
|
229
233
|
}).join(`
|
|
230
|
-
` +
|
|
234
|
+
` + e + " ");
|
|
231
235
|
}
|
|
232
236
|
function m(a, t) {
|
|
233
|
-
const
|
|
234
|
-
function
|
|
237
|
+
const e = [];
|
|
238
|
+
function o(r) {
|
|
235
239
|
for (const n of r)
|
|
236
|
-
|
|
240
|
+
e.push(n), n.children && o(n.children);
|
|
237
241
|
}
|
|
238
|
-
return
|
|
242
|
+
return o(t), e.some((r) => r.props?.maskSource === a);
|
|
239
243
|
}
|
|
240
244
|
function y(a) {
|
|
241
|
-
const t = (
|
|
242
|
-
const r =
|
|
245
|
+
const t = (e, o = " ") => {
|
|
246
|
+
const r = e.props ? s(e.props, e.type, o) : "";
|
|
243
247
|
let n = "";
|
|
244
|
-
|
|
248
|
+
e.id && m(e.id, a.components) && (n = `id="${e.id}"`);
|
|
245
249
|
const l = [n, r].filter(Boolean).join(`
|
|
246
|
-
` +
|
|
247
|
-
if (
|
|
248
|
-
const i =
|
|
250
|
+
` + o + " ");
|
|
251
|
+
if (e.children && e.children.length > 0) {
|
|
252
|
+
const i = e.children.map((d) => t(d, o + " ")).join(`
|
|
249
253
|
`);
|
|
250
|
-
return l ? `${
|
|
251
|
-
${
|
|
254
|
+
return l ? `${o}<${e.type}
|
|
255
|
+
${o} ${l}>
|
|
252
256
|
${i}
|
|
253
|
-
${
|
|
257
|
+
${o}</${e.type}>` : `${o}<${e.type}>
|
|
254
258
|
${i}
|
|
255
|
-
${
|
|
256
|
-
} else return l ? `${
|
|
257
|
-
${
|
|
259
|
+
${o}</${e.type}>`;
|
|
260
|
+
} else return l ? `${o}<${e.type}
|
|
261
|
+
${o} ${l}/>` : `${o}<${e.type}/>`;
|
|
258
262
|
};
|
|
259
263
|
return `<Shader>
|
|
260
|
-
${a.components.map((
|
|
264
|
+
${a.components.map((e) => t(e)).join(`
|
|
261
265
|
`)}
|
|
262
266
|
</Shader>`;
|
|
263
267
|
}
|
|
@@ -305,6 +309,7 @@ const b = [
|
|
|
305
309
|
"SimplexNoise",
|
|
306
310
|
"SineWave",
|
|
307
311
|
"SolidColor",
|
|
312
|
+
"Spherize",
|
|
308
313
|
"Spiral",
|
|
309
314
|
"Strands",
|
|
310
315
|
"Stretch",
|