shaders 2.2.41 → 2.2.43

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 (79) hide show
  1. package/dist/core/Shatter-COjV2jLy.js +299 -0
  2. package/dist/core/WebcamTexture-D4Uv7Plz.js +168 -0
  3. package/dist/core/index.js +43 -39
  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.js +1 -1
  16. package/dist/core/shaders/Swirl/index.js +1 -1
  17. package/dist/core/shaders/TiltShift/index.js +1 -1
  18. package/dist/core/shaders/Tint/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/WebcamTexture/index.d.ts +21 -0
  24. package/dist/core/shaders/WebcamTexture/index.d.ts.map +1 -0
  25. package/dist/core/shaders/WebcamTexture/index.js +2 -0
  26. package/dist/core/shaders/ZoomBlur/index.js +1 -1
  27. package/dist/react/components/Shatter.d.ts +31 -0
  28. package/dist/react/components/Shatter.d.ts.map +1 -0
  29. package/dist/react/components/WebcamTexture.d.ts +31 -0
  30. package/dist/react/components/WebcamTexture.d.ts.map +1 -0
  31. package/dist/react/{generatePresetCode-K6ZAneRr.js → generatePresetCode-D0yiVxb4.js} +21 -0
  32. package/dist/react/index.d.ts +2 -0
  33. package/dist/react/index.d.ts.map +1 -1
  34. package/dist/react/index.js +717 -439
  35. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  36. package/dist/react/utils/generatePresetCode.js +1 -1
  37. package/dist/registry.js +337 -0
  38. package/dist/solid/components/Shatter.d.ts +28 -0
  39. package/dist/solid/components/Shatter.d.ts.map +1 -0
  40. package/dist/solid/components/WebcamTexture.d.ts +28 -0
  41. package/dist/solid/components/WebcamTexture.d.ts.map +1 -0
  42. package/dist/solid/index.d.ts +2 -0
  43. package/dist/solid/index.d.ts.map +1 -1
  44. package/dist/solid/index.js +659 -375
  45. package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
  46. package/dist/solid/utils/generatePresetCode.js +21 -0
  47. package/dist/svelte/components/Shatter.svelte.d.ts +19 -0
  48. package/dist/svelte/components/WebcamTexture.svelte.d.ts +19 -0
  49. package/dist/svelte/{generatePresetCode-x1dhDaQ3.js → generatePresetCode-DUGaV_ym.js} +21 -0
  50. package/dist/svelte/index.d.ts +2 -0
  51. package/dist/svelte/index.js +256 -34
  52. package/dist/svelte/utils/generatePresetCode.js +1 -1
  53. package/dist/vue/components/Shatter.vue.d.ts +57 -0
  54. package/dist/vue/components/Shatter.vue.d.ts.map +1 -0
  55. package/dist/vue/components/WebcamTexture.vue.d.ts +57 -0
  56. package/dist/vue/components/WebcamTexture.vue.d.ts.map +1 -0
  57. package/dist/vue/{generatePresetCode-BaNcX5ua.js → generatePresetCode-CShQ8TLw.js} +21 -0
  58. package/dist/vue/index.d.ts +2 -0
  59. package/dist/vue/index.d.ts.map +1 -1
  60. package/dist/vue/index.js +381 -130
  61. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  62. package/dist/vue/utils/generatePresetCode.js +1 -1
  63. package/package.json +17 -1
  64. /package/dist/core/{SimplexNoise-CMMeggo6.js → SimplexNoise-Ce79jgYM.js} +0 -0
  65. /package/dist/core/{SineWave-DVVLqHPw.js → SineWave-Cv2gOU8a.js} +0 -0
  66. /package/dist/core/{SolidColor-zYROg_aE.js → SolidColor-DFkDBFq3.js} +0 -0
  67. /package/dist/core/{Spherize-tsKMpSaS.js → Spherize-R-s4pX9t.js} +0 -0
  68. /package/dist/core/{Spiral-DDyVSeG_.js → Spiral-W4dALX1z.js} +0 -0
  69. /package/dist/core/{Strands-B9vY4uA7.js → Strands-DtN5POfO.js} +0 -0
  70. /package/dist/core/{Stretch-BhHjbcqd.js → Stretch-BzvP_hdu.js} +0 -0
  71. /package/dist/core/{Stripes-TdCUOh07.js → Stripes-BbNFX05u.js} +0 -0
  72. /package/dist/core/{Swirl-m1-Mnzj5.js → Swirl-CfsYsr4X.js} +0 -0
  73. /package/dist/core/{TiltShift-C_NUqKZF.js → TiltShift-B6gbm7Z8.js} +0 -0
  74. /package/dist/core/{Tint-ChKku9xR.js → Tint-CpnitsHw.js} +0 -0
  75. /package/dist/core/{Tritone-D-NcV7N-.js → Tritone-DzvSKVfR.js} +0 -0
  76. /package/dist/core/{Twirl-Cqzll6nW.js → Twirl-BXH4uAd6.js} +0 -0
  77. /package/dist/core/{Vibrance-CxunJkcb.js → Vibrance-ByN9bRgU.js} +0 -0
  78. /package/dist/core/{WaveDistortion-UQZKCfKh.js → WaveDistortion-BA1PyqYH.js} +0 -0
  79. /package/dist/core/{ZoomBlur-DqKYdlmm.js → ZoomBlur-CIkkDBIo.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;AAusBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,UA8D/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;AA0tBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,UAgE/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",
@@ -590,6 +603,12 @@ const shaderMetadata = {
590
603
  "waveType": "sine",
591
604
  "edges": "stretch"
592
605
  },
606
+ "WebcamTexture": {
607
+ "opacity": 1,
608
+ "blendMode": "normal",
609
+ "objectFit": "cover",
610
+ "mirror": true
611
+ },
593
612
  "ZoomBlur": {
594
613
  "opacity": 1,
595
614
  "blendMode": "normal",
@@ -758,6 +777,7 @@ const availableComponents = [
758
777
  "Ripples",
759
778
  "Saturation",
760
779
  "Sharpness",
780
+ "Shatter",
761
781
  "SimplexNoise",
762
782
  "SineWave",
763
783
  "SolidColor",
@@ -773,6 +793,7 @@ const availableComponents = [
773
793
  "Twirl",
774
794
  "Vibrance",
775
795
  "WaveDistortion",
796
+ "WebcamTexture",
776
797
  "ZoomBlur"
777
798
  ];
778
799
  export {
@@ -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/WebcamTexture';
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 WebcamTexture: import("svelte").Component<ExtendedComponentProps, {}, "">;
18
+ type WebcamTexture = ReturnType<typeof WebcamTexture>;
19
+ export default WebcamTexture;
@@ -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",
@@ -588,6 +601,12 @@ var shaderMetadata = {
588
601
  "waveType": "sine",
589
602
  "edges": "stretch"
590
603
  },
604
+ "WebcamTexture": {
605
+ "opacity": 1,
606
+ "blendMode": "normal",
607
+ "objectFit": "cover",
608
+ "mirror": true
609
+ },
591
610
  "ZoomBlur": {
592
611
  "opacity": 1,
593
612
  "blendMode": "normal",
@@ -707,6 +726,7 @@ const availableComponents = [
707
726
  "Ripples",
708
727
  "Saturation",
709
728
  "Sharpness",
729
+ "Shatter",
710
730
  "SimplexNoise",
711
731
  "SineWave",
712
732
  "SolidColor",
@@ -722,6 +742,7 @@ const availableComponents = [
722
742
  "Twirl",
723
743
  "Vibrance",
724
744
  "WaveDistortion",
745
+ "WebcamTexture",
725
746
  "ZoomBlur"
726
747
  ];
727
748
  export { generatePresetCode as n, availableComponents as t };
@@ -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';
@@ -57,6 +58,7 @@ export { default as Tritone } from './components/Tritone.svelte';
57
58
  export { default as Twirl } from './components/Twirl.svelte';
58
59
  export { default as Vibrance } from './components/Vibrance.svelte';
59
60
  export { default as WaveDistortion } from './components/WaveDistortion.svelte';
61
+ export { default as WebcamTexture } from './components/WebcamTexture.svelte';
60
62
  export { default as ZoomBlur } from './components/ZoomBlur.svelte';
61
63
  export { default as Shader } from './engine/Shader.svelte';
62
64
  export { generatePresetCode } from './utils/generatePresetCode';
@@ -1,4 +1,4 @@
1
- import { n as generatePresetCode } from "./generatePresetCode-x1dhDaQ3.js";
1
+ import { n as generatePresetCode } from "./generatePresetCode-DUGaV_ym.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,22 +47,24 @@ 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/Stripes/index.js";
58
- import { componentDefinition as componentDefinition$52 } from "../core/shaders/Swirl/index.js";
59
- import { componentDefinition as componentDefinition$53 } from "../core/shaders/TiltShift/index.js";
60
- import { componentDefinition as componentDefinition$54 } from "../core/shaders/Tint/index.js";
61
- import { componentDefinition as componentDefinition$55 } from "../core/shaders/Tritone/index.js";
62
- import { componentDefinition as componentDefinition$56 } from "../core/shaders/Twirl/index.js";
63
- import { componentDefinition as componentDefinition$57 } from "../core/shaders/Vibrance/index.js";
64
- import { componentDefinition as componentDefinition$58 } from "../core/shaders/WaveDistortion/index.js";
65
- import { componentDefinition as componentDefinition$59 } 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/WebcamTexture/index.js";
67
+ import { componentDefinition as componentDefinition$61 } from "../core/shaders/ZoomBlur/index.js";
66
68
  import { vec4 } from "three/tsl";
67
69
  import { TelemetryCollector, isExternalUser, shouldCollectTelemetry } from "../core/telemetry/index.js";
68
70
  function AngularBlur($$anchor, $$props) {
@@ -4905,7 +4907,7 @@ function Sharpness($$anchor, $$props) {
4905
4907
  children?.($$anchor);
4906
4908
  $.pop();
4907
4909
  }
4908
- function SimplexNoise($$anchor, $$props) {
4910
+ function Shatter($$anchor, $$props) {
4909
4911
  $.push($$props, true);
4910
4912
  const DEFAULT_TRANSFORM = {
4911
4913
  offsetX: 0,
@@ -5015,7 +5017,7 @@ function SimplexNoise($$anchor, $$props) {
5015
5017
  children?.($$anchor);
5016
5018
  $.pop();
5017
5019
  }
5018
- function SineWave($$anchor, $$props) {
5020
+ function SimplexNoise($$anchor, $$props) {
5019
5021
  $.push($$props, true);
5020
5022
  const DEFAULT_TRANSFORM = {
5021
5023
  offsetX: 0,
@@ -5125,7 +5127,7 @@ function SineWave($$anchor, $$props) {
5125
5127
  children?.($$anchor);
5126
5128
  $.pop();
5127
5129
  }
5128
- function SolidColor($$anchor, $$props) {
5130
+ function SineWave($$anchor, $$props) {
5129
5131
  $.push($$props, true);
5130
5132
  const DEFAULT_TRANSFORM = {
5131
5133
  offsetX: 0,
@@ -5235,7 +5237,7 @@ function SolidColor($$anchor, $$props) {
5235
5237
  children?.($$anchor);
5236
5238
  $.pop();
5237
5239
  }
5238
- function Spherize($$anchor, $$props) {
5240
+ function SolidColor($$anchor, $$props) {
5239
5241
  $.push($$props, true);
5240
5242
  const DEFAULT_TRANSFORM = {
5241
5243
  offsetX: 0,
@@ -5345,7 +5347,7 @@ function Spherize($$anchor, $$props) {
5345
5347
  children?.($$anchor);
5346
5348
  $.pop();
5347
5349
  }
5348
- function Spiral($$anchor, $$props) {
5350
+ function Spherize($$anchor, $$props) {
5349
5351
  $.push($$props, true);
5350
5352
  const DEFAULT_TRANSFORM = {
5351
5353
  offsetX: 0,
@@ -5455,7 +5457,7 @@ function Spiral($$anchor, $$props) {
5455
5457
  children?.($$anchor);
5456
5458
  $.pop();
5457
5459
  }
5458
- function Strands($$anchor, $$props) {
5460
+ function Spiral($$anchor, $$props) {
5459
5461
  $.push($$props, true);
5460
5462
  const DEFAULT_TRANSFORM = {
5461
5463
  offsetX: 0,
@@ -5565,7 +5567,7 @@ function Strands($$anchor, $$props) {
5565
5567
  children?.($$anchor);
5566
5568
  $.pop();
5567
5569
  }
5568
- function Stretch($$anchor, $$props) {
5570
+ function Strands($$anchor, $$props) {
5569
5571
  $.push($$props, true);
5570
5572
  const DEFAULT_TRANSFORM = {
5571
5573
  offsetX: 0,
@@ -5675,7 +5677,7 @@ function Stretch($$anchor, $$props) {
5675
5677
  children?.($$anchor);
5676
5678
  $.pop();
5677
5679
  }
5678
- function Stripes($$anchor, $$props) {
5680
+ function Stretch($$anchor, $$props) {
5679
5681
  $.push($$props, true);
5680
5682
  const DEFAULT_TRANSFORM = {
5681
5683
  offsetX: 0,
@@ -5785,7 +5787,7 @@ function Stripes($$anchor, $$props) {
5785
5787
  children?.($$anchor);
5786
5788
  $.pop();
5787
5789
  }
5788
- function Swirl($$anchor, $$props) {
5790
+ function Stripes($$anchor, $$props) {
5789
5791
  $.push($$props, true);
5790
5792
  const DEFAULT_TRANSFORM = {
5791
5793
  offsetX: 0,
@@ -5895,7 +5897,7 @@ function Swirl($$anchor, $$props) {
5895
5897
  children?.($$anchor);
5896
5898
  $.pop();
5897
5899
  }
5898
- function TiltShift($$anchor, $$props) {
5900
+ function Swirl($$anchor, $$props) {
5899
5901
  $.push($$props, true);
5900
5902
  const DEFAULT_TRANSFORM = {
5901
5903
  offsetX: 0,
@@ -6005,7 +6007,7 @@ function TiltShift($$anchor, $$props) {
6005
6007
  children?.($$anchor);
6006
6008
  $.pop();
6007
6009
  }
6008
- function Tint($$anchor, $$props) {
6010
+ function TiltShift($$anchor, $$props) {
6009
6011
  $.push($$props, true);
6010
6012
  const DEFAULT_TRANSFORM = {
6011
6013
  offsetX: 0,
@@ -6115,7 +6117,7 @@ function Tint($$anchor, $$props) {
6115
6117
  children?.($$anchor);
6116
6118
  $.pop();
6117
6119
  }
6118
- function Tritone($$anchor, $$props) {
6120
+ function Tint($$anchor, $$props) {
6119
6121
  $.push($$props, true);
6120
6122
  const DEFAULT_TRANSFORM = {
6121
6123
  offsetX: 0,
@@ -6225,7 +6227,7 @@ function Tritone($$anchor, $$props) {
6225
6227
  children?.($$anchor);
6226
6228
  $.pop();
6227
6229
  }
6228
- function Twirl($$anchor, $$props) {
6230
+ function Tritone($$anchor, $$props) {
6229
6231
  $.push($$props, true);
6230
6232
  const DEFAULT_TRANSFORM = {
6231
6233
  offsetX: 0,
@@ -6335,7 +6337,7 @@ function Twirl($$anchor, $$props) {
6335
6337
  children?.($$anchor);
6336
6338
  $.pop();
6337
6339
  }
6338
- function Vibrance($$anchor, $$props) {
6340
+ function Twirl($$anchor, $$props) {
6339
6341
  $.push($$props, true);
6340
6342
  const DEFAULT_TRANSFORM = {
6341
6343
  offsetX: 0,
@@ -6445,7 +6447,7 @@ function Vibrance($$anchor, $$props) {
6445
6447
  children?.($$anchor);
6446
6448
  $.pop();
6447
6449
  }
6448
- function WaveDistortion($$anchor, $$props) {
6450
+ function Vibrance($$anchor, $$props) {
6449
6451
  $.push($$props, true);
6450
6452
  const DEFAULT_TRANSFORM = {
6451
6453
  offsetX: 0,
@@ -6555,7 +6557,7 @@ function WaveDistortion($$anchor, $$props) {
6555
6557
  children?.($$anchor);
6556
6558
  $.pop();
6557
6559
  }
6558
- function ZoomBlur($$anchor, $$props) {
6560
+ function WaveDistortion($$anchor, $$props) {
6559
6561
  $.push($$props, true);
6560
6562
  const DEFAULT_TRANSFORM = {
6561
6563
  offsetX: 0,
@@ -6665,6 +6667,226 @@ function ZoomBlur($$anchor, $$props) {
6665
6667
  children?.($$anchor);
6666
6668
  $.pop();
6667
6669
  }
6670
+ function WebcamTexture($$anchor, $$props) {
6671
+ $.push($$props, true);
6672
+ const DEFAULT_TRANSFORM = {
6673
+ offsetX: 0,
6674
+ offsetY: 0,
6675
+ rotation: 0,
6676
+ scale: 1,
6677
+ anchorX: .5,
6678
+ anchorY: .5,
6679
+ edges: "transparent"
6680
+ };
6681
+ const componentDefaults = {
6682
+ blendMode: "normal",
6683
+ renderOrder: 0,
6684
+ visible: true,
6685
+ ...Object.entries(componentDefinition$60.props).reduce((acc, [key, config]) => {
6686
+ acc[key] = config.default;
6687
+ return acc;
6688
+ }, {})
6689
+ };
6690
+ const props = $.rest_props($$props, [
6691
+ "$$slots",
6692
+ "$$events",
6693
+ "$$legacy"
6694
+ ]);
6695
+ const blendMode = $$props.blendMode ?? componentDefaults.blendMode;
6696
+ const opacity = $$props.opacity;
6697
+ const visible = $$props.visible ?? componentDefaults.visible;
6698
+ const id = $$props.id;
6699
+ const maskSource = $$props.maskSource;
6700
+ const maskType = $$props.maskType;
6701
+ const renderOrder = $$props.renderOrder ?? componentDefaults.renderOrder;
6702
+ const { children } = props;
6703
+ const effectiveTransform = $.derived(() => ({
6704
+ ...DEFAULT_TRANSFORM,
6705
+ ...$$props.transform
6706
+ }));
6707
+ const parentId = getContext("shaderParentId");
6708
+ if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6709
+ const instanceId = id || `${componentDefinition$60.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
6710
+ setContext("shaderParentId", instanceId);
6711
+ const shaderReadyProps = $.derived(() => {
6712
+ let baseProps = { ...componentDefaults };
6713
+ for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && key !== "children") {
6714
+ const propValue = props[key];
6715
+ const defaultValue = componentDefaults[key];
6716
+ if (propValue !== void 0 && propValue !== defaultValue) baseProps[key] = propValue;
6717
+ }
6718
+ return baseProps;
6719
+ });
6720
+ const uniforms = createUniformsMap(componentDefinition$60, $.get(shaderReadyProps), instanceId);
6721
+ const parentRegister = getContext("shaderNodeRegister");
6722
+ if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6723
+ const parentUniformUpdate = getContext("shaderUniformUpdate");
6724
+ if (parentUniformUpdate === void 0) throw new Error("Shader components require shaderUniformUpdate from parent");
6725
+ const parentMetadataUpdate = getContext("shaderMetadataUpdate");
6726
+ if (parentMetadataUpdate === void 0) throw new Error("Shader components require shaderMetadataUpdate from parent");
6727
+ let isRegistered = $.state(false);
6728
+ Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
6729
+ $.user_effect(() => {
6730
+ if (!$.get(isRegistered)) return;
6731
+ if (uniform && uniform.value !== void 0) {
6732
+ const newValue = props[propName];
6733
+ if (newValue !== void 0) parentUniformUpdate(instanceId, propName, newValue);
6734
+ }
6735
+ });
6736
+ });
6737
+ $.user_effect(() => {
6738
+ if (!$.get(isRegistered)) return;
6739
+ parentMetadataUpdate(instanceId, {
6740
+ blendMode,
6741
+ opacity,
6742
+ visible: visible === false ? false : true,
6743
+ id,
6744
+ mask: maskSource ? {
6745
+ source: maskSource,
6746
+ type: maskType || "alpha"
6747
+ } : void 0,
6748
+ renderOrder,
6749
+ transform: $.get(effectiveTransform)
6750
+ });
6751
+ });
6752
+ onMount(() => {
6753
+ if (componentDefinition$60 && typeof componentDefinition$60.fragmentNode === "function") {
6754
+ parentRegister(instanceId, componentDefinition$60.fragmentNode, parentId, {
6755
+ blendMode,
6756
+ opacity,
6757
+ visible: visible !== false ? true : false,
6758
+ id,
6759
+ mask: maskSource ? {
6760
+ source: maskSource,
6761
+ type: maskType || "alpha"
6762
+ } : void 0,
6763
+ renderOrder,
6764
+ transform: $.get(effectiveTransform)
6765
+ }, uniforms);
6766
+ $.set(isRegistered, true);
6767
+ } else console.error("componentDefinition.fragmentNode is not a function:", {
6768
+ componentDefinition: componentDefinition$60,
6769
+ fragmentNode: componentDefinition$60?.fragmentNode,
6770
+ type: typeof componentDefinition$60?.fragmentNode
6771
+ });
6772
+ });
6773
+ onDestroy(() => {
6774
+ $.set(isRegistered, false);
6775
+ parentRegister(instanceId, null, null, null, null);
6776
+ });
6777
+ children?.($$anchor);
6778
+ $.pop();
6779
+ }
6780
+ function ZoomBlur($$anchor, $$props) {
6781
+ $.push($$props, true);
6782
+ const DEFAULT_TRANSFORM = {
6783
+ offsetX: 0,
6784
+ offsetY: 0,
6785
+ rotation: 0,
6786
+ scale: 1,
6787
+ anchorX: .5,
6788
+ anchorY: .5,
6789
+ edges: "transparent"
6790
+ };
6791
+ const componentDefaults = {
6792
+ blendMode: "normal",
6793
+ renderOrder: 0,
6794
+ visible: true,
6795
+ ...Object.entries(componentDefinition$61.props).reduce((acc, [key, config]) => {
6796
+ acc[key] = config.default;
6797
+ return acc;
6798
+ }, {})
6799
+ };
6800
+ const props = $.rest_props($$props, [
6801
+ "$$slots",
6802
+ "$$events",
6803
+ "$$legacy"
6804
+ ]);
6805
+ const blendMode = $$props.blendMode ?? componentDefaults.blendMode;
6806
+ const opacity = $$props.opacity;
6807
+ const visible = $$props.visible ?? componentDefaults.visible;
6808
+ const id = $$props.id;
6809
+ const maskSource = $$props.maskSource;
6810
+ const maskType = $$props.maskType;
6811
+ const renderOrder = $$props.renderOrder ?? componentDefaults.renderOrder;
6812
+ const { children } = props;
6813
+ const effectiveTransform = $.derived(() => ({
6814
+ ...DEFAULT_TRANSFORM,
6815
+ ...$$props.transform
6816
+ }));
6817
+ const parentId = getContext("shaderParentId");
6818
+ if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6819
+ const instanceId = id || `${componentDefinition$61.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
6820
+ setContext("shaderParentId", instanceId);
6821
+ const shaderReadyProps = $.derived(() => {
6822
+ let baseProps = { ...componentDefaults };
6823
+ for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && key !== "children") {
6824
+ const propValue = props[key];
6825
+ const defaultValue = componentDefaults[key];
6826
+ if (propValue !== void 0 && propValue !== defaultValue) baseProps[key] = propValue;
6827
+ }
6828
+ return baseProps;
6829
+ });
6830
+ const uniforms = createUniformsMap(componentDefinition$61, $.get(shaderReadyProps), instanceId);
6831
+ const parentRegister = getContext("shaderNodeRegister");
6832
+ if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6833
+ const parentUniformUpdate = getContext("shaderUniformUpdate");
6834
+ if (parentUniformUpdate === void 0) throw new Error("Shader components require shaderUniformUpdate from parent");
6835
+ const parentMetadataUpdate = getContext("shaderMetadataUpdate");
6836
+ if (parentMetadataUpdate === void 0) throw new Error("Shader components require shaderMetadataUpdate from parent");
6837
+ let isRegistered = $.state(false);
6838
+ Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
6839
+ $.user_effect(() => {
6840
+ if (!$.get(isRegistered)) return;
6841
+ if (uniform && uniform.value !== void 0) {
6842
+ const newValue = props[propName];
6843
+ if (newValue !== void 0) parentUniformUpdate(instanceId, propName, newValue);
6844
+ }
6845
+ });
6846
+ });
6847
+ $.user_effect(() => {
6848
+ if (!$.get(isRegistered)) return;
6849
+ parentMetadataUpdate(instanceId, {
6850
+ blendMode,
6851
+ opacity,
6852
+ visible: visible === false ? false : true,
6853
+ id,
6854
+ mask: maskSource ? {
6855
+ source: maskSource,
6856
+ type: maskType || "alpha"
6857
+ } : void 0,
6858
+ renderOrder,
6859
+ transform: $.get(effectiveTransform)
6860
+ });
6861
+ });
6862
+ onMount(() => {
6863
+ if (componentDefinition$61 && typeof componentDefinition$61.fragmentNode === "function") {
6864
+ parentRegister(instanceId, componentDefinition$61.fragmentNode, parentId, {
6865
+ blendMode,
6866
+ opacity,
6867
+ visible: visible !== false ? true : false,
6868
+ id,
6869
+ mask: maskSource ? {
6870
+ source: maskSource,
6871
+ type: maskType || "alpha"
6872
+ } : void 0,
6873
+ renderOrder,
6874
+ transform: $.get(effectiveTransform)
6875
+ }, uniforms);
6876
+ $.set(isRegistered, true);
6877
+ } else console.error("componentDefinition.fragmentNode is not a function:", {
6878
+ componentDefinition: componentDefinition$61,
6879
+ fragmentNode: componentDefinition$61?.fragmentNode,
6880
+ type: typeof componentDefinition$61?.fragmentNode
6881
+ });
6882
+ });
6883
+ onDestroy(() => {
6884
+ $.set(isRegistered, false);
6885
+ parentRegister(instanceId, null, null, null, null);
6886
+ });
6887
+ children?.($$anchor);
6888
+ $.pop();
6889
+ }
6668
6890
  var root = $.from_html(`<div><canvas data-renderer="shaders" style="width: 100%; height: 100%; display: block;"></canvas> <!></div>`);
6669
6891
  function Shader($$anchor, $$props) {
6670
6892
  $.push($$props, true);
@@ -6767,4 +6989,4 @@ function Shader($$anchor, $$props) {
6767
6989
  $.append($$anchor, div);
6768
6990
  $.pop();
6769
6991
  }
6770
- 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, Stripes, Swirl, TiltShift, Tint, Tritone, Twirl, Vibrance, WaveDistortion, ZoomBlur, generatePresetCode };
6992
+ 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, WebcamTexture, ZoomBlur, generatePresetCode };
@@ -1,2 +1,2 @@
1
- import { n as generatePresetCode, t as availableComponents } from "../generatePresetCode-x1dhDaQ3.js";
1
+ import { n as generatePresetCode, t as availableComponents } from "../generatePresetCode-DUGaV_ym.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"}