shaders 2.2.40 → 2.2.42

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 (77) hide show
  1. package/dist/core/Shatter-COjV2jLy.js +299 -0
  2. package/dist/core/Stripes-BbNFX05u.js +127 -0
  3. package/dist/core/index.js +41 -37
  4. package/dist/core/shaderRegistry.d.ts.map +1 -1
  5. package/dist/core/shaders/Shatter/index.d.ts +70 -0
  6. package/dist/core/shaders/Shatter/index.d.ts.map +1 -0
  7. package/dist/core/shaders/Shatter/index.js +4 -0
  8. package/dist/core/shaders/SimplexNoise/index.js +1 -1
  9. package/dist/core/shaders/SineWave/index.js +1 -1
  10. package/dist/core/shaders/SolidColor/index.js +1 -1
  11. package/dist/core/shaders/Spherize/index.js +1 -1
  12. package/dist/core/shaders/Spiral/index.js +1 -1
  13. package/dist/core/shaders/Strands/index.js +1 -1
  14. package/dist/core/shaders/Stretch/index.js +1 -1
  15. package/dist/core/shaders/Stripes/index.d.ts +71 -0
  16. package/dist/core/shaders/Stripes/index.d.ts.map +1 -0
  17. package/dist/core/shaders/Stripes/index.js +5 -0
  18. package/dist/core/shaders/Swirl/index.js +1 -1
  19. package/dist/core/shaders/TiltShift/index.js +1 -1
  20. package/dist/core/shaders/Tint/index.js +1 -1
  21. package/dist/core/shaders/Tritone/index.js +1 -1
  22. package/dist/core/shaders/Twirl/index.js +1 -1
  23. package/dist/core/shaders/Vibrance/index.js +1 -1
  24. package/dist/core/shaders/WaveDistortion/index.js +1 -1
  25. package/dist/core/shaders/ZoomBlur/index.js +1 -1
  26. package/dist/react/components/Shatter.d.ts +31 -0
  27. package/dist/react/components/Shatter.d.ts.map +1 -0
  28. package/dist/react/components/Stripes.d.ts +31 -0
  29. package/dist/react/components/Stripes.d.ts.map +1 -0
  30. package/dist/react/{generatePresetCode-BCeSxN_V.js → generatePresetCode-BrkW1bEe.js} +28 -0
  31. package/dist/react/index.d.ts +2 -0
  32. package/dist/react/index.d.ts.map +1 -1
  33. package/dist/react/index.js +702 -424
  34. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  35. package/dist/react/utils/generatePresetCode.js +1 -1
  36. package/dist/registry.js +469 -0
  37. package/dist/solid/components/Shatter.d.ts +28 -0
  38. package/dist/solid/components/Shatter.d.ts.map +1 -0
  39. package/dist/solid/components/Stripes.d.ts +28 -0
  40. package/dist/solid/components/Stripes.d.ts.map +1 -0
  41. package/dist/solid/index.d.ts +2 -0
  42. package/dist/solid/index.d.ts.map +1 -1
  43. package/dist/solid/index.js +645 -361
  44. package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
  45. package/dist/solid/utils/generatePresetCode.js +28 -0
  46. package/dist/svelte/components/Shatter.svelte.d.ts +19 -0
  47. package/dist/svelte/components/Stripes.svelte.d.ts +19 -0
  48. package/dist/svelte/{generatePresetCode-BFY8wlyB.js → generatePresetCode-bx7z5wvC.js} +28 -0
  49. package/dist/svelte/index.d.ts +2 -0
  50. package/dist/svelte/index.js +254 -32
  51. package/dist/svelte/utils/generatePresetCode.js +1 -1
  52. package/dist/vue/components/Shatter.vue.d.ts +57 -0
  53. package/dist/vue/components/Shatter.vue.d.ts.map +1 -0
  54. package/dist/vue/components/Stripes.vue.d.ts +57 -0
  55. package/dist/vue/components/Stripes.vue.d.ts.map +1 -0
  56. package/dist/vue/{generatePresetCode-D3MinGC_.js → generatePresetCode-_7ZzqQPH.js} +28 -0
  57. package/dist/vue/index.d.ts +2 -0
  58. package/dist/vue/index.d.ts.map +1 -1
  59. package/dist/vue/index.js +379 -121
  60. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  61. package/dist/vue/utils/generatePresetCode.js +1 -1
  62. package/package.json +17 -1
  63. /package/dist/core/{SimplexNoise-CMMeggo6.js → SimplexNoise-Ce79jgYM.js} +0 -0
  64. /package/dist/core/{SineWave-DVVLqHPw.js → SineWave-Cv2gOU8a.js} +0 -0
  65. /package/dist/core/{SolidColor-zYROg_aE.js → SolidColor-DFkDBFq3.js} +0 -0
  66. /package/dist/core/{Spherize-tsKMpSaS.js → Spherize-R-s4pX9t.js} +0 -0
  67. /package/dist/core/{Spiral-DDyVSeG_.js → Spiral-W4dALX1z.js} +0 -0
  68. /package/dist/core/{Strands-B9vY4uA7.js → Strands-DtN5POfO.js} +0 -0
  69. /package/dist/core/{Stretch-BhHjbcqd.js → Stretch-BzvP_hdu.js} +0 -0
  70. /package/dist/core/{Swirl-DoCDBZad.js → Swirl-CfsYsr4X.js} +0 -0
  71. /package/dist/core/{TiltShift-BYQjUHpn.js → TiltShift-B6gbm7Z8.js} +0 -0
  72. /package/dist/core/{Tint-BUFsUBqI.js → Tint-CpnitsHw.js} +0 -0
  73. /package/dist/core/{Tritone-DS1QbB-T.js → Tritone-DzvSKVfR.js} +0 -0
  74. /package/dist/core/{Twirl-w3PgFOlA.js → Twirl-BXH4uAd6.js} +0 -0
  75. /package/dist/core/{Vibrance--gtdjy4j.js → Vibrance-ByN9bRgU.js} +0 -0
  76. /package/dist/core/{WaveDistortion-BfhB1rjJ.js → WaveDistortion-BA1PyqYH.js} +0 -0
  77. /package/dist/core/{ZoomBlur-DxUocLAG.js → ZoomBlur-CTrw7HxX.js} +0 -0
@@ -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;AA0rBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,UA6D/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;AAotBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,UA+D/B,CAAA"}
@@ -419,6 +419,19 @@ const shaderMetadata = {
419
419
  "blendMode": "normal",
420
420
  "sharpness": 0
421
421
  },
422
+ "Shatter": {
423
+ "opacity": 1,
424
+ "blendMode": "normal",
425
+ "crackWidth": 1,
426
+ "intensity": 4,
427
+ "radius": 0.4,
428
+ "decay": 1,
429
+ "seed": 2,
430
+ "chromaticSplit": 1,
431
+ "refractionStrength": 5,
432
+ "shardLighting": 0.1,
433
+ "edges": "mirror"
434
+ },
422
435
  "SimplexNoise": {
423
436
  "opacity": 1,
424
437
  "blendMode": "normal",
@@ -514,6 +527,19 @@ const shaderMetadata = {
514
527
  "falloff": 0,
515
528
  "edges": "stretch"
516
529
  },
530
+ "Stripes": {
531
+ "opacity": 1,
532
+ "blendMode": "normal",
533
+ "colorA": "#000000",
534
+ "colorB": "#ffffff",
535
+ "angle": 45,
536
+ "density": 5,
537
+ "balance": 0.5,
538
+ "softness": 0,
539
+ "speed": 0.2,
540
+ "offset": 0,
541
+ "colorSpace": "linear"
542
+ },
517
543
  "Swirl": {
518
544
  "opacity": 1,
519
545
  "blendMode": "normal",
@@ -745,6 +771,7 @@ const availableComponents = [
745
771
  "Ripples",
746
772
  "Saturation",
747
773
  "Sharpness",
774
+ "Shatter",
748
775
  "SimplexNoise",
749
776
  "SineWave",
750
777
  "SolidColor",
@@ -752,6 +779,7 @@ const availableComponents = [
752
779
  "Spiral",
753
780
  "Strands",
754
781
  "Stretch",
782
+ "Stripes",
755
783
  "Swirl",
756
784
  "TiltShift",
757
785
  "Tint",
@@ -0,0 +1,19 @@
1
+ import { type BlendMode, type TransformConfig } from '../../core';
2
+ import { type ComponentProps } from '../../core/shaders/Shatter';
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 Shatter: import("svelte").Component<ExtendedComponentProps, {}, "">;
18
+ type Shatter = ReturnType<typeof Shatter>;
19
+ export default Shatter;
@@ -0,0 +1,19 @@
1
+ import { type BlendMode, type TransformConfig } from '../../core';
2
+ import { type ComponentProps } from '../../core/shaders/Stripes';
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 Stripes: import("svelte").Component<ExtendedComponentProps, {}, "">;
18
+ type Stripes = ReturnType<typeof Stripes>;
19
+ export default Stripes;
@@ -417,6 +417,19 @@ var shaderMetadata = {
417
417
  "blendMode": "normal",
418
418
  "sharpness": 0
419
419
  },
420
+ "Shatter": {
421
+ "opacity": 1,
422
+ "blendMode": "normal",
423
+ "crackWidth": 1,
424
+ "intensity": 4,
425
+ "radius": .4,
426
+ "decay": 1,
427
+ "seed": 2,
428
+ "chromaticSplit": 1,
429
+ "refractionStrength": 5,
430
+ "shardLighting": .1,
431
+ "edges": "mirror"
432
+ },
420
433
  "SimplexNoise": {
421
434
  "opacity": 1,
422
435
  "blendMode": "normal",
@@ -512,6 +525,19 @@ var shaderMetadata = {
512
525
  "falloff": 0,
513
526
  "edges": "stretch"
514
527
  },
528
+ "Stripes": {
529
+ "opacity": 1,
530
+ "blendMode": "normal",
531
+ "colorA": "#000000",
532
+ "colorB": "#ffffff",
533
+ "angle": 45,
534
+ "density": 5,
535
+ "balance": .5,
536
+ "softness": 0,
537
+ "speed": .2,
538
+ "offset": 0,
539
+ "colorSpace": "linear"
540
+ },
515
541
  "Swirl": {
516
542
  "opacity": 1,
517
543
  "blendMode": "normal",
@@ -694,6 +720,7 @@ const availableComponents = [
694
720
  "Ripples",
695
721
  "Saturation",
696
722
  "Sharpness",
723
+ "Shatter",
697
724
  "SimplexNoise",
698
725
  "SineWave",
699
726
  "SolidColor",
@@ -701,6 +728,7 @@ const availableComponents = [
701
728
  "Spiral",
702
729
  "Strands",
703
730
  "Stretch",
731
+ "Stripes",
704
732
  "Swirl",
705
733
  "TiltShift",
706
734
  "Tint",
@@ -42,6 +42,7 @@ export { default as RectangularCoordinates } from './components/RectangularCoord
42
42
  export { default as Ripples } from './components/Ripples.svelte';
43
43
  export { default as Saturation } from './components/Saturation.svelte';
44
44
  export { default as Sharpness } from './components/Sharpness.svelte';
45
+ export { default as Shatter } from './components/Shatter.svelte';
45
46
  export { default as SimplexNoise } from './components/SimplexNoise.svelte';
46
47
  export { default as SineWave } from './components/SineWave.svelte';
47
48
  export { default as SolidColor } from './components/SolidColor.svelte';
@@ -49,6 +50,7 @@ export { default as Spherize } from './components/Spherize.svelte';
49
50
  export { default as Spiral } from './components/Spiral.svelte';
50
51
  export { default as Strands } from './components/Strands.svelte';
51
52
  export { default as Stretch } from './components/Stretch.svelte';
53
+ export { default as Stripes } from './components/Stripes.svelte';
52
54
  export { default as Swirl } from './components/Swirl.svelte';
53
55
  export { default as TiltShift } from './components/TiltShift.svelte';
54
56
  export { default as Tint } from './components/Tint.svelte';
@@ -1,4 +1,4 @@
1
- import { n as generatePresetCode } from "./generatePresetCode-BFY8wlyB.js";
1
+ import { n as generatePresetCode } from "./generatePresetCode-bx7z5wvC.js";
2
2
  import "svelte/internal/disclose-version";
3
3
  import * as $ from "svelte/internal/client";
4
4
  import { getContext, onDestroy, onMount, setContext } from "svelte";
@@ -47,21 +47,23 @@ import { componentDefinition as componentDefinition$40 } from "../core/shaders/R
47
47
  import { componentDefinition as componentDefinition$41 } from "../core/shaders/Ripples/index.js";
48
48
  import { componentDefinition as componentDefinition$42 } from "../core/shaders/Saturation/index.js";
49
49
  import { componentDefinition as componentDefinition$43 } from "../core/shaders/Sharpness/index.js";
50
- import { componentDefinition as componentDefinition$44 } from "../core/shaders/SimplexNoise/index.js";
51
- import { componentDefinition as componentDefinition$45 } from "../core/shaders/SineWave/index.js";
52
- import { componentDefinition as componentDefinition$46 } from "../core/shaders/SolidColor/index.js";
53
- import { componentDefinition as componentDefinition$47 } from "../core/shaders/Spherize/index.js";
54
- import { componentDefinition as componentDefinition$48 } from "../core/shaders/Spiral/index.js";
55
- import { componentDefinition as componentDefinition$49 } from "../core/shaders/Strands/index.js";
56
- import { componentDefinition as componentDefinition$50 } from "../core/shaders/Stretch/index.js";
57
- import { componentDefinition as componentDefinition$51 } from "../core/shaders/Swirl/index.js";
58
- import { componentDefinition as componentDefinition$52 } from "../core/shaders/TiltShift/index.js";
59
- import { componentDefinition as componentDefinition$53 } from "../core/shaders/Tint/index.js";
60
- import { componentDefinition as componentDefinition$54 } from "../core/shaders/Tritone/index.js";
61
- import { componentDefinition as componentDefinition$55 } from "../core/shaders/Twirl/index.js";
62
- import { componentDefinition as componentDefinition$56 } from "../core/shaders/Vibrance/index.js";
63
- import { componentDefinition as componentDefinition$57 } from "../core/shaders/WaveDistortion/index.js";
64
- import { componentDefinition as componentDefinition$58 } from "../core/shaders/ZoomBlur/index.js";
50
+ import { componentDefinition as componentDefinition$44 } from "../core/shaders/Shatter/index.js";
51
+ import { componentDefinition as componentDefinition$45 } from "../core/shaders/SimplexNoise/index.js";
52
+ import { componentDefinition as componentDefinition$46 } from "../core/shaders/SineWave/index.js";
53
+ import { componentDefinition as componentDefinition$47 } from "../core/shaders/SolidColor/index.js";
54
+ import { componentDefinition as componentDefinition$48 } from "../core/shaders/Spherize/index.js";
55
+ import { componentDefinition as componentDefinition$49 } from "../core/shaders/Spiral/index.js";
56
+ import { componentDefinition as componentDefinition$50 } from "../core/shaders/Strands/index.js";
57
+ import { componentDefinition as componentDefinition$51 } from "../core/shaders/Stretch/index.js";
58
+ import { componentDefinition as componentDefinition$52 } from "../core/shaders/Stripes/index.js";
59
+ import { componentDefinition as componentDefinition$53 } from "../core/shaders/Swirl/index.js";
60
+ import { componentDefinition as componentDefinition$54 } from "../core/shaders/TiltShift/index.js";
61
+ import { componentDefinition as componentDefinition$55 } from "../core/shaders/Tint/index.js";
62
+ import { componentDefinition as componentDefinition$56 } from "../core/shaders/Tritone/index.js";
63
+ import { componentDefinition as componentDefinition$57 } from "../core/shaders/Twirl/index.js";
64
+ import { componentDefinition as componentDefinition$58 } from "../core/shaders/Vibrance/index.js";
65
+ import { componentDefinition as componentDefinition$59 } from "../core/shaders/WaveDistortion/index.js";
66
+ import { componentDefinition as componentDefinition$60 } from "../core/shaders/ZoomBlur/index.js";
65
67
  import { vec4 } from "three/tsl";
66
68
  import { TelemetryCollector, isExternalUser, shouldCollectTelemetry } from "../core/telemetry/index.js";
67
69
  function AngularBlur($$anchor, $$props) {
@@ -4904,7 +4906,7 @@ function Sharpness($$anchor, $$props) {
4904
4906
  children?.($$anchor);
4905
4907
  $.pop();
4906
4908
  }
4907
- function SimplexNoise($$anchor, $$props) {
4909
+ function Shatter($$anchor, $$props) {
4908
4910
  $.push($$props, true);
4909
4911
  const DEFAULT_TRANSFORM = {
4910
4912
  offsetX: 0,
@@ -5014,7 +5016,7 @@ function SimplexNoise($$anchor, $$props) {
5014
5016
  children?.($$anchor);
5015
5017
  $.pop();
5016
5018
  }
5017
- function SineWave($$anchor, $$props) {
5019
+ function SimplexNoise($$anchor, $$props) {
5018
5020
  $.push($$props, true);
5019
5021
  const DEFAULT_TRANSFORM = {
5020
5022
  offsetX: 0,
@@ -5124,7 +5126,7 @@ function SineWave($$anchor, $$props) {
5124
5126
  children?.($$anchor);
5125
5127
  $.pop();
5126
5128
  }
5127
- function SolidColor($$anchor, $$props) {
5129
+ function SineWave($$anchor, $$props) {
5128
5130
  $.push($$props, true);
5129
5131
  const DEFAULT_TRANSFORM = {
5130
5132
  offsetX: 0,
@@ -5234,7 +5236,7 @@ function SolidColor($$anchor, $$props) {
5234
5236
  children?.($$anchor);
5235
5237
  $.pop();
5236
5238
  }
5237
- function Spherize($$anchor, $$props) {
5239
+ function SolidColor($$anchor, $$props) {
5238
5240
  $.push($$props, true);
5239
5241
  const DEFAULT_TRANSFORM = {
5240
5242
  offsetX: 0,
@@ -5344,7 +5346,7 @@ function Spherize($$anchor, $$props) {
5344
5346
  children?.($$anchor);
5345
5347
  $.pop();
5346
5348
  }
5347
- function Spiral($$anchor, $$props) {
5349
+ function Spherize($$anchor, $$props) {
5348
5350
  $.push($$props, true);
5349
5351
  const DEFAULT_TRANSFORM = {
5350
5352
  offsetX: 0,
@@ -5454,7 +5456,7 @@ function Spiral($$anchor, $$props) {
5454
5456
  children?.($$anchor);
5455
5457
  $.pop();
5456
5458
  }
5457
- function Strands($$anchor, $$props) {
5459
+ function Spiral($$anchor, $$props) {
5458
5460
  $.push($$props, true);
5459
5461
  const DEFAULT_TRANSFORM = {
5460
5462
  offsetX: 0,
@@ -5564,7 +5566,7 @@ function Strands($$anchor, $$props) {
5564
5566
  children?.($$anchor);
5565
5567
  $.pop();
5566
5568
  }
5567
- function Stretch($$anchor, $$props) {
5569
+ function Strands($$anchor, $$props) {
5568
5570
  $.push($$props, true);
5569
5571
  const DEFAULT_TRANSFORM = {
5570
5572
  offsetX: 0,
@@ -5674,7 +5676,7 @@ function Stretch($$anchor, $$props) {
5674
5676
  children?.($$anchor);
5675
5677
  $.pop();
5676
5678
  }
5677
- function Swirl($$anchor, $$props) {
5679
+ function Stretch($$anchor, $$props) {
5678
5680
  $.push($$props, true);
5679
5681
  const DEFAULT_TRANSFORM = {
5680
5682
  offsetX: 0,
@@ -5784,7 +5786,7 @@ function Swirl($$anchor, $$props) {
5784
5786
  children?.($$anchor);
5785
5787
  $.pop();
5786
5788
  }
5787
- function TiltShift($$anchor, $$props) {
5789
+ function Stripes($$anchor, $$props) {
5788
5790
  $.push($$props, true);
5789
5791
  const DEFAULT_TRANSFORM = {
5790
5792
  offsetX: 0,
@@ -5894,7 +5896,7 @@ function TiltShift($$anchor, $$props) {
5894
5896
  children?.($$anchor);
5895
5897
  $.pop();
5896
5898
  }
5897
- function Tint($$anchor, $$props) {
5899
+ function Swirl($$anchor, $$props) {
5898
5900
  $.push($$props, true);
5899
5901
  const DEFAULT_TRANSFORM = {
5900
5902
  offsetX: 0,
@@ -6004,7 +6006,7 @@ function Tint($$anchor, $$props) {
6004
6006
  children?.($$anchor);
6005
6007
  $.pop();
6006
6008
  }
6007
- function Tritone($$anchor, $$props) {
6009
+ function TiltShift($$anchor, $$props) {
6008
6010
  $.push($$props, true);
6009
6011
  const DEFAULT_TRANSFORM = {
6010
6012
  offsetX: 0,
@@ -6114,7 +6116,7 @@ function Tritone($$anchor, $$props) {
6114
6116
  children?.($$anchor);
6115
6117
  $.pop();
6116
6118
  }
6117
- function Twirl($$anchor, $$props) {
6119
+ function Tint($$anchor, $$props) {
6118
6120
  $.push($$props, true);
6119
6121
  const DEFAULT_TRANSFORM = {
6120
6122
  offsetX: 0,
@@ -6224,7 +6226,7 @@ function Twirl($$anchor, $$props) {
6224
6226
  children?.($$anchor);
6225
6227
  $.pop();
6226
6228
  }
6227
- function Vibrance($$anchor, $$props) {
6229
+ function Tritone($$anchor, $$props) {
6228
6230
  $.push($$props, true);
6229
6231
  const DEFAULT_TRANSFORM = {
6230
6232
  offsetX: 0,
@@ -6334,7 +6336,7 @@ function Vibrance($$anchor, $$props) {
6334
6336
  children?.($$anchor);
6335
6337
  $.pop();
6336
6338
  }
6337
- function WaveDistortion($$anchor, $$props) {
6339
+ function Twirl($$anchor, $$props) {
6338
6340
  $.push($$props, true);
6339
6341
  const DEFAULT_TRANSFORM = {
6340
6342
  offsetX: 0,
@@ -6444,7 +6446,7 @@ function WaveDistortion($$anchor, $$props) {
6444
6446
  children?.($$anchor);
6445
6447
  $.pop();
6446
6448
  }
6447
- function ZoomBlur($$anchor, $$props) {
6449
+ function Vibrance($$anchor, $$props) {
6448
6450
  $.push($$props, true);
6449
6451
  const DEFAULT_TRANSFORM = {
6450
6452
  offsetX: 0,
@@ -6554,6 +6556,226 @@ function ZoomBlur($$anchor, $$props) {
6554
6556
  children?.($$anchor);
6555
6557
  $.pop();
6556
6558
  }
6559
+ function WaveDistortion($$anchor, $$props) {
6560
+ $.push($$props, true);
6561
+ const DEFAULT_TRANSFORM = {
6562
+ offsetX: 0,
6563
+ offsetY: 0,
6564
+ rotation: 0,
6565
+ scale: 1,
6566
+ anchorX: .5,
6567
+ anchorY: .5,
6568
+ edges: "transparent"
6569
+ };
6570
+ const componentDefaults = {
6571
+ blendMode: "normal",
6572
+ renderOrder: 0,
6573
+ visible: true,
6574
+ ...Object.entries(componentDefinition$59.props).reduce((acc, [key, config]) => {
6575
+ acc[key] = config.default;
6576
+ return acc;
6577
+ }, {})
6578
+ };
6579
+ const props = $.rest_props($$props, [
6580
+ "$$slots",
6581
+ "$$events",
6582
+ "$$legacy"
6583
+ ]);
6584
+ const blendMode = $$props.blendMode ?? componentDefaults.blendMode;
6585
+ const opacity = $$props.opacity;
6586
+ const visible = $$props.visible ?? componentDefaults.visible;
6587
+ const id = $$props.id;
6588
+ const maskSource = $$props.maskSource;
6589
+ const maskType = $$props.maskType;
6590
+ const renderOrder = $$props.renderOrder ?? componentDefaults.renderOrder;
6591
+ const { children } = props;
6592
+ const effectiveTransform = $.derived(() => ({
6593
+ ...DEFAULT_TRANSFORM,
6594
+ ...$$props.transform
6595
+ }));
6596
+ const parentId = getContext("shaderParentId");
6597
+ if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6598
+ const instanceId = id || `${componentDefinition$59.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
6599
+ setContext("shaderParentId", instanceId);
6600
+ const shaderReadyProps = $.derived(() => {
6601
+ let baseProps = { ...componentDefaults };
6602
+ for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && key !== "children") {
6603
+ const propValue = props[key];
6604
+ const defaultValue = componentDefaults[key];
6605
+ if (propValue !== void 0 && propValue !== defaultValue) baseProps[key] = propValue;
6606
+ }
6607
+ return baseProps;
6608
+ });
6609
+ const uniforms = createUniformsMap(componentDefinition$59, $.get(shaderReadyProps), instanceId);
6610
+ const parentRegister = getContext("shaderNodeRegister");
6611
+ if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6612
+ const parentUniformUpdate = getContext("shaderUniformUpdate");
6613
+ if (parentUniformUpdate === void 0) throw new Error("Shader components require shaderUniformUpdate from parent");
6614
+ const parentMetadataUpdate = getContext("shaderMetadataUpdate");
6615
+ if (parentMetadataUpdate === void 0) throw new Error("Shader components require shaderMetadataUpdate from parent");
6616
+ let isRegistered = $.state(false);
6617
+ Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
6618
+ $.user_effect(() => {
6619
+ if (!$.get(isRegistered)) return;
6620
+ if (uniform && uniform.value !== void 0) {
6621
+ const newValue = props[propName];
6622
+ if (newValue !== void 0) parentUniformUpdate(instanceId, propName, newValue);
6623
+ }
6624
+ });
6625
+ });
6626
+ $.user_effect(() => {
6627
+ if (!$.get(isRegistered)) return;
6628
+ parentMetadataUpdate(instanceId, {
6629
+ blendMode,
6630
+ opacity,
6631
+ visible: visible === false ? false : true,
6632
+ id,
6633
+ mask: maskSource ? {
6634
+ source: maskSource,
6635
+ type: maskType || "alpha"
6636
+ } : void 0,
6637
+ renderOrder,
6638
+ transform: $.get(effectiveTransform)
6639
+ });
6640
+ });
6641
+ onMount(() => {
6642
+ if (componentDefinition$59 && typeof componentDefinition$59.fragmentNode === "function") {
6643
+ parentRegister(instanceId, componentDefinition$59.fragmentNode, parentId, {
6644
+ blendMode,
6645
+ opacity,
6646
+ visible: visible !== false ? true : false,
6647
+ id,
6648
+ mask: maskSource ? {
6649
+ source: maskSource,
6650
+ type: maskType || "alpha"
6651
+ } : void 0,
6652
+ renderOrder,
6653
+ transform: $.get(effectiveTransform)
6654
+ }, uniforms);
6655
+ $.set(isRegistered, true);
6656
+ } else console.error("componentDefinition.fragmentNode is not a function:", {
6657
+ componentDefinition: componentDefinition$59,
6658
+ fragmentNode: componentDefinition$59?.fragmentNode,
6659
+ type: typeof componentDefinition$59?.fragmentNode
6660
+ });
6661
+ });
6662
+ onDestroy(() => {
6663
+ $.set(isRegistered, false);
6664
+ parentRegister(instanceId, null, null, null, null);
6665
+ });
6666
+ children?.($$anchor);
6667
+ $.pop();
6668
+ }
6669
+ function ZoomBlur($$anchor, $$props) {
6670
+ $.push($$props, true);
6671
+ const DEFAULT_TRANSFORM = {
6672
+ offsetX: 0,
6673
+ offsetY: 0,
6674
+ rotation: 0,
6675
+ scale: 1,
6676
+ anchorX: .5,
6677
+ anchorY: .5,
6678
+ edges: "transparent"
6679
+ };
6680
+ const componentDefaults = {
6681
+ blendMode: "normal",
6682
+ renderOrder: 0,
6683
+ visible: true,
6684
+ ...Object.entries(componentDefinition$60.props).reduce((acc, [key, config]) => {
6685
+ acc[key] = config.default;
6686
+ return acc;
6687
+ }, {})
6688
+ };
6689
+ const props = $.rest_props($$props, [
6690
+ "$$slots",
6691
+ "$$events",
6692
+ "$$legacy"
6693
+ ]);
6694
+ const blendMode = $$props.blendMode ?? componentDefaults.blendMode;
6695
+ const opacity = $$props.opacity;
6696
+ const visible = $$props.visible ?? componentDefaults.visible;
6697
+ const id = $$props.id;
6698
+ const maskSource = $$props.maskSource;
6699
+ const maskType = $$props.maskType;
6700
+ const renderOrder = $$props.renderOrder ?? componentDefaults.renderOrder;
6701
+ const { children } = props;
6702
+ const effectiveTransform = $.derived(() => ({
6703
+ ...DEFAULT_TRANSFORM,
6704
+ ...$$props.transform
6705
+ }));
6706
+ const parentId = getContext("shaderParentId");
6707
+ if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6708
+ const instanceId = id || `${componentDefinition$60.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
6709
+ setContext("shaderParentId", instanceId);
6710
+ const shaderReadyProps = $.derived(() => {
6711
+ let baseProps = { ...componentDefaults };
6712
+ for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && key !== "children") {
6713
+ const propValue = props[key];
6714
+ const defaultValue = componentDefaults[key];
6715
+ if (propValue !== void 0 && propValue !== defaultValue) baseProps[key] = propValue;
6716
+ }
6717
+ return baseProps;
6718
+ });
6719
+ const uniforms = createUniformsMap(componentDefinition$60, $.get(shaderReadyProps), instanceId);
6720
+ const parentRegister = getContext("shaderNodeRegister");
6721
+ if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6722
+ const parentUniformUpdate = getContext("shaderUniformUpdate");
6723
+ if (parentUniformUpdate === void 0) throw new Error("Shader components require shaderUniformUpdate from parent");
6724
+ const parentMetadataUpdate = getContext("shaderMetadataUpdate");
6725
+ if (parentMetadataUpdate === void 0) throw new Error("Shader components require shaderMetadataUpdate from parent");
6726
+ let isRegistered = $.state(false);
6727
+ Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
6728
+ $.user_effect(() => {
6729
+ if (!$.get(isRegistered)) return;
6730
+ if (uniform && uniform.value !== void 0) {
6731
+ const newValue = props[propName];
6732
+ if (newValue !== void 0) parentUniformUpdate(instanceId, propName, newValue);
6733
+ }
6734
+ });
6735
+ });
6736
+ $.user_effect(() => {
6737
+ if (!$.get(isRegistered)) return;
6738
+ parentMetadataUpdate(instanceId, {
6739
+ blendMode,
6740
+ opacity,
6741
+ visible: visible === false ? false : true,
6742
+ id,
6743
+ mask: maskSource ? {
6744
+ source: maskSource,
6745
+ type: maskType || "alpha"
6746
+ } : void 0,
6747
+ renderOrder,
6748
+ transform: $.get(effectiveTransform)
6749
+ });
6750
+ });
6751
+ onMount(() => {
6752
+ if (componentDefinition$60 && typeof componentDefinition$60.fragmentNode === "function") {
6753
+ parentRegister(instanceId, componentDefinition$60.fragmentNode, parentId, {
6754
+ blendMode,
6755
+ opacity,
6756
+ visible: visible !== false ? true : false,
6757
+ id,
6758
+ mask: maskSource ? {
6759
+ source: maskSource,
6760
+ type: maskType || "alpha"
6761
+ } : void 0,
6762
+ renderOrder,
6763
+ transform: $.get(effectiveTransform)
6764
+ }, uniforms);
6765
+ $.set(isRegistered, true);
6766
+ } else console.error("componentDefinition.fragmentNode is not a function:", {
6767
+ componentDefinition: componentDefinition$60,
6768
+ fragmentNode: componentDefinition$60?.fragmentNode,
6769
+ type: typeof componentDefinition$60?.fragmentNode
6770
+ });
6771
+ });
6772
+ onDestroy(() => {
6773
+ $.set(isRegistered, false);
6774
+ parentRegister(instanceId, null, null, null, null);
6775
+ });
6776
+ children?.($$anchor);
6777
+ $.pop();
6778
+ }
6557
6779
  var root = $.from_html(`<div><canvas data-renderer="shaders" style="width: 100%; height: 100%; display: block;"></canvas> <!></div>`);
6558
6780
  function Shader($$anchor, $$props) {
6559
6781
  $.push($$props, true);
@@ -6656,4 +6878,4 @@ function Shader($$anchor, $$props) {
6656
6878
  $.append($$anchor, div);
6657
6879
  $.pop();
6658
6880
  }
6659
- export { AngularBlur, Ascii, Beam, Blob, Blur, BrightnessContrast, 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, Perspective, Pixelate, PolarCoordinates, Posterize, ProgressiveBlur, RadialGradient, RectangularCoordinates, Ripples, Saturation, Shader, Sharpness, SimplexNoise, SineWave, SolidColor, Spherize, Spiral, Strands, Stretch, Swirl, TiltShift, Tint, Tritone, Twirl, Vibrance, WaveDistortion, ZoomBlur, generatePresetCode };
6881
+ export { AngularBlur, Ascii, Beam, Blob, Blur, BrightnessContrast, 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, Perspective, Pixelate, PolarCoordinates, Posterize, ProgressiveBlur, RadialGradient, RectangularCoordinates, Ripples, Saturation, Shader, Sharpness, Shatter, SimplexNoise, SineWave, SolidColor, Spherize, Spiral, Strands, Stretch, Stripes, Swirl, TiltShift, Tint, Tritone, Twirl, Vibrance, WaveDistortion, ZoomBlur, generatePresetCode };
@@ -1,2 +1,2 @@
1
- import { n as generatePresetCode, t as availableComponents } from "../generatePresetCode-BFY8wlyB.js";
1
+ import { n as generatePresetCode, t as availableComponents } from "../generatePresetCode-bx7z5wvC.js";
2
2
  export { availableComponents, generatePresetCode };
@@ -0,0 +1,57 @@
1
+ import { BlendMode, TransformConfig } from '../../core';
2
+ import { ComponentProps } from '../../core/shaders/Shatter';
3
+
4
+ /**
5
+ * Define component props including blend mode, opacity, visibility, masking, and transformation
6
+ */
7
+ interface ExtendedComponentProps extends Partial<ComponentProps> {
8
+ blendMode?: BlendMode;
9
+ opacity?: number;
10
+ visible?: boolean;
11
+ id?: string;
12
+ maskSource?: string;
13
+ maskType?: string;
14
+ renderOrder?: number;
15
+ transform?: Partial<TransformConfig>;
16
+ }
17
+ declare function __VLS_template(): {
18
+ default?(_: {}): any;
19
+ };
20
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ExtendedComponentProps>, {
21
+ blendMode: string;
22
+ renderOrder: number;
23
+ visible: boolean;
24
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ExtendedComponentProps>, {
25
+ blendMode: string;
26
+ renderOrder: number;
27
+ visible: boolean;
28
+ }>>> & Readonly<{}>, {
29
+ blendMode: BlendMode;
30
+ visible: boolean;
31
+ renderOrder: number;
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
33
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
34
+ export default _default;
35
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
36
+ type __VLS_TypePropsToRuntimeProps<T> = {
37
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
38
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
39
+ } : {
40
+ type: import('vue').PropType<T[K]>;
41
+ required: true;
42
+ };
43
+ };
44
+ type __VLS_WithDefaults<P, D> = {
45
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
46
+ default: D[K];
47
+ }> : P[K];
48
+ };
49
+ type __VLS_Prettify<T> = {
50
+ [K in keyof T]: T[K];
51
+ } & {};
52
+ type __VLS_WithTemplateSlots<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
55
+ };
56
+ };
57
+ //# sourceMappingURL=Shatter.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shatter.vue.d.ts","sourceRoot":"","sources":["../../src/components/Shatter.vue"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,SAAS,EAId,KAAK,eAAe,EACrB,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAsB,KAAK,cAAc,EAAC,MAAM,sBAAsB,CAAA;AAI7E;;GAEG;AACH,UAAU,sBAAuB,SAAQ,OAAO,CAAC,cAAc,CAAC;IAC9D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CACtC;AAgOD,iBAAS,cAAc;qBA0BM,GAAG;EAG/B;AAQD,QAAA,MAAM,eAAe;;;;;;;;;eA7QP,SAAS;aAEX,OAAO;iBAIH,MAAM;4EA6QpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}