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.
Files changed (51) hide show
  1. package/dist/core/DiffuseBlur-Dq_vFrB1.js +70 -0
  2. package/dist/core/Godrays-D3VnYrAm.js +106 -0
  3. package/dist/core/Spherize-CqjZj4yV.js +104 -0
  4. package/dist/core/index.js +127 -125
  5. package/dist/core/shaderRegistry.d.ts.map +1 -1
  6. package/dist/core/shaders/DiffuseBlur/index.d.ts +7 -0
  7. package/dist/core/shaders/DiffuseBlur/index.d.ts.map +1 -1
  8. package/dist/core/shaders/DiffuseBlur/index.js +3 -1
  9. package/dist/core/shaders/Godrays/index.d.ts.map +1 -1
  10. package/dist/core/shaders/Godrays/index.js +1 -1
  11. package/dist/core/shaders/Spherize/index.d.ts +62 -0
  12. package/dist/core/shaders/Spherize/index.d.ts.map +1 -0
  13. package/dist/core/shaders/Spherize/index.js +7 -0
  14. package/dist/core/shaders/Spiral/index.js +1 -1
  15. package/dist/core/shaders/Strands/index.js +1 -1
  16. package/dist/core/shaders/Stretch/index.js +1 -1
  17. package/dist/core/shaders/Swirl/index.js +1 -1
  18. package/dist/core/shaders/TiltShift/index.js +1 -1
  19. package/dist/core/shaders/Tritone/index.js +1 -1
  20. package/dist/core/shaders/Twirl/index.js +1 -1
  21. package/dist/core/shaders/Vibrance/index.js +1 -1
  22. package/dist/core/shaders/WaveDistortion/index.js +1 -1
  23. package/dist/core/shaders/ZoomBlur/index.js +1 -1
  24. package/dist/react/{generatePresetCode-CbulNGo3.js → generatePresetCode-BXrrE8g5.js} +9 -4
  25. package/dist/react/{generatePresetCode-ClK4i9O1.cjs → generatePresetCode-DWBlTzlt.cjs} +2 -2
  26. package/dist/react/index.cjs +84 -84
  27. package/dist/react/index.js +10964 -10715
  28. package/dist/react/utils/generatePresetCode.cjs +1 -1
  29. package/dist/react/utils/generatePresetCode.js +1 -1
  30. package/dist/registry.js +220 -2
  31. package/dist/svelte/components/Spherize.svelte.d.ts +19 -0
  32. package/dist/svelte/{generatePresetCode-CbulNGo3.js → generatePresetCode-BXrrE8g5.js} +9 -4
  33. package/dist/svelte/index.d.ts +1 -0
  34. package/dist/svelte/index.js +11152 -10944
  35. package/dist/svelte/utils/generatePresetCode.js +1 -1
  36. package/dist/vue/{generatePresetCode-Baa8DyZE.js → generatePresetCode-nej_B_Ke.js} +30 -25
  37. package/dist/vue/index.js +10418 -10187
  38. package/dist/vue/utils/generatePresetCode.js +1 -1
  39. package/package.json +6 -1
  40. package/dist/core/DiffuseBlur-BdGvOoBw.js +0 -40
  41. package/dist/core/Godrays-cUzAKVXn.js +0 -106
  42. /package/dist/core/{Spiral-CcyI8azF.js → Spiral-BRrismPI.js} +0 -0
  43. /package/dist/core/{Strands-Co4fkc05.js → Strands-DyrV6zDO.js} +0 -0
  44. /package/dist/core/{Stretch-C8iYAgNS.js → Stretch-DeBlJ-NH.js} +0 -0
  45. /package/dist/core/{Swirl-BpMwkNcm.js → Swirl-PxpHzkdC.js} +0 -0
  46. /package/dist/core/{TiltShift-D31nakFq.js → TiltShift-DiArippe.js} +0 -0
  47. /package/dist/core/{Tritone-Dx48G3b1.js → Tritone-KtJgZviA.js} +0 -0
  48. /package/dist/core/{Twirl-ng6pwyl2.js → Twirl-C6xj1p52.js} +0 -0
  49. /package/dist/core/{Vibrance-D0ArL0qp.js → Vibrance-C6lNgpWH.js} +0 -0
  50. /package/dist/core/{WaveDistortion-DGKrpUdb.js → WaveDistortion-DcXxPZ2w.js} +0 -0
  51. /package/dist/core/{ZoomBlur-uQyy5yko.js → ZoomBlur-_feIVJs6.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { n as a, t as o } from "../generatePresetCode-CbulNGo3.js";
1
+ import { n as a, t as o } from "../generatePresetCode-BXrrE8g5.js";
2
2
  export {
3
3
  o as availableComponents,
4
4
  a as generatePresetCode
@@ -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, o = " ") {
219
- return Object.entries(a).filter(([e, r]) => {
222
+ function s(a, t, e = " ") {
223
+ return Object.entries(a).filter(([o, r]) => {
220
224
  const n = c[t] || {};
221
- if (n.hasOwnProperty(e)) {
222
- const l = n[e];
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 !(e === "opacity" && r === 1 || e === "blendMode" && r === "normal");
226
- }).map(([e, r]) => {
227
- const n = p(e);
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
- ` + o + " ");
234
+ ` + e + " ");
231
235
  }
232
236
  function m(a, t) {
233
- const o = [];
234
- function e(r) {
237
+ const e = [];
238
+ function o(r) {
235
239
  for (const n of r)
236
- o.push(n), n.children && e(n.children);
240
+ e.push(n), n.children && o(n.children);
237
241
  }
238
- return e(t), o.some((r) => r.props?.maskSource === a);
242
+ return o(t), e.some((r) => r.props?.maskSource === a);
239
243
  }
240
244
  function y(a) {
241
- const t = (o, e = " ") => {
242
- const r = o.props ? s(o.props, o.type, e) : "";
245
+ const t = (e, o = " ") => {
246
+ const r = e.props ? s(e.props, e.type, o) : "";
243
247
  let n = "";
244
- o.id && m(o.id, a.components) && (n = `id="${o.id}"`);
248
+ e.id && m(e.id, a.components) && (n = `id="${e.id}"`);
245
249
  const l = [n, r].filter(Boolean).join(`
246
- ` + e + " ");
247
- if (o.children && o.children.length > 0) {
248
- const i = o.children.map((d) => t(d, e + " ")).join(`
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 ? `${e}<${o.type}
251
- ${e} ${l}>
254
+ return l ? `${o}<${e.type}
255
+ ${o} ${l}>
252
256
  ${i}
253
- ${e}</${o.type}>` : `${e}<${o.type}>
257
+ ${o}</${e.type}>` : `${o}<${e.type}>
254
258
  ${i}
255
- ${e}</${o.type}>`;
256
- } else return l ? `${e}<${o.type}
257
- ${e} ${l}/>` : `${e}<${o.type}/>`;
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((o) => t(o)).join(`
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",