shaders 2.2.4 → 2.2.8

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 (47) hide show
  1. package/dist/core/Stretch-C8iYAgNS.js +104 -0
  2. package/dist/core/index.js +1130 -1124
  3. package/dist/core/renderer.d.ts +26 -0
  4. package/dist/core/renderer.d.ts.map +1 -1
  5. package/dist/core/shaderRegistry.d.ts.map +1 -1
  6. package/dist/core/shaders/Stretch/index.d.ts +45 -0
  7. package/dist/core/shaders/Stretch/index.d.ts.map +1 -0
  8. package/dist/core/shaders/Stretch/index.js +8 -0
  9. package/dist/core/shaders/Swirl/index.js +1 -1
  10. package/dist/core/shaders/TiltShift/index.js +1 -1
  11. package/dist/core/shaders/Tritone/index.js +1 -1
  12. package/dist/core/shaders/Twirl/index.js +1 -1
  13. package/dist/core/shaders/Vibrance/index.js +1 -1
  14. package/dist/core/shaders/WaveDistortion/index.js +1 -1
  15. package/dist/core/shaders/ZoomBlur/index.js +1 -1
  16. package/dist/core/utilities/uvTransform.d.ts +1 -1
  17. package/dist/core/utilities/uvTransform.d.ts.map +1 -1
  18. package/dist/react/components/Stretch.d.ts +3 -1
  19. package/dist/react/components/Stretch.d.ts.map +1 -1
  20. package/dist/react/index.cjs +225 -225
  21. package/dist/react/index.d.ts +1 -0
  22. package/dist/react/index.d.ts.map +1 -1
  23. package/dist/react/index.js +12502 -12272
  24. package/dist/react/utils/generatePresetCode.cjs +7 -7
  25. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  26. package/dist/react/utils/generatePresetCode.js +13 -0
  27. package/dist/registry.js +158 -0
  28. package/dist/svelte/components/Stretch.svelte.d.ts +4 -2
  29. package/dist/svelte/index.d.ts +1 -0
  30. package/dist/svelte/index.js +14021 -13833
  31. package/dist/svelte/utils/generatePresetCode.js +13 -0
  32. package/dist/vue/components/Stretch.vue.d.ts +57 -0
  33. package/dist/vue/components/Stretch.vue.d.ts.map +1 -0
  34. package/dist/vue/{generatePresetCode-D4V6rBae.js → generatePresetCode-DoYZnbEH.js} +13 -0
  35. package/dist/vue/index.d.ts +1 -0
  36. package/dist/vue/index.d.ts.map +1 -1
  37. package/dist/vue/index.js +12577 -12373
  38. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  39. package/dist/vue/utils/generatePresetCode.js +1 -1
  40. package/package.json +6 -1
  41. /package/dist/core/{Swirl-BoveqtNV.js → Swirl-BpMwkNcm.js} +0 -0
  42. /package/dist/core/{TiltShift-D53azmRe.js → TiltShift-D31nakFq.js} +0 -0
  43. /package/dist/core/{Tritone-Cg1rX-hL.js → Tritone-Dx48G3b1.js} +0 -0
  44. /package/dist/core/{Twirl-raO5pe5X.js → Twirl-ng6pwyl2.js} +0 -0
  45. /package/dist/core/{Vibrance-DtekSkcz.js → Vibrance-D0ArL0qp.js} +0 -0
  46. /package/dist/core/{WaveDistortion-C65qO_cZ.js → WaveDistortion-DGKrpUdb.js} +0 -0
  47. /package/dist/core/{ZoomBlur-B97ZjhXe.js → ZoomBlur-uQyy5yko.js} +0 -0
@@ -1,13 +1,13 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d={AngularBlur:{opacity:1,blendMode:"normal",intensity:20,center:{x:.5,y:.5}},Ascii:{opacity:1,blendMode:"normal",characters:"@%#*+=-:.",cellSize:30,fontFamily:"JetBrains Mono",spacing:1},Blob:{opacity:1,blendMode:"normal",colorA:"#ff6b35",colorB:"#e91e63",size:.5,deformation:.5,softness:.5,highlightIntensity:.5,highlightX:.3,highlightY:-.3,highlightZ:.4,highlightColor:"#ffe11a",speed:.5,seed:1,center:{x:.5,y:.5},colorSpace:"linear"},Blur:{opacity:1,blendMode:"normal",intensity:50},Bulge:{opacity:1,blendMode:"normal",center:{x:.5,y:.5},strength:1,radius:1,falloff:.5,edges:"stretch"},ChannelBlur:{opacity:1,blendMode:"normal",redIntensity:0,greenIntensity:20,blueIntensity:40},Checkerboard:{opacity:1,blendMode:"normal",colorA:"#cccccc",colorB:"#999999",cells:8,softness:0,colorSpace:"linear"},ChromaFlow:{opacity:1,blendMode:"normal",baseColor:"#0066ff",upColor:"#00ff00",downColor:"#ff0000",leftColor:"#0000ff",rightColor:"#ffff00",intensity:1,radius:2,momentum:30},ChromaticAberration:{opacity:1,blendMode:"normal",strength:.2,angle:0,redOffset:-1,greenOffset:0,blueOffset:1},Circle:{opacity:1,blendMode:"normal",color:"#ffffff",radius:1,softness:0,center:{x:.5,y:.5}},CRTScreen:{opacity:1,blendMode:"normal",pixelSize:128,colorShift:1,scanlineIntensity:.3,scanlineFrequency:200,brightness:1.1,contrast:1.2},CursorTrail:{opacity:1,blendMode:"normal",colorA:"#00aaff",colorB:"#ff00aa",radius:.5,length:.5,shrink:1,colorSpace:"linear"},DiffuseBlur:{opacity:1,blendMode:"normal",intensity:30},Dither:{opacity:1,blendMode:"normal",pixelSize:4,threshold:.5,colorA:"transparent",colorB:"#ffffff"},DotGrid:{opacity:1,blendMode:"normal",color:"#ffffff",density:100,dotSize:.3,twinkle:0},Duotone:{opacity:1,blendMode:"normal",colorA:"#ff0000",colorB:"#023af4",blend:.5,colorSpace:"linear"},FilmGrain:{opacity:1,blendMode:"normal",strength:.5},FloatingParticles:{opacity:1,blendMode:"normal",randomness:.25,speed:.25,angle:90,particleSize:1,particleSoftness:0,twinkle:.5,count:5,particleColor:"#ffffff",speedVariance:.3,angleVariance:30,particleDensity:3},GlassTiles:{opacity:1,blendMode:"normal",intensity:1,tileCount:100},Glow:{opacity:1,blendMode:"normal",intensity:1,threshold:.5,size:10},Godrays:{opacity:1,blendMode:"normal",center:{x:0,y:0},density:.3,intensity:.8,spotty:1,speed:.5,rayColor:"#4283fb",backgroundColor:"transparent"},Grid:{opacity:1,blendMode:"normal",color:"#ffffff",cells:10,thickness:1},GridDistortion:{opacity:1,blendMode:"normal",intensity:1,swirl:0,decay:3,radius:1,gridSize:20,edges:"stretch"},Halftone:{opacity:1,blendMode:"normal",frequency:100,angle:45,smoothness:.1},HueShift:{opacity:1,blendMode:"normal",shift:0},ImageTexture:{opacity:1,blendMode:"normal",url:"https://shaders.com/sample.jpg",objectFit:"cover"},LinearBlur:{opacity:1,blendMode:"normal",intensity:30,angle:0},LinearGradient:{opacity:1,blendMode:"normal",colorA:"#1aff00",colorB:"#0000ff",start:{x:0,y:.5},end:{x:1,y:.5},angle:0,edges:"stretch",colorSpace:"linear"},Liquify:{opacity:1,blendMode:"normal",intensity:1,swirl:0,decay:3,radius:1,edges:"stretch"},Pixelate:{opacity:1,blendMode:"normal",scale:50},PolarCoordinates:{opacity:1,blendMode:"normal",center:{x:.5,y:.5},wrap:1,radius:1,intensity:1,edges:"transparent"},Posterize:{opacity:1,blendMode:"normal",intensity:5},ProgressiveBlur:{opacity:1,blendMode:"normal",intensity:50,angle:0,center:{x:0,y:.5},falloff:1},RadialGradient:{opacity:1,blendMode:"normal",colorA:"#ff0000",colorB:"#0000ff",center:{x:.5,y:.5},radius:1,colorSpace:"linear"},RectangularCoordinates:{opacity:1,blendMode:"normal",center:{x:.5,y:.5},scale:1,intensity:1,edges:"transparent"},Ripples:{opacity:1,blendMode:"normal",center:{x:.5,y:.5},colorA:"#ffffff",colorB:"#000000",speed:1,frequency:20,softness:0,thickness:.5,phase:0},Saturation:{opacity:1,blendMode:"normal",intensity:1},SimplexNoise:{opacity:1,blendMode:"normal",colorA:"#ffffff",colorB:"#000000",scale:2,balance:0,contrast:0,seed:0,speed:1},SineWave:{opacity:1,blendMode:"normal",color:"#ffffff",amplitude:.15,frequency:1,speed:1,angle:0,position:{x:.5,y:.5},thickness:.2,softness:.4},SolidColor:{opacity:1,blendMode:"normal",color:"#5b18ca"},Spiral:{opacity:1,blendMode:"normal",colorA:"#000000",colorB:"#ffffff",strokeWidth:.5,strokeFalloff:0,softness:0,speed:1,center:{x:.5,y:.5},scale:1,colorSpace:"linear"},Strands:{opacity:1,blendMode:"normal",speed:.5,amplitude:1,frequency:1,lineCount:12,lineWidth:.1,waveColor:"#f1c907",pinEdges:!0,start:{x:0,y:.5},end:{x:1,y:.5}},Swirl:{opacity:1,blendMode:"normal",colorA:"#1275d8",colorB:"#e19136",speed:1,detail:1,blend:50,coarseX:50,coarseY:50,mediumX:50,mediumY:50,fineX:50,fineY:50,colorSpace:"linear"},TiltShift:{opacity:1,blendMode:"normal",intensity:50,width:.3,falloff:.3,angle:0,center:{x:.5,y:.5}},Tritone:{opacity:1,blendMode:"normal",colorA:"#ce1bea",colorB:"#2fff00",colorC:"#ffff00",blendMid:.5,colorSpace:"linear"},Twirl:{opacity:1,blendMode:"normal",center:{x:.5,y:.5},intensity:1,edges:"stretch"},Vibrance:{opacity:1,blendMode:"normal",intensity:0},WaveDistortion:{opacity:1,blendMode:"normal",strength:.3,frequency:1,speed:1,angle:0,waveType:"sine",edges:"stretch"},ZoomBlur:{opacity:1,blendMode:"normal",intensity:30,center:{x:.5,y:.5}},Grayscale:{opacity:1,blendMode:"normal"},Group:{opacity:1,blendMode:"normal"},Invert:{opacity:1,blendMode:"normal"}};function f(n,t,i=" "){return Object.entries(n).filter(([e,o])=>{const r=d[t]||{};if(r.hasOwnProperty(e)){const l=r[e];return typeof o=="object"&&typeof l=="object"?JSON.stringify(o)!==JSON.stringify(l):o!==l}return!(e==="opacity"&&o===1||e==="blendMode"&&o==="normal")}).map(([e,o])=>typeof o=="string"?`${e}="${o}"`:typeof o=="object"?`${e}={${JSON.stringify(o)}}`:`${e}={${o}}`).join(`
2
- `+i+" ")}function p(n,t){const i=[];function e(o){for(const r of o)i.push(r),r.children&&e(r.children)}return e(t),i.some(o=>o.props?.maskSource===n)}function y(n){const t=(e,o=" ")=>{const r=e.props?f(e.props,e.type,o):"";let l="";e.id&&p(e.id,n.components)&&(l=`id="${e.id}"`);const a=[l,r].filter(Boolean).join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d={AngularBlur:{opacity:1,blendMode:"normal",intensity:20,center:{x:.5,y:.5}},Ascii:{opacity:1,blendMode:"normal",characters:"@%#*+=-:.",cellSize:30,fontFamily:"JetBrains Mono",spacing:1},Blob:{opacity:1,blendMode:"normal",colorA:"#ff6b35",colorB:"#e91e63",size:.5,deformation:.5,softness:.5,highlightIntensity:.5,highlightX:.3,highlightY:-.3,highlightZ:.4,highlightColor:"#ffe11a",speed:.5,seed:1,center:{x:.5,y:.5},colorSpace:"linear"},Blur:{opacity:1,blendMode:"normal",intensity:50},Bulge:{opacity:1,blendMode:"normal",center:{x:.5,y:.5},strength:1,radius:1,falloff:.5,edges:"stretch"},ChannelBlur:{opacity:1,blendMode:"normal",redIntensity:0,greenIntensity:20,blueIntensity:40},Checkerboard:{opacity:1,blendMode:"normal",colorA:"#cccccc",colorB:"#999999",cells:8,softness:0,colorSpace:"linear"},ChromaFlow:{opacity:1,blendMode:"normal",baseColor:"#0066ff",upColor:"#00ff00",downColor:"#ff0000",leftColor:"#0000ff",rightColor:"#ffff00",intensity:1,radius:2,momentum:30},ChromaticAberration:{opacity:1,blendMode:"normal",strength:.2,angle:0,redOffset:-1,greenOffset:0,blueOffset:1},Circle:{opacity:1,blendMode:"normal",color:"#ffffff",radius:1,softness:0,center:{x:.5,y:.5}},CRTScreen:{opacity:1,blendMode:"normal",pixelSize:128,colorShift:1,scanlineIntensity:.3,scanlineFrequency:200,brightness:1.1,contrast:1.2},CursorTrail:{opacity:1,blendMode:"normal",colorA:"#00aaff",colorB:"#ff00aa",radius:.5,length:.5,shrink:1,colorSpace:"linear"},DiffuseBlur:{opacity:1,blendMode:"normal",intensity:30},Dither:{opacity:1,blendMode:"normal",pixelSize:4,threshold:.5,colorA:"transparent",colorB:"#ffffff"},DotGrid:{opacity:1,blendMode:"normal",color:"#ffffff",density:100,dotSize:.3,twinkle:0},Duotone:{opacity:1,blendMode:"normal",colorA:"#ff0000",colorB:"#023af4",blend:.5,colorSpace:"linear"},FilmGrain:{opacity:1,blendMode:"normal",strength:.5},FloatingParticles:{opacity:1,blendMode:"normal",randomness:.25,speed:.25,angle:90,particleSize:1,particleSoftness:0,twinkle:.5,count:5,particleColor:"#ffffff",speedVariance:.3,angleVariance:30,particleDensity:3},GlassTiles:{opacity:1,blendMode:"normal",intensity:1,tileCount:100},Glow:{opacity:1,blendMode:"normal",intensity:1,threshold:.5,size:10},Godrays:{opacity:1,blendMode:"normal",center:{x:0,y:0},density:.3,intensity:.8,spotty:1,speed:.5,rayColor:"#4283fb",backgroundColor:"transparent"},Grid:{opacity:1,blendMode:"normal",color:"#ffffff",cells:10,thickness:1},GridDistortion:{opacity:1,blendMode:"normal",intensity:1,swirl:0,decay:3,radius:1,gridSize:20,edges:"stretch"},Halftone:{opacity:1,blendMode:"normal",frequency:100,angle:45,smoothness:.1},HueShift:{opacity:1,blendMode:"normal",shift:0},ImageTexture:{opacity:1,blendMode:"normal",url:"https://shaders.com/sample.jpg",objectFit:"cover"},LinearBlur:{opacity:1,blendMode:"normal",intensity:30,angle:0},LinearGradient:{opacity:1,blendMode:"normal",colorA:"#1aff00",colorB:"#0000ff",start:{x:0,y:.5},end:{x:1,y:.5},angle:0,edges:"stretch",colorSpace:"linear"},Liquify:{opacity:1,blendMode:"normal",intensity:1,swirl:0,decay:3,radius:1,edges:"stretch"},Pixelate:{opacity:1,blendMode:"normal",scale:50},PolarCoordinates:{opacity:1,blendMode:"normal",center:{x:.5,y:.5},wrap:1,radius:1,intensity:1,edges:"transparent"},Posterize:{opacity:1,blendMode:"normal",intensity:5},ProgressiveBlur:{opacity:1,blendMode:"normal",intensity:50,angle:0,center:{x:0,y:.5},falloff:1},RadialGradient:{opacity:1,blendMode:"normal",colorA:"#ff0000",colorB:"#0000ff",center:{x:.5,y:.5},radius:1,colorSpace:"linear"},RectangularCoordinates:{opacity:1,blendMode:"normal",center:{x:.5,y:.5},scale:1,intensity:1,edges:"transparent"},Ripples:{opacity:1,blendMode:"normal",center:{x:.5,y:.5},colorA:"#ffffff",colorB:"#000000",speed:1,frequency:20,softness:0,thickness:.5,phase:0},Saturation:{opacity:1,blendMode:"normal",intensity:1},SimplexNoise:{opacity:1,blendMode:"normal",colorA:"#ffffff",colorB:"#000000",scale:2,balance:0,contrast:0,seed:0,speed:1},SineWave:{opacity:1,blendMode:"normal",color:"#ffffff",amplitude:.15,frequency:1,speed:1,angle:0,position:{x:.5,y:.5},thickness:.2,softness:.4},SolidColor:{opacity:1,blendMode:"normal",color:"#5b18ca"},Spiral:{opacity:1,blendMode:"normal",colorA:"#000000",colorB:"#ffffff",strokeWidth:.5,strokeFalloff:0,softness:0,speed:1,center:{x:.5,y:.5},scale:1,colorSpace:"linear"},Strands:{opacity:1,blendMode:"normal",speed:.5,amplitude:1,frequency:1,lineCount:12,lineWidth:.1,waveColor:"#f1c907",pinEdges:!0,start:{x:0,y:.5},end:{x:1,y:.5}},Stretch:{opacity:1,blendMode:"normal",center:{x:.5,y:.5},strength:.5,angle:0,falloff:.5,edges:"stretch"},Swirl:{opacity:1,blendMode:"normal",colorA:"#1275d8",colorB:"#e19136",speed:1,detail:1,blend:50,coarseX:50,coarseY:50,mediumX:50,mediumY:50,fineX:50,fineY:50,colorSpace:"linear"},TiltShift:{opacity:1,blendMode:"normal",intensity:50,width:.3,falloff:.3,angle:0,center:{x:.5,y:.5}},Tritone:{opacity:1,blendMode:"normal",colorA:"#ce1bea",colorB:"#2fff00",colorC:"#ffff00",blendMid:.5,colorSpace:"linear"},Twirl:{opacity:1,blendMode:"normal",center:{x:.5,y:.5},intensity:1,edges:"stretch"},Vibrance:{opacity:1,blendMode:"normal",intensity:0},WaveDistortion:{opacity:1,blendMode:"normal",strength:.3,frequency:1,speed:1,angle:0,waveType:"sine",edges:"stretch"},ZoomBlur:{opacity:1,blendMode:"normal",intensity:30,center:{x:.5,y:.5}},Grayscale:{opacity:1,blendMode:"normal"},Group:{opacity:1,blendMode:"normal"},Invert:{opacity:1,blendMode:"normal"}};function f(n,t,a=" "){return Object.entries(n).filter(([e,o])=>{const r=d[t]||{};if(r.hasOwnProperty(e)){const l=r[e];return typeof o=="object"&&typeof l=="object"?JSON.stringify(o)!==JSON.stringify(l):o!==l}return!(e==="opacity"&&o===1||e==="blendMode"&&o==="normal")}).map(([e,o])=>typeof o=="string"?`${e}="${o}"`:typeof o=="object"?`${e}={${JSON.stringify(o)}}`:`${e}={${o}}`).join(`
2
+ `+a+" ")}function p(n,t){const a=[];function e(o){for(const r of o)a.push(r),r.children&&e(r.children)}return e(t),a.some(o=>o.props?.maskSource===n)}function y(n){const t=(e,o=" ")=>{const r=e.props?f(e.props,e.type,o):"";let l="";e.id&&p(e.id,n.components)&&(l=`id="${e.id}"`);const i=[l,r].filter(Boolean).join(`
3
3
  `+o+" ");if(e.children&&e.children.length>0){const s=e.children.map(c=>t(c,o+" ")).join(`
4
- `);return a?`${o}<${e.type}
5
- ${o} ${a}>
4
+ `);return i?`${o}<${e.type}
5
+ ${o} ${i}>
6
6
  ${s}
7
7
  ${o}</${e.type}>`:`${o}<${e.type}>
8
8
  ${s}
9
- ${o}</${e.type}>`}else return a?`${o}<${e.type}
10
- ${o} ${a} />`:`${o}<${e.type} />`};return`<Shader>
9
+ ${o}</${e.type}>`}else return i?`${o}<${e.type}
10
+ ${o} ${i} />`:`${o}<${e.type} />`};return`<Shader>
11
11
  ${n.components.map(e=>t(e)).join(`
12
12
  `)}
13
- </Shader>`}const m=["AngularBlur","Ascii","Blob","Blur","Bulge","CRTScreen","ChannelBlur","Checkerboard","ChromaFlow","ChromaticAberration","Circle","CursorTrail","DiffuseBlur","Dither","DotGrid","Duotone","FilmGrain","FloatingParticles","GlassTiles","Glow","Godrays","Grayscale","Grid","GridDistortion","Group","Halftone","HueShift","ImageTexture","Invert","LinearBlur","LinearGradient","Liquify","Pixelate","PolarCoordinates","Posterize","ProgressiveBlur","RadialGradient","RectangularCoordinates","Ripples","Saturation","SimplexNoise","SineWave","SolidColor","Spiral","Strands","Swirl","TiltShift","Tritone","Twirl","Vibrance","WaveDistortion","ZoomBlur"];exports.availableComponents=m;exports.generatePresetCode=y;
13
+ </Shader>`}const m=["AngularBlur","Ascii","Blob","Blur","Bulge","CRTScreen","ChannelBlur","Checkerboard","ChromaFlow","ChromaticAberration","Circle","CursorTrail","DiffuseBlur","Dither","DotGrid","Duotone","FilmGrain","FloatingParticles","GlassTiles","Glow","Godrays","Grayscale","Grid","GridDistortion","Group","Halftone","HueShift","ImageTexture","Invert","LinearBlur","LinearGradient","Liquify","Pixelate","PolarCoordinates","Posterize","ProgressiveBlur","RadialGradient","RectangularCoordinates","Ripples","Saturation","SimplexNoise","SineWave","SolidColor","Spiral","Strands","Stretch","Swirl","TiltShift","Tritone","Twirl","Vibrance","WaveDistortion","ZoomBlur"];exports.availableComponents=m;exports.generatePresetCode=y;
@@ -1 +1 @@
1
- {"version":3,"file":"generatePresetCode.d.ts","sourceRoot":"","sources":["../../src/utils/generatePresetCode.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAC7B;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,eAAe,EAAE,CAAA;CAC9B;AA0iBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,UAsD/B,CAAA"}
1
+ {"version":3,"file":"generatePresetCode.d.ts","sourceRoot":"","sources":["../../src/utils/generatePresetCode.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAC7B;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,eAAe,EAAE,CAAA;CAC9B;AAsjBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,UAuD/B,CAAA"}
@@ -407,6 +407,18 @@ const d = {
407
407
  y: 0.5
408
408
  }
409
409
  },
410
+ Stretch: {
411
+ opacity: 1,
412
+ blendMode: "normal",
413
+ center: {
414
+ x: 0.5,
415
+ y: 0.5
416
+ },
417
+ strength: 0.5,
418
+ angle: 0,
419
+ falloff: 0.5,
420
+ edges: "stretch"
421
+ },
410
422
  Swirl: {
411
423
  opacity: 1,
412
424
  blendMode: "normal",
@@ -584,6 +596,7 @@ const m = [
584
596
  "SolidColor",
585
597
  "Spiral",
586
598
  "Strands",
599
+ "Stretch",
587
600
  "Swirl",
588
601
  "TiltShift",
589
602
  "Tritone",
package/dist/registry.js CHANGED
@@ -5187,6 +5187,164 @@ export const shaderRegistry = [
5187
5187
  }
5188
5188
  }
5189
5189
  },
5190
+ {
5191
+ "name": "Stretch",
5192
+ "category": "Distortions",
5193
+ "description": "Stretch content towards a direction from a center point",
5194
+ "fileName": "Stretch",
5195
+ "requiresChild": true,
5196
+ "definition": {
5197
+ "name": "Stretch",
5198
+ "category": "Distortions",
5199
+ "description": "Stretch content towards a direction from a center point",
5200
+ "requiresRTT": true,
5201
+ "requiresChild": true,
5202
+ "props": {
5203
+ "center": {
5204
+ "default": {
5205
+ "x": 0.5,
5206
+ "y": 0.5
5207
+ },
5208
+ "description": "The center point of the stretch effect",
5209
+ "ui": {
5210
+ "type": "position",
5211
+ "label": "Center"
5212
+ }
5213
+ },
5214
+ "strength": {
5215
+ "default": 1,
5216
+ "description": "The intensity of the stretch effect",
5217
+ "ui": {
5218
+ "type": "range",
5219
+ "min": 0,
5220
+ "max": 1,
5221
+ "step": 0.01,
5222
+ "label": "Strength"
5223
+ }
5224
+ },
5225
+ "angle": {
5226
+ "default": 0,
5227
+ "description": "The direction of the stretch in degrees",
5228
+ "ui": {
5229
+ "type": "range",
5230
+ "min": 0,
5231
+ "max": 360,
5232
+ "step": 1,
5233
+ "label": "Angle"
5234
+ }
5235
+ },
5236
+ "falloff": {
5237
+ "default": 0,
5238
+ "description": "Controls the sharpness of the transition (0 = sharp edge, 1 = gradual transition)",
5239
+ "ui": {
5240
+ "type": "range",
5241
+ "min": 0,
5242
+ "max": 1,
5243
+ "step": 0.01,
5244
+ "label": "Falloff"
5245
+ }
5246
+ },
5247
+ "edges": {
5248
+ "default": "stretch",
5249
+ "description": "How to handle edges when distortion pushes content out of bounds",
5250
+ "ui": {
5251
+ "type": "select",
5252
+ "options": [
5253
+ {
5254
+ "label": "Stretch",
5255
+ "value": "stretch"
5256
+ },
5257
+ {
5258
+ "label": "Transparent",
5259
+ "value": "transparent"
5260
+ },
5261
+ {
5262
+ "label": "Mirror",
5263
+ "value": "mirror"
5264
+ },
5265
+ {
5266
+ "label": "Wrap",
5267
+ "value": "wrap"
5268
+ }
5269
+ ],
5270
+ "label": "Edges"
5271
+ }
5272
+ }
5273
+ }
5274
+ },
5275
+ "propsMetadata": {
5276
+ "center": {
5277
+ "ui": {
5278
+ "type": "position",
5279
+ "label": "Center"
5280
+ },
5281
+ "default": {
5282
+ "x": 0.5,
5283
+ "y": 0.5
5284
+ },
5285
+ "description": "The center point of the stretch effect"
5286
+ },
5287
+ "strength": {
5288
+ "ui": {
5289
+ "type": "range",
5290
+ "min": 0,
5291
+ "max": 1,
5292
+ "step": 0.01,
5293
+ "label": "Strength"
5294
+ },
5295
+ "default": 1,
5296
+ "description": "The intensity of the stretch effect"
5297
+ },
5298
+ "angle": {
5299
+ "ui": {
5300
+ "type": "range",
5301
+ "min": 0,
5302
+ "max": 360,
5303
+ "step": 1,
5304
+ "label": "Angle"
5305
+ },
5306
+ "default": 0,
5307
+ "description": "The direction of the stretch in degrees"
5308
+ },
5309
+ "falloff": {
5310
+ "ui": {
5311
+ "type": "range",
5312
+ "min": 0,
5313
+ "max": 1,
5314
+ "step": 0.01,
5315
+ "label": "Falloff"
5316
+ },
5317
+ "default": 0,
5318
+ "description": "Controls the sharpness of the transition (0 = sharp edge, 1 = gradual transition)"
5319
+ },
5320
+ "edges": {
5321
+ "ui": {
5322
+ "type": "select",
5323
+ "options": [
5324
+ {
5325
+ "label": "Stretch",
5326
+ "value": "stretch"
5327
+ },
5328
+ {
5329
+ "label": "Transparent",
5330
+ "value": "transparent"
5331
+ },
5332
+ {
5333
+ "label": "Mirror",
5334
+ "value": "mirror"
5335
+ },
5336
+ {
5337
+ "label": "Wrap",
5338
+ "value": "wrap"
5339
+ }
5340
+ ],
5341
+ "label": "Edges"
5342
+ },
5343
+ "default": "stretch",
5344
+ "description": "How to handle edges when distortion pushes content out of bounds"
5345
+ }
5346
+ }
5347
+ },
5190
5348
  {
5191
5349
  "name": "Swirl",
5192
5350
  "category": "Base Layers",
@@ -1,15 +1,17 @@
1
- import { type BlendMode } from 'shaders/core';
1
+ import { type BlendMode, type TransformConfig } from 'shaders/core';
2
2
  import { type ComponentProps } from 'shaders/core/Stretch';
3
3
  /**
4
- * Define component props including blend mode, opacity, and masking
4
+ * Define component props including blend mode, opacity, visibility, masking, and transformation
5
5
  */
6
6
  interface ExtendedComponentProps extends Partial<ComponentProps> {
7
7
  blendMode?: BlendMode;
8
8
  opacity?: number;
9
+ visible?: boolean;
9
10
  id?: string;
10
11
  maskSource?: string;
11
12
  maskType?: string;
12
13
  renderOrder?: number;
14
+ transform?: Partial<TransformConfig>;
13
15
  children?: import('svelte').Snippet;
14
16
  }
15
17
  declare const Stretch: import("svelte").Component<ExtendedComponentProps, {}, "">;
@@ -43,6 +43,7 @@ export { default as SineWave } from './components/SineWave.svelte';
43
43
  export { default as SolidColor } from './components/SolidColor.svelte';
44
44
  export { default as Spiral } from './components/Spiral.svelte';
45
45
  export { default as Strands } from './components/Strands.svelte';
46
+ export { default as Stretch } from './components/Stretch.svelte';
46
47
  export { default as Swirl } from './components/Swirl.svelte';
47
48
  export { default as TiltShift } from './components/TiltShift.svelte';
48
49
  export { default as Tritone } from './components/Tritone.svelte';