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 +1 @@
1
- const e=require("../generatePresetCode-ClK4i9O1.cjs");exports.availableComponents=e.availableComponents;exports.generatePresetCode=e.generatePresetCode;
1
+ const e=require("../generatePresetCode-DWBlTzlt.cjs");exports.availableComponents=e.availableComponents;exports.generatePresetCode=e.generatePresetCode;
@@ -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
package/dist/registry.js CHANGED
@@ -1661,13 +1661,13 @@ export const shaderRegistry = [
1661
1661
  {
1662
1662
  "name": "DiffuseBlur",
1663
1663
  "category": "Blurs",
1664
- "description": "Soft focus blur using stochastic sampling",
1664
+ "description": "Grain-like pixel displacement at random",
1665
1665
  "fileName": "DiffuseBlur",
1666
1666
  "requiresChild": true,
1667
1667
  "definition": {
1668
1668
  "name": "DiffuseBlur",
1669
1669
  "category": "Blurs",
1670
- "description": "Soft focus blur using stochastic sampling",
1670
+ "description": "Grain-like pixel displacement at random",
1671
1671
  "requiresRTT": true,
1672
1672
  "requiresChild": true,
1673
1673
  "props": {
@@ -1681,6 +1681,32 @@ export const shaderRegistry = [
1681
1681
  "step": 1,
1682
1682
  "label": "Intensity"
1683
1683
  }
1684
+ },
1685
+ "edges": {
1686
+ "default": "stretch",
1687
+ "description": "How to handle edges when distortion pushes content out of bounds",
1688
+ "ui": {
1689
+ "type": "select",
1690
+ "options": [
1691
+ {
1692
+ "label": "Stretch",
1693
+ "value": "stretch"
1694
+ },
1695
+ {
1696
+ "label": "Transparent",
1697
+ "value": "transparent"
1698
+ },
1699
+ {
1700
+ "label": "Mirror",
1701
+ "value": "mirror"
1702
+ },
1703
+ {
1704
+ "label": "Wrap",
1705
+ "value": "wrap"
1706
+ }
1707
+ ],
1708
+ "label": "Edges"
1709
+ }
1684
1710
  }
1685
1711
  }
1686
1712
  },
@@ -1695,6 +1721,32 @@ export const shaderRegistry = [
1695
1721
  },
1696
1722
  "default": 30,
1697
1723
  "description": "Intensity of the diffuse blur effect"
1724
+ },
1725
+ "edges": {
1726
+ "ui": {
1727
+ "type": "select",
1728
+ "options": [
1729
+ {
1730
+ "label": "Stretch",
1731
+ "value": "stretch"
1732
+ },
1733
+ {
1734
+ "label": "Transparent",
1735
+ "value": "transparent"
1736
+ },
1737
+ {
1738
+ "label": "Mirror",
1739
+ "value": "mirror"
1740
+ },
1741
+ {
1742
+ "label": "Wrap",
1743
+ "value": "wrap"
1744
+ }
1745
+ ],
1746
+ "label": "Edges"
1747
+ },
1748
+ "default": "stretch",
1749
+ "description": "How to handle edges when distortion pushes content out of bounds"
1698
1750
  }
1699
1751
  }
1700
1752
  },
@@ -4758,6 +4810,172 @@ export const shaderRegistry = [
4758
4810
  }
4759
4811
  }
4760
4812
  },
4813
+ {
4814
+ "name": "Spherize",
4815
+ "category": "Distortions",
4816
+ "description": "Map content onto a 3D sphere surface with depth distortion",
4817
+ "fileName": "Spherize",
4818
+ "requiresChild": true,
4819
+ "definition": {
4820
+ "name": "Spherize",
4821
+ "category": "Distortions",
4822
+ "description": "Map content onto a 3D sphere surface with depth distortion",
4823
+ "requiresRTT": true,
4824
+ "requiresChild": true,
4825
+ "props": {
4826
+ "radius": {
4827
+ "default": 1,
4828
+ "description": "Radius of the sphere (1 = half viewport height)",
4829
+ "ui": {
4830
+ "type": "range",
4831
+ "min": 0.1,
4832
+ "max": 3,
4833
+ "step": 0.01,
4834
+ "label": "Radius"
4835
+ }
4836
+ },
4837
+ "depth": {
4838
+ "default": 1,
4839
+ "description": "How much the sphere bulges toward viewer (0 = flat, higher = more bulge)",
4840
+ "ui": {
4841
+ "type": "range",
4842
+ "min": 0,
4843
+ "max": 3,
4844
+ "step": 0.01,
4845
+ "label": "Depth"
4846
+ }
4847
+ },
4848
+ "center": {
4849
+ "default": {
4850
+ "x": 0.5,
4851
+ "y": 0.5
4852
+ },
4853
+ "description": "The center point of the sphere",
4854
+ "ui": {
4855
+ "type": "position",
4856
+ "label": "Center"
4857
+ }
4858
+ },
4859
+ "lightPosition": {
4860
+ "default": {
4861
+ "x": 0.3,
4862
+ "y": 0.3
4863
+ },
4864
+ "description": "Position of the specular light source",
4865
+ "ui": {
4866
+ "type": "position",
4867
+ "label": "Light Position"
4868
+ }
4869
+ },
4870
+ "lightIntensity": {
4871
+ "default": 0.5,
4872
+ "description": "Intensity of the rim light (0 = off)",
4873
+ "ui": {
4874
+ "type": "range",
4875
+ "min": 0,
4876
+ "max": 1,
4877
+ "step": 0.01,
4878
+ "label": "Light Intensity"
4879
+ }
4880
+ },
4881
+ "lightSoftness": {
4882
+ "default": 0.5,
4883
+ "description": "Softness of the rim light falloff (0 = hard edge, 1 = soft glow)",
4884
+ "ui": {
4885
+ "type": "range",
4886
+ "min": 0,
4887
+ "max": 1,
4888
+ "step": 0.01,
4889
+ "label": "Light Softness"
4890
+ }
4891
+ },
4892
+ "lightColor": {
4893
+ "default": "#ffffff",
4894
+ "description": "Color of the specular highlight",
4895
+ "ui": {
4896
+ "type": "color",
4897
+ "label": "Light Color"
4898
+ }
4899
+ }
4900
+ }
4901
+ },
4902
+ "propsMetadata": {
4903
+ "radius": {
4904
+ "ui": {
4905
+ "type": "range",
4906
+ "min": 0.1,
4907
+ "max": 3,
4908
+ "step": 0.01,
4909
+ "label": "Radius"
4910
+ },
4911
+ "default": 1,
4912
+ "description": "Radius of the sphere (1 = half viewport height)"
4913
+ },
4914
+ "depth": {
4915
+ "ui": {
4916
+ "type": "range",
4917
+ "min": 0,
4918
+ "max": 3,
4919
+ "step": 0.01,
4920
+ "label": "Depth"
4921
+ },
4922
+ "default": 1,
4923
+ "description": "How much the sphere bulges toward viewer (0 = flat, higher = more bulge)"
4924
+ },
4925
+ "center": {
4926
+ "ui": {
4927
+ "type": "position",
4928
+ "label": "Center"
4929
+ },
4930
+ "default": {
4931
+ "x": 0.5,
4932
+ "y": 0.5
4933
+ },
4934
+ "description": "The center point of the sphere"
4935
+ },
4936
+ "lightPosition": {
4937
+ "ui": {
4938
+ "type": "position",
4939
+ "label": "Light Position"
4940
+ },
4941
+ "default": {
4942
+ "x": 0.3,
4943
+ "y": 0.3
4944
+ },
4945
+ "description": "Position of the specular light source"
4946
+ },
4947
+ "lightIntensity": {
4948
+ "ui": {
4949
+ "type": "range",
4950
+ "min": 0,
4951
+ "max": 1,
4952
+ "step": 0.01,
4953
+ "label": "Light Intensity"
4954
+ },
4955
+ "default": 0.5,
4956
+ "description": "Intensity of the rim light (0 = off)"
4957
+ },
4958
+ "lightSoftness": {
4959
+ "ui": {
4960
+ "type": "range",
4961
+ "min": 0,
4962
+ "max": 1,
4963
+ "step": 0.01,
4964
+ "label": "Light Softness"
4965
+ },
4966
+ "default": 0.5,
4967
+ "description": "Softness of the rim light falloff (0 = hard edge, 1 = soft glow)"
4968
+ },
4969
+ "lightColor": {
4970
+ "ui": {
4971
+ "type": "color",
4972
+ "label": "Light Color"
4973
+ },
4974
+ "default": "#ffffff",
4975
+ "description": "Color of the specular highlight"
4976
+ }
4977
+ }
4978
+ },
4761
4979
  {
4762
4980
  "name": "Spiral",
4763
4981
  "category": "Base Layers",
@@ -0,0 +1,19 @@
1
+ import { type BlendMode, type TransformConfig } from 'shaders/core';
2
+ import { type ComponentProps } from 'shaders/core/Spherize';
3
+ /**
4
+ * Define component props including blend mode, opacity, visibility, masking, and transformation
5
+ */
6
+ interface ExtendedComponentProps extends Partial<ComponentProps> {
7
+ blendMode?: BlendMode;
8
+ opacity?: number;
9
+ visible?: boolean;
10
+ id?: string;
11
+ maskSource?: string;
12
+ maskType?: string;
13
+ renderOrder?: number;
14
+ transform?: Partial<TransformConfig>;
15
+ children?: import('svelte').Snippet;
16
+ }
17
+ declare const Spherize: import("svelte").Component<ExtendedComponentProps, {}, "">;
18
+ type Spherize = ReturnType<typeof Spherize>;
19
+ export default Spherize;
@@ -171,6 +171,10 @@ var p = {
171
171
  opacity: 1,
172
172
  blendMode: "normal"
173
173
  },
174
+ Spherize: {
175
+ opacity: 1,
176
+ blendMode: "normal"
177
+ },
174
178
  Spiral: {
175
179
  opacity: 1,
176
180
  blendMode: "normal"
@@ -223,7 +227,7 @@ function c(l, t, e = " ") {
223
227
  }).map(([o, r]) => typeof r == "string" ? `${o}="${r}"` : typeof r == "object" ? `${o}={${JSON.stringify(r)}}` : `${o}={${r}}`).join(`
224
228
  ` + e + " ");
225
229
  }
226
- function s(l, t) {
230
+ function m(l, t) {
227
231
  const e = [];
228
232
  function o(r) {
229
233
  for (const n of r)
@@ -231,11 +235,11 @@ function s(l, t) {
231
235
  }
232
236
  return o(t), e.some((r) => r.props?.maskSource === l);
233
237
  }
234
- function m(l) {
238
+ function s(l) {
235
239
  const t = (e, o = " ") => {
236
240
  const r = e.props ? c(e.props, e.type, o) : "";
237
241
  let n = "";
238
- e.id && s(e.id, l.components) && (n = `id="${e.id}"`);
242
+ e.id && m(e.id, l.components) && (n = `id="${e.id}"`);
239
243
  const a = [n, r].filter(Boolean).join(`
240
244
  ` + o + " ");
241
245
  if (e.children && e.children.length > 0) {
@@ -299,6 +303,7 @@ const y = [
299
303
  "SimplexNoise",
300
304
  "SineWave",
301
305
  "SolidColor",
306
+ "Spherize",
302
307
  "Spiral",
303
308
  "Strands",
304
309
  "Stretch",
@@ -311,6 +316,6 @@ const y = [
311
316
  "ZoomBlur"
312
317
  ];
313
318
  export {
314
- m as n,
319
+ s as n,
315
320
  y as t
316
321
  };
@@ -41,6 +41,7 @@ export { default as Saturation } from './components/Saturation.svelte';
41
41
  export { default as SimplexNoise } from './components/SimplexNoise.svelte';
42
42
  export { default as SineWave } from './components/SineWave.svelte';
43
43
  export { default as SolidColor } from './components/SolidColor.svelte';
44
+ export { default as Spherize } from './components/Spherize.svelte';
44
45
  export { default as Spiral } from './components/Spiral.svelte';
45
46
  export { default as Strands } from './components/Strands.svelte';
46
47
  export { default as Stretch } from './components/Stretch.svelte';