shaders 2.2.46 → 2.2.48
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.
- package/dist/core/FlowField-BJFGOUZL.js +103 -0
- package/dist/core/Kaleidoscope-Dr-ja0XH.js +97 -0
- package/dist/core/Mirror-CnCw4TpZ.js +84 -0
- package/dist/core/registry.js +90 -84
- package/dist/core/shaderRegistry.d.ts.map +1 -1
- package/dist/core/shaders/FlowField/index.d.ts +36 -0
- package/dist/core/shaders/FlowField/index.d.ts.map +1 -0
- package/dist/core/shaders/FlowField/index.js +5 -0
- package/dist/core/shaders/GlassTiles/index.js +1 -1
- package/dist/core/shaders/Glow/index.js +1 -1
- package/dist/core/shaders/Godrays/index.js +1 -1
- package/dist/core/shaders/Grayscale/index.js +1 -1
- package/dist/core/shaders/Grid/index.js +1 -1
- package/dist/core/shaders/GridDistortion/index.js +1 -1
- package/dist/core/shaders/Group/index.js +1 -1
- package/dist/core/shaders/Halftone/index.js +1 -1
- package/dist/core/shaders/HueShift/index.js +1 -1
- package/dist/core/shaders/ImageTexture/index.js +1 -1
- package/dist/core/shaders/Invert/index.js +1 -1
- package/dist/core/shaders/Kaleidoscope/index.d.ts +36 -0
- package/dist/core/shaders/Kaleidoscope/index.d.ts.map +1 -0
- package/dist/core/shaders/Kaleidoscope/index.js +4 -0
- package/dist/core/shaders/LinearBlur/index.js +1 -1
- package/dist/core/shaders/LinearGradient/index.js +1 -1
- package/dist/core/shaders/Liquify/index.js +1 -1
- package/dist/core/shaders/Mirror/index.d.ts +29 -0
- package/dist/core/shaders/Mirror/index.d.ts.map +1 -0
- package/dist/core/shaders/Mirror/index.js +4 -0
- package/dist/core/shaders/Perspective/index.js +1 -1
- package/dist/core/shaders/Pixelate/index.js +1 -1
- package/dist/core/shaders/PolarCoordinates/index.js +1 -1
- package/dist/core/shaders/Posterize/index.js +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.js +1 -1
- package/dist/core/shaders/RadialGradient/index.js +1 -1
- package/dist/core/shaders/RectangularCoordinates/index.js +1 -1
- package/dist/core/shaders/Ripples/index.js +1 -1
- package/dist/core/shaders/Saturation/index.js +1 -1
- package/dist/core/shaders/Sharpness/index.js +1 -1
- package/dist/core/shaders/Shatter/index.js +1 -1
- package/dist/core/shaders/SimplexNoise/index.js +1 -1
- package/dist/core/shaders/SineWave/index.js +1 -1
- package/dist/core/shaders/SolidColor/index.js +1 -1
- package/dist/core/shaders/Spherize/index.js +1 -1
- package/dist/core/shaders/Spiral/index.js +1 -1
- package/dist/core/shaders/Strands/index.js +1 -1
- package/dist/core/shaders/Stretch/index.js +1 -1
- package/dist/core/shaders/Stripes/index.js +1 -1
- package/dist/core/shaders/Swirl/index.js +1 -1
- package/dist/core/shaders/TiltShift/index.js +1 -1
- package/dist/core/shaders/Tint/index.js +1 -1
- package/dist/core/shaders/Tritone/index.js +1 -1
- package/dist/core/shaders/Twirl/index.js +1 -1
- package/dist/core/shaders/Vibrance/index.js +1 -1
- package/dist/core/shaders/WaveDistortion/index.js +1 -1
- package/dist/core/shaders/WebcamTexture/index.js +1 -1
- package/dist/core/shaders/ZoomBlur/index.js +1 -1
- package/dist/react/FlowField.js +144 -0
- package/dist/react/Kaleidoscope.js +144 -0
- package/dist/react/Mirror.js +144 -0
- package/dist/react/components/FlowField.d.ts +31 -0
- package/dist/react/components/FlowField.d.ts.map +1 -0
- package/dist/react/components/Kaleidoscope.d.ts +31 -0
- package/dist/react/components/Kaleidoscope.d.ts.map +1 -0
- package/dist/react/components/Mirror.d.ts +31 -0
- package/dist/react/components/Mirror.d.ts.map +1 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +4 -1
- package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/react/utils/generatePresetCode.js +15 -0
- package/dist/registry.js +386 -0
- package/dist/solid/components/FlowField.d.ts +28 -0
- package/dist/solid/components/FlowField.d.ts.map +1 -0
- package/dist/solid/components/FlowField.js +148 -0
- package/dist/solid/components/Kaleidoscope.d.ts +28 -0
- package/dist/solid/components/Kaleidoscope.d.ts.map +1 -0
- package/dist/solid/components/Kaleidoscope.js +148 -0
- package/dist/solid/components/Mirror.d.ts +28 -0
- package/dist/solid/components/Mirror.d.ts.map +1 -0
- package/dist/solid/components/Mirror.js +148 -0
- package/dist/solid/index.d.ts +3 -0
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.js +92 -86
- package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/solid/utils/generatePresetCode.js +15 -0
- package/dist/svelte/components/FlowField.svelte.d.ts +19 -0
- package/dist/svelte/components/Kaleidoscope.svelte.d.ts +19 -0
- package/dist/svelte/components/Mirror.svelte.d.ts +19 -0
- package/dist/svelte/{generatePresetCode-CtXcoyI0.js → generatePresetCode-BD0Ac86C.js} +15 -0
- package/dist/svelte/index.d.ts +3 -0
- package/dist/svelte/index.js +419 -86
- package/dist/svelte/utils/generatePresetCode.js +1 -1
- package/dist/vue/FlowField.js +3 -0
- package/dist/vue/FlowField.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/vue/Kaleidoscope.js +3 -0
- package/dist/vue/Kaleidoscope.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/vue/Mirror.js +3 -0
- package/dist/vue/Mirror.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/vue/components/FlowField.vue.d.ts +57 -0
- package/dist/vue/components/FlowField.vue.d.ts.map +1 -0
- package/dist/vue/components/Kaleidoscope.vue.d.ts +57 -0
- package/dist/vue/components/Kaleidoscope.vue.d.ts.map +1 -0
- package/dist/vue/components/Mirror.vue.d.ts +57 -0
- package/dist/vue/components/Mirror.vue.d.ts.map +1 -0
- package/dist/vue/index.d.ts +3 -0
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +4 -1
- package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/vue/utils/generatePresetCode.js +15 -0
- package/package.json +25 -1
- /package/dist/core/{GlassTiles-C6LLjlnB.js → GlassTiles-DzYvo92U.js} +0 -0
- /package/dist/core/{Glow-C2avDr73.js → Glow-C4JrnNxe.js} +0 -0
- /package/dist/core/{Godrays-RVh5ylQ-.js → Godrays-CPWOcLmc.js} +0 -0
- /package/dist/core/{Grayscale-BH3tLDGN.js → Grayscale-BFS-Abdh.js} +0 -0
- /package/dist/core/{Grid-CdslWvoH.js → Grid-CsIIl3LT.js} +0 -0
- /package/dist/core/{GridDistortion-fimECOse.js → GridDistortion-Cq3hRKXK.js} +0 -0
- /package/dist/core/{Group-ByGv48Lm.js → Group-DHokCeZ1.js} +0 -0
- /package/dist/core/{Halftone-Cb5yrPnj.js → Halftone-BQsMiTyE.js} +0 -0
- /package/dist/core/{HueShift-DQ2WgImx.js → HueShift-BTjEGl3Z.js} +0 -0
- /package/dist/core/{ImageTexture-DKFb8ze3.js → ImageTexture-CY8Q8h_o.js} +0 -0
- /package/dist/core/{Invert-w9duGaUu.js → Invert-B8vSeK8d.js} +0 -0
- /package/dist/core/{LinearBlur-CfMT259a.js → LinearBlur-DgT4B0nH.js} +0 -0
- /package/dist/core/{LinearGradient-Cn7w-umQ.js → LinearGradient-DTifAwSC.js} +0 -0
- /package/dist/core/{Liquify-BCkIt0A1.js → Liquify-_eLJRjd7.js} +0 -0
- /package/dist/core/{Perspective-CJOFHxEC.js → Perspective-BpgcHA7E.js} +0 -0
- /package/dist/core/{Pixelate-BhNAxBsT.js → Pixelate-Bt2jxIDd.js} +0 -0
- /package/dist/core/{PolarCoordinates-DLs3K__1.js → PolarCoordinates-BJ8-cfC7.js} +0 -0
- /package/dist/core/{Posterize-XoAqPWv2.js → Posterize-Bs-iNEVB.js} +0 -0
- /package/dist/core/{ProgressiveBlur-BIZSnUjp.js → ProgressiveBlur-DELpd9wJ.js} +0 -0
- /package/dist/core/{RadialGradient-sQgXXXQk.js → RadialGradient-DQ4JGS5G.js} +0 -0
- /package/dist/core/{RectangularCoordinates-CyarkXn0.js → RectangularCoordinates-DXSP_gdW.js} +0 -0
- /package/dist/core/{Ripples-Djjw66Bn.js → Ripples-DwDKIvtQ.js} +0 -0
- /package/dist/core/{Saturation-DLHW_GP6.js → Saturation-ekyl1D9y.js} +0 -0
- /package/dist/core/{Sharpness-DkGuV_dy.js → Sharpness-DlWZ-yPe.js} +0 -0
- /package/dist/core/{Shatter-DVgj2Ea3.js → Shatter-BeD72o80.js} +0 -0
- /package/dist/core/{SimplexNoise-BXtLTcAr.js → SimplexNoise-DIo9v2-R.js} +0 -0
- /package/dist/core/{SineWave-BxqFasFh.js → SineWave-DFNnXFYQ.js} +0 -0
- /package/dist/core/{SolidColor-DFkDBFq3.js → SolidColor-B4eYGf_i.js} +0 -0
- /package/dist/core/{Spherize-DIJ4c_EG.js → Spherize-BIVrRcZG.js} +0 -0
- /package/dist/core/{Spiral-BBtmU1Fv.js → Spiral-CqjRxq1I.js} +0 -0
- /package/dist/core/{Strands-D6UOhX0L.js → Strands-B-a2SQB2.js} +0 -0
- /package/dist/core/{Stretch-DLpz8Ofm.js → Stretch-CZv3u-3X.js} +0 -0
- /package/dist/core/{Stripes-Bre3Z2m_.js → Stripes-CXUFg1Gt.js} +0 -0
- /package/dist/core/{Swirl-CfsYsr4X.js → Swirl-BcEmYjJs.js} +0 -0
- /package/dist/core/{TiltShift-BPpXBzBg.js → TiltShift-679S-uVs.js} +0 -0
- /package/dist/core/{Tint-BazvezVn.js → Tint-DS7IJWfS.js} +0 -0
- /package/dist/core/{Tritone-w0h2ebDB.js → Tritone-m_0hwkvN.js} +0 -0
- /package/dist/core/{Twirl-dmfYS2Eo.js → Twirl-DcuGsZAB.js} +0 -0
- /package/dist/core/{Vibrance-BpWyAK9W.js → Vibrance-BafFCMLv.js} +0 -0
- /package/dist/core/{WaveDistortion-hWdvaZmT.js → WaveDistortion-CQkMSDMg.js} +0 -0
- /package/dist/core/{WebcamTexture-D4Uv7Plz.js → WebcamTexture-C5oIVQlF.js} +0 -0
- /package/dist/core/{ZoomBlur-DCI4uHOL.js → ZoomBlur-pFDohu2G.js} +0 -0
package/dist/svelte/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as generatePresetCode } from "./generatePresetCode-
|
|
1
|
+
import { n as generatePresetCode } from "./generatePresetCode-BD0Ac86C.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";
|
|
@@ -23,48 +23,51 @@ import { componentDefinition as componentDefinition$16 } from "../core/shaders/D
|
|
|
23
23
|
import { componentDefinition as componentDefinition$17 } from "../core/shaders/Duotone/index.js";
|
|
24
24
|
import { componentDefinition as componentDefinition$18 } from "../core/shaders/FilmGrain/index.js";
|
|
25
25
|
import { componentDefinition as componentDefinition$19 } from "../core/shaders/FloatingParticles/index.js";
|
|
26
|
-
import { componentDefinition as componentDefinition$20 } from "../core/shaders/
|
|
27
|
-
import { componentDefinition as componentDefinition$21 } from "../core/shaders/
|
|
28
|
-
import { componentDefinition as componentDefinition$22 } from "../core/shaders/
|
|
29
|
-
import { componentDefinition as componentDefinition$23 } from "../core/shaders/
|
|
30
|
-
import { componentDefinition as componentDefinition$24 } from "../core/shaders/
|
|
31
|
-
import { componentDefinition as componentDefinition$25 } from "../core/shaders/
|
|
32
|
-
import { componentDefinition as componentDefinition$26 } from "../core/shaders/
|
|
33
|
-
import { componentDefinition as componentDefinition$27 } from "../core/shaders/
|
|
34
|
-
import { componentDefinition as componentDefinition$28 } from "../core/shaders/
|
|
35
|
-
import { componentDefinition as componentDefinition$29 } from "../core/shaders/
|
|
36
|
-
import { componentDefinition as componentDefinition$30 } from "../core/shaders/
|
|
37
|
-
import { componentDefinition as componentDefinition$31 } from "../core/shaders/
|
|
38
|
-
import { componentDefinition as componentDefinition$32 } from "../core/shaders/
|
|
39
|
-
import { componentDefinition as componentDefinition$33 } from "../core/shaders/
|
|
40
|
-
import { componentDefinition as componentDefinition$34 } from "../core/shaders/
|
|
41
|
-
import { componentDefinition as componentDefinition$35 } from "../core/shaders/
|
|
42
|
-
import { componentDefinition as componentDefinition$36 } from "../core/shaders/
|
|
43
|
-
import { componentDefinition as componentDefinition$37 } from "../core/shaders/
|
|
44
|
-
import { componentDefinition as componentDefinition$38 } from "../core/shaders/
|
|
45
|
-
import { componentDefinition as componentDefinition$39 } from "../core/shaders/
|
|
46
|
-
import { componentDefinition as componentDefinition$40 } from "../core/shaders/
|
|
47
|
-
import { componentDefinition as componentDefinition$41 } from "../core/shaders/
|
|
48
|
-
import { componentDefinition as componentDefinition$42 } from "../core/shaders/
|
|
49
|
-
import { componentDefinition as componentDefinition$43 } from "../core/shaders/
|
|
50
|
-
import { componentDefinition as componentDefinition$44 } from "../core/shaders/
|
|
51
|
-
import { componentDefinition as componentDefinition$45 } from "../core/shaders/
|
|
52
|
-
import { componentDefinition as componentDefinition$46 } from "../core/shaders/
|
|
53
|
-
import { componentDefinition as componentDefinition$47 } from "../core/shaders/
|
|
54
|
-
import { componentDefinition as componentDefinition$48 } from "../core/shaders/
|
|
55
|
-
import { componentDefinition as componentDefinition$49 } from "../core/shaders/
|
|
56
|
-
import { componentDefinition as componentDefinition$50 } from "../core/shaders/
|
|
57
|
-
import { componentDefinition as componentDefinition$51 } from "../core/shaders/
|
|
58
|
-
import { componentDefinition as componentDefinition$52 } from "../core/shaders/
|
|
59
|
-
import { componentDefinition as componentDefinition$53 } from "../core/shaders/
|
|
60
|
-
import { componentDefinition as componentDefinition$54 } from "../core/shaders/
|
|
61
|
-
import { componentDefinition as componentDefinition$55 } from "../core/shaders/
|
|
62
|
-
import { componentDefinition as componentDefinition$56 } from "../core/shaders/
|
|
63
|
-
import { componentDefinition as componentDefinition$57 } from "../core/shaders/
|
|
64
|
-
import { componentDefinition as componentDefinition$58 } from "../core/shaders/
|
|
65
|
-
import { componentDefinition as componentDefinition$59 } from "../core/shaders/
|
|
66
|
-
import { componentDefinition as componentDefinition$60 } from "../core/shaders/
|
|
67
|
-
import { componentDefinition as componentDefinition$61 } from "../core/shaders/
|
|
26
|
+
import { componentDefinition as componentDefinition$20 } from "../core/shaders/FlowField/index.js";
|
|
27
|
+
import { componentDefinition as componentDefinition$21 } from "../core/shaders/GlassTiles/index.js";
|
|
28
|
+
import { componentDefinition as componentDefinition$22 } from "../core/shaders/Glow/index.js";
|
|
29
|
+
import { componentDefinition as componentDefinition$23 } from "../core/shaders/Godrays/index.js";
|
|
30
|
+
import { componentDefinition as componentDefinition$24 } from "../core/shaders/Grayscale/index.js";
|
|
31
|
+
import { componentDefinition as componentDefinition$25 } from "../core/shaders/Grid/index.js";
|
|
32
|
+
import { componentDefinition as componentDefinition$26 } from "../core/shaders/GridDistortion/index.js";
|
|
33
|
+
import { componentDefinition as componentDefinition$27 } from "../core/shaders/Group/index.js";
|
|
34
|
+
import { componentDefinition as componentDefinition$28 } from "../core/shaders/Halftone/index.js";
|
|
35
|
+
import { componentDefinition as componentDefinition$29 } from "../core/shaders/HueShift/index.js";
|
|
36
|
+
import { componentDefinition as componentDefinition$30 } from "../core/shaders/ImageTexture/index.js";
|
|
37
|
+
import { componentDefinition as componentDefinition$31 } from "../core/shaders/Invert/index.js";
|
|
38
|
+
import { componentDefinition as componentDefinition$32 } from "../core/shaders/Kaleidoscope/index.js";
|
|
39
|
+
import { componentDefinition as componentDefinition$33 } from "../core/shaders/LinearBlur/index.js";
|
|
40
|
+
import { componentDefinition as componentDefinition$34 } from "../core/shaders/LinearGradient/index.js";
|
|
41
|
+
import { componentDefinition as componentDefinition$35 } from "../core/shaders/Liquify/index.js";
|
|
42
|
+
import { componentDefinition as componentDefinition$36 } from "../core/shaders/Mirror/index.js";
|
|
43
|
+
import { componentDefinition as componentDefinition$37 } from "../core/shaders/Perspective/index.js";
|
|
44
|
+
import { componentDefinition as componentDefinition$38 } from "../core/shaders/Pixelate/index.js";
|
|
45
|
+
import { componentDefinition as componentDefinition$39 } from "../core/shaders/PolarCoordinates/index.js";
|
|
46
|
+
import { componentDefinition as componentDefinition$40 } from "../core/shaders/Posterize/index.js";
|
|
47
|
+
import { componentDefinition as componentDefinition$41 } from "../core/shaders/ProgressiveBlur/index.js";
|
|
48
|
+
import { componentDefinition as componentDefinition$42 } from "../core/shaders/RadialGradient/index.js";
|
|
49
|
+
import { componentDefinition as componentDefinition$43 } from "../core/shaders/RectangularCoordinates/index.js";
|
|
50
|
+
import { componentDefinition as componentDefinition$44 } from "../core/shaders/Ripples/index.js";
|
|
51
|
+
import { componentDefinition as componentDefinition$45 } from "../core/shaders/Saturation/index.js";
|
|
52
|
+
import { componentDefinition as componentDefinition$46 } from "../core/shaders/Sharpness/index.js";
|
|
53
|
+
import { componentDefinition as componentDefinition$47 } from "../core/shaders/Shatter/index.js";
|
|
54
|
+
import { componentDefinition as componentDefinition$48 } from "../core/shaders/SimplexNoise/index.js";
|
|
55
|
+
import { componentDefinition as componentDefinition$49 } from "../core/shaders/SineWave/index.js";
|
|
56
|
+
import { componentDefinition as componentDefinition$50 } from "../core/shaders/SolidColor/index.js";
|
|
57
|
+
import { componentDefinition as componentDefinition$51 } from "../core/shaders/Spherize/index.js";
|
|
58
|
+
import { componentDefinition as componentDefinition$52 } from "../core/shaders/Spiral/index.js";
|
|
59
|
+
import { componentDefinition as componentDefinition$53 } from "../core/shaders/Strands/index.js";
|
|
60
|
+
import { componentDefinition as componentDefinition$54 } from "../core/shaders/Stretch/index.js";
|
|
61
|
+
import { componentDefinition as componentDefinition$55 } from "../core/shaders/Stripes/index.js";
|
|
62
|
+
import { componentDefinition as componentDefinition$56 } from "../core/shaders/Swirl/index.js";
|
|
63
|
+
import { componentDefinition as componentDefinition$57 } from "../core/shaders/TiltShift/index.js";
|
|
64
|
+
import { componentDefinition as componentDefinition$58 } from "../core/shaders/Tint/index.js";
|
|
65
|
+
import { componentDefinition as componentDefinition$59 } from "../core/shaders/Tritone/index.js";
|
|
66
|
+
import { componentDefinition as componentDefinition$60 } from "../core/shaders/Twirl/index.js";
|
|
67
|
+
import { componentDefinition as componentDefinition$61 } from "../core/shaders/Vibrance/index.js";
|
|
68
|
+
import { componentDefinition as componentDefinition$62 } from "../core/shaders/WaveDistortion/index.js";
|
|
69
|
+
import { componentDefinition as componentDefinition$63 } from "../core/shaders/WebcamTexture/index.js";
|
|
70
|
+
import { componentDefinition as componentDefinition$64 } from "../core/shaders/ZoomBlur/index.js";
|
|
68
71
|
import { vec4 } from "three/tsl";
|
|
69
72
|
import { TelemetryCollector, isExternalUser, shouldCollectTelemetry } from "../core/telemetry/index.js";
|
|
70
73
|
function AngularBlur($$anchor, $$props) {
|
|
@@ -2267,7 +2270,7 @@ function FloatingParticles($$anchor, $$props) {
|
|
|
2267
2270
|
children?.($$anchor);
|
|
2268
2271
|
$.pop();
|
|
2269
2272
|
}
|
|
2270
|
-
function
|
|
2273
|
+
function FlowField($$anchor, $$props) {
|
|
2271
2274
|
$.push($$props, true);
|
|
2272
2275
|
const DEFAULT_TRANSFORM = {
|
|
2273
2276
|
offsetX: 0,
|
|
@@ -2377,7 +2380,7 @@ function GlassTiles($$anchor, $$props) {
|
|
|
2377
2380
|
children?.($$anchor);
|
|
2378
2381
|
$.pop();
|
|
2379
2382
|
}
|
|
2380
|
-
function
|
|
2383
|
+
function GlassTiles($$anchor, $$props) {
|
|
2381
2384
|
$.push($$props, true);
|
|
2382
2385
|
const DEFAULT_TRANSFORM = {
|
|
2383
2386
|
offsetX: 0,
|
|
@@ -2487,7 +2490,7 @@ function Glow($$anchor, $$props) {
|
|
|
2487
2490
|
children?.($$anchor);
|
|
2488
2491
|
$.pop();
|
|
2489
2492
|
}
|
|
2490
|
-
function
|
|
2493
|
+
function Glow($$anchor, $$props) {
|
|
2491
2494
|
$.push($$props, true);
|
|
2492
2495
|
const DEFAULT_TRANSFORM = {
|
|
2493
2496
|
offsetX: 0,
|
|
@@ -2597,7 +2600,7 @@ function Godrays($$anchor, $$props) {
|
|
|
2597
2600
|
children?.($$anchor);
|
|
2598
2601
|
$.pop();
|
|
2599
2602
|
}
|
|
2600
|
-
function
|
|
2603
|
+
function Godrays($$anchor, $$props) {
|
|
2601
2604
|
$.push($$props, true);
|
|
2602
2605
|
const DEFAULT_TRANSFORM = {
|
|
2603
2606
|
offsetX: 0,
|
|
@@ -2707,7 +2710,7 @@ function Grayscale($$anchor, $$props) {
|
|
|
2707
2710
|
children?.($$anchor);
|
|
2708
2711
|
$.pop();
|
|
2709
2712
|
}
|
|
2710
|
-
function
|
|
2713
|
+
function Grayscale($$anchor, $$props) {
|
|
2711
2714
|
$.push($$props, true);
|
|
2712
2715
|
const DEFAULT_TRANSFORM = {
|
|
2713
2716
|
offsetX: 0,
|
|
@@ -2817,7 +2820,7 @@ function Grid($$anchor, $$props) {
|
|
|
2817
2820
|
children?.($$anchor);
|
|
2818
2821
|
$.pop();
|
|
2819
2822
|
}
|
|
2820
|
-
function
|
|
2823
|
+
function Grid($$anchor, $$props) {
|
|
2821
2824
|
$.push($$props, true);
|
|
2822
2825
|
const DEFAULT_TRANSFORM = {
|
|
2823
2826
|
offsetX: 0,
|
|
@@ -2927,7 +2930,7 @@ function GridDistortion($$anchor, $$props) {
|
|
|
2927
2930
|
children?.($$anchor);
|
|
2928
2931
|
$.pop();
|
|
2929
2932
|
}
|
|
2930
|
-
function
|
|
2933
|
+
function GridDistortion($$anchor, $$props) {
|
|
2931
2934
|
$.push($$props, true);
|
|
2932
2935
|
const DEFAULT_TRANSFORM = {
|
|
2933
2936
|
offsetX: 0,
|
|
@@ -3037,7 +3040,7 @@ function Group($$anchor, $$props) {
|
|
|
3037
3040
|
children?.($$anchor);
|
|
3038
3041
|
$.pop();
|
|
3039
3042
|
}
|
|
3040
|
-
function
|
|
3043
|
+
function Group($$anchor, $$props) {
|
|
3041
3044
|
$.push($$props, true);
|
|
3042
3045
|
const DEFAULT_TRANSFORM = {
|
|
3043
3046
|
offsetX: 0,
|
|
@@ -3147,7 +3150,7 @@ function Halftone($$anchor, $$props) {
|
|
|
3147
3150
|
children?.($$anchor);
|
|
3148
3151
|
$.pop();
|
|
3149
3152
|
}
|
|
3150
|
-
function
|
|
3153
|
+
function Halftone($$anchor, $$props) {
|
|
3151
3154
|
$.push($$props, true);
|
|
3152
3155
|
const DEFAULT_TRANSFORM = {
|
|
3153
3156
|
offsetX: 0,
|
|
@@ -3257,7 +3260,7 @@ function HueShift($$anchor, $$props) {
|
|
|
3257
3260
|
children?.($$anchor);
|
|
3258
3261
|
$.pop();
|
|
3259
3262
|
}
|
|
3260
|
-
function
|
|
3263
|
+
function HueShift($$anchor, $$props) {
|
|
3261
3264
|
$.push($$props, true);
|
|
3262
3265
|
const DEFAULT_TRANSFORM = {
|
|
3263
3266
|
offsetX: 0,
|
|
@@ -3367,7 +3370,7 @@ function ImageTexture($$anchor, $$props) {
|
|
|
3367
3370
|
children?.($$anchor);
|
|
3368
3371
|
$.pop();
|
|
3369
3372
|
}
|
|
3370
|
-
function
|
|
3373
|
+
function ImageTexture($$anchor, $$props) {
|
|
3371
3374
|
$.push($$props, true);
|
|
3372
3375
|
const DEFAULT_TRANSFORM = {
|
|
3373
3376
|
offsetX: 0,
|
|
@@ -3477,7 +3480,7 @@ function Invert($$anchor, $$props) {
|
|
|
3477
3480
|
children?.($$anchor);
|
|
3478
3481
|
$.pop();
|
|
3479
3482
|
}
|
|
3480
|
-
function
|
|
3483
|
+
function Invert($$anchor, $$props) {
|
|
3481
3484
|
$.push($$props, true);
|
|
3482
3485
|
const DEFAULT_TRANSFORM = {
|
|
3483
3486
|
offsetX: 0,
|
|
@@ -3587,7 +3590,7 @@ function LinearBlur($$anchor, $$props) {
|
|
|
3587
3590
|
children?.($$anchor);
|
|
3588
3591
|
$.pop();
|
|
3589
3592
|
}
|
|
3590
|
-
function
|
|
3593
|
+
function Kaleidoscope($$anchor, $$props) {
|
|
3591
3594
|
$.push($$props, true);
|
|
3592
3595
|
const DEFAULT_TRANSFORM = {
|
|
3593
3596
|
offsetX: 0,
|
|
@@ -3697,7 +3700,7 @@ function LinearGradient($$anchor, $$props) {
|
|
|
3697
3700
|
children?.($$anchor);
|
|
3698
3701
|
$.pop();
|
|
3699
3702
|
}
|
|
3700
|
-
function
|
|
3703
|
+
function LinearBlur($$anchor, $$props) {
|
|
3701
3704
|
$.push($$props, true);
|
|
3702
3705
|
const DEFAULT_TRANSFORM = {
|
|
3703
3706
|
offsetX: 0,
|
|
@@ -3807,7 +3810,7 @@ function Liquify($$anchor, $$props) {
|
|
|
3807
3810
|
children?.($$anchor);
|
|
3808
3811
|
$.pop();
|
|
3809
3812
|
}
|
|
3810
|
-
function
|
|
3813
|
+
function LinearGradient($$anchor, $$props) {
|
|
3811
3814
|
$.push($$props, true);
|
|
3812
3815
|
const DEFAULT_TRANSFORM = {
|
|
3813
3816
|
offsetX: 0,
|
|
@@ -3917,7 +3920,7 @@ function Perspective($$anchor, $$props) {
|
|
|
3917
3920
|
children?.($$anchor);
|
|
3918
3921
|
$.pop();
|
|
3919
3922
|
}
|
|
3920
|
-
function
|
|
3923
|
+
function Liquify($$anchor, $$props) {
|
|
3921
3924
|
$.push($$props, true);
|
|
3922
3925
|
const DEFAULT_TRANSFORM = {
|
|
3923
3926
|
offsetX: 0,
|
|
@@ -4027,7 +4030,7 @@ function Pixelate($$anchor, $$props) {
|
|
|
4027
4030
|
children?.($$anchor);
|
|
4028
4031
|
$.pop();
|
|
4029
4032
|
}
|
|
4030
|
-
function
|
|
4033
|
+
function Mirror($$anchor, $$props) {
|
|
4031
4034
|
$.push($$props, true);
|
|
4032
4035
|
const DEFAULT_TRANSFORM = {
|
|
4033
4036
|
offsetX: 0,
|
|
@@ -4137,7 +4140,7 @@ function PolarCoordinates($$anchor, $$props) {
|
|
|
4137
4140
|
children?.($$anchor);
|
|
4138
4141
|
$.pop();
|
|
4139
4142
|
}
|
|
4140
|
-
function
|
|
4143
|
+
function Perspective($$anchor, $$props) {
|
|
4141
4144
|
$.push($$props, true);
|
|
4142
4145
|
const DEFAULT_TRANSFORM = {
|
|
4143
4146
|
offsetX: 0,
|
|
@@ -4247,7 +4250,7 @@ function Posterize($$anchor, $$props) {
|
|
|
4247
4250
|
children?.($$anchor);
|
|
4248
4251
|
$.pop();
|
|
4249
4252
|
}
|
|
4250
|
-
function
|
|
4253
|
+
function Pixelate($$anchor, $$props) {
|
|
4251
4254
|
$.push($$props, true);
|
|
4252
4255
|
const DEFAULT_TRANSFORM = {
|
|
4253
4256
|
offsetX: 0,
|
|
@@ -4357,7 +4360,7 @@ function ProgressiveBlur($$anchor, $$props) {
|
|
|
4357
4360
|
children?.($$anchor);
|
|
4358
4361
|
$.pop();
|
|
4359
4362
|
}
|
|
4360
|
-
function
|
|
4363
|
+
function PolarCoordinates($$anchor, $$props) {
|
|
4361
4364
|
$.push($$props, true);
|
|
4362
4365
|
const DEFAULT_TRANSFORM = {
|
|
4363
4366
|
offsetX: 0,
|
|
@@ -4467,7 +4470,7 @@ function RadialGradient($$anchor, $$props) {
|
|
|
4467
4470
|
children?.($$anchor);
|
|
4468
4471
|
$.pop();
|
|
4469
4472
|
}
|
|
4470
|
-
function
|
|
4473
|
+
function Posterize($$anchor, $$props) {
|
|
4471
4474
|
$.push($$props, true);
|
|
4472
4475
|
const DEFAULT_TRANSFORM = {
|
|
4473
4476
|
offsetX: 0,
|
|
@@ -4577,7 +4580,7 @@ function RectangularCoordinates($$anchor, $$props) {
|
|
|
4577
4580
|
children?.($$anchor);
|
|
4578
4581
|
$.pop();
|
|
4579
4582
|
}
|
|
4580
|
-
function
|
|
4583
|
+
function ProgressiveBlur($$anchor, $$props) {
|
|
4581
4584
|
$.push($$props, true);
|
|
4582
4585
|
const DEFAULT_TRANSFORM = {
|
|
4583
4586
|
offsetX: 0,
|
|
@@ -4687,7 +4690,7 @@ function Ripples($$anchor, $$props) {
|
|
|
4687
4690
|
children?.($$anchor);
|
|
4688
4691
|
$.pop();
|
|
4689
4692
|
}
|
|
4690
|
-
function
|
|
4693
|
+
function RadialGradient($$anchor, $$props) {
|
|
4691
4694
|
$.push($$props, true);
|
|
4692
4695
|
const DEFAULT_TRANSFORM = {
|
|
4693
4696
|
offsetX: 0,
|
|
@@ -4797,7 +4800,7 @@ function Saturation($$anchor, $$props) {
|
|
|
4797
4800
|
children?.($$anchor);
|
|
4798
4801
|
$.pop();
|
|
4799
4802
|
}
|
|
4800
|
-
function
|
|
4803
|
+
function RectangularCoordinates($$anchor, $$props) {
|
|
4801
4804
|
$.push($$props, true);
|
|
4802
4805
|
const DEFAULT_TRANSFORM = {
|
|
4803
4806
|
offsetX: 0,
|
|
@@ -4907,7 +4910,7 @@ function Sharpness($$anchor, $$props) {
|
|
|
4907
4910
|
children?.($$anchor);
|
|
4908
4911
|
$.pop();
|
|
4909
4912
|
}
|
|
4910
|
-
function
|
|
4913
|
+
function Ripples($$anchor, $$props) {
|
|
4911
4914
|
$.push($$props, true);
|
|
4912
4915
|
const DEFAULT_TRANSFORM = {
|
|
4913
4916
|
offsetX: 0,
|
|
@@ -5017,7 +5020,7 @@ function Shatter($$anchor, $$props) {
|
|
|
5017
5020
|
children?.($$anchor);
|
|
5018
5021
|
$.pop();
|
|
5019
5022
|
}
|
|
5020
|
-
function
|
|
5023
|
+
function Saturation($$anchor, $$props) {
|
|
5021
5024
|
$.push($$props, true);
|
|
5022
5025
|
const DEFAULT_TRANSFORM = {
|
|
5023
5026
|
offsetX: 0,
|
|
@@ -5127,7 +5130,7 @@ function SimplexNoise($$anchor, $$props) {
|
|
|
5127
5130
|
children?.($$anchor);
|
|
5128
5131
|
$.pop();
|
|
5129
5132
|
}
|
|
5130
|
-
function
|
|
5133
|
+
function Sharpness($$anchor, $$props) {
|
|
5131
5134
|
$.push($$props, true);
|
|
5132
5135
|
const DEFAULT_TRANSFORM = {
|
|
5133
5136
|
offsetX: 0,
|
|
@@ -5237,7 +5240,7 @@ function SineWave($$anchor, $$props) {
|
|
|
5237
5240
|
children?.($$anchor);
|
|
5238
5241
|
$.pop();
|
|
5239
5242
|
}
|
|
5240
|
-
function
|
|
5243
|
+
function Shatter($$anchor, $$props) {
|
|
5241
5244
|
$.push($$props, true);
|
|
5242
5245
|
const DEFAULT_TRANSFORM = {
|
|
5243
5246
|
offsetX: 0,
|
|
@@ -5347,7 +5350,7 @@ function SolidColor($$anchor, $$props) {
|
|
|
5347
5350
|
children?.($$anchor);
|
|
5348
5351
|
$.pop();
|
|
5349
5352
|
}
|
|
5350
|
-
function
|
|
5353
|
+
function SimplexNoise($$anchor, $$props) {
|
|
5351
5354
|
$.push($$props, true);
|
|
5352
5355
|
const DEFAULT_TRANSFORM = {
|
|
5353
5356
|
offsetX: 0,
|
|
@@ -5457,7 +5460,7 @@ function Spherize($$anchor, $$props) {
|
|
|
5457
5460
|
children?.($$anchor);
|
|
5458
5461
|
$.pop();
|
|
5459
5462
|
}
|
|
5460
|
-
function
|
|
5463
|
+
function SineWave($$anchor, $$props) {
|
|
5461
5464
|
$.push($$props, true);
|
|
5462
5465
|
const DEFAULT_TRANSFORM = {
|
|
5463
5466
|
offsetX: 0,
|
|
@@ -5567,7 +5570,7 @@ function Spiral($$anchor, $$props) {
|
|
|
5567
5570
|
children?.($$anchor);
|
|
5568
5571
|
$.pop();
|
|
5569
5572
|
}
|
|
5570
|
-
function
|
|
5573
|
+
function SolidColor($$anchor, $$props) {
|
|
5571
5574
|
$.push($$props, true);
|
|
5572
5575
|
const DEFAULT_TRANSFORM = {
|
|
5573
5576
|
offsetX: 0,
|
|
@@ -5677,7 +5680,7 @@ function Strands($$anchor, $$props) {
|
|
|
5677
5680
|
children?.($$anchor);
|
|
5678
5681
|
$.pop();
|
|
5679
5682
|
}
|
|
5680
|
-
function
|
|
5683
|
+
function Spherize($$anchor, $$props) {
|
|
5681
5684
|
$.push($$props, true);
|
|
5682
5685
|
const DEFAULT_TRANSFORM = {
|
|
5683
5686
|
offsetX: 0,
|
|
@@ -5787,7 +5790,7 @@ function Stretch($$anchor, $$props) {
|
|
|
5787
5790
|
children?.($$anchor);
|
|
5788
5791
|
$.pop();
|
|
5789
5792
|
}
|
|
5790
|
-
function
|
|
5793
|
+
function Spiral($$anchor, $$props) {
|
|
5791
5794
|
$.push($$props, true);
|
|
5792
5795
|
const DEFAULT_TRANSFORM = {
|
|
5793
5796
|
offsetX: 0,
|
|
@@ -5897,7 +5900,7 @@ function Stripes($$anchor, $$props) {
|
|
|
5897
5900
|
children?.($$anchor);
|
|
5898
5901
|
$.pop();
|
|
5899
5902
|
}
|
|
5900
|
-
function
|
|
5903
|
+
function Strands($$anchor, $$props) {
|
|
5901
5904
|
$.push($$props, true);
|
|
5902
5905
|
const DEFAULT_TRANSFORM = {
|
|
5903
5906
|
offsetX: 0,
|
|
@@ -6007,7 +6010,7 @@ function Swirl($$anchor, $$props) {
|
|
|
6007
6010
|
children?.($$anchor);
|
|
6008
6011
|
$.pop();
|
|
6009
6012
|
}
|
|
6010
|
-
function
|
|
6013
|
+
function Stretch($$anchor, $$props) {
|
|
6011
6014
|
$.push($$props, true);
|
|
6012
6015
|
const DEFAULT_TRANSFORM = {
|
|
6013
6016
|
offsetX: 0,
|
|
@@ -6117,7 +6120,7 @@ function TiltShift($$anchor, $$props) {
|
|
|
6117
6120
|
children?.($$anchor);
|
|
6118
6121
|
$.pop();
|
|
6119
6122
|
}
|
|
6120
|
-
function
|
|
6123
|
+
function Stripes($$anchor, $$props) {
|
|
6121
6124
|
$.push($$props, true);
|
|
6122
6125
|
const DEFAULT_TRANSFORM = {
|
|
6123
6126
|
offsetX: 0,
|
|
@@ -6227,7 +6230,7 @@ function Tint($$anchor, $$props) {
|
|
|
6227
6230
|
children?.($$anchor);
|
|
6228
6231
|
$.pop();
|
|
6229
6232
|
}
|
|
6230
|
-
function
|
|
6233
|
+
function Swirl($$anchor, $$props) {
|
|
6231
6234
|
$.push($$props, true);
|
|
6232
6235
|
const DEFAULT_TRANSFORM = {
|
|
6233
6236
|
offsetX: 0,
|
|
@@ -6337,7 +6340,7 @@ function Tritone($$anchor, $$props) {
|
|
|
6337
6340
|
children?.($$anchor);
|
|
6338
6341
|
$.pop();
|
|
6339
6342
|
}
|
|
6340
|
-
function
|
|
6343
|
+
function TiltShift($$anchor, $$props) {
|
|
6341
6344
|
$.push($$props, true);
|
|
6342
6345
|
const DEFAULT_TRANSFORM = {
|
|
6343
6346
|
offsetX: 0,
|
|
@@ -6447,7 +6450,7 @@ function Twirl($$anchor, $$props) {
|
|
|
6447
6450
|
children?.($$anchor);
|
|
6448
6451
|
$.pop();
|
|
6449
6452
|
}
|
|
6450
|
-
function
|
|
6453
|
+
function Tint($$anchor, $$props) {
|
|
6451
6454
|
$.push($$props, true);
|
|
6452
6455
|
const DEFAULT_TRANSFORM = {
|
|
6453
6456
|
offsetX: 0,
|
|
@@ -6557,7 +6560,7 @@ function Vibrance($$anchor, $$props) {
|
|
|
6557
6560
|
children?.($$anchor);
|
|
6558
6561
|
$.pop();
|
|
6559
6562
|
}
|
|
6560
|
-
function
|
|
6563
|
+
function Tritone($$anchor, $$props) {
|
|
6561
6564
|
$.push($$props, true);
|
|
6562
6565
|
const DEFAULT_TRANSFORM = {
|
|
6563
6566
|
offsetX: 0,
|
|
@@ -6667,7 +6670,7 @@ function WaveDistortion($$anchor, $$props) {
|
|
|
6667
6670
|
children?.($$anchor);
|
|
6668
6671
|
$.pop();
|
|
6669
6672
|
}
|
|
6670
|
-
function
|
|
6673
|
+
function Twirl($$anchor, $$props) {
|
|
6671
6674
|
$.push($$props, true);
|
|
6672
6675
|
const DEFAULT_TRANSFORM = {
|
|
6673
6676
|
offsetX: 0,
|
|
@@ -6777,7 +6780,7 @@ function WebcamTexture($$anchor, $$props) {
|
|
|
6777
6780
|
children?.($$anchor);
|
|
6778
6781
|
$.pop();
|
|
6779
6782
|
}
|
|
6780
|
-
function
|
|
6783
|
+
function Vibrance($$anchor, $$props) {
|
|
6781
6784
|
$.push($$props, true);
|
|
6782
6785
|
const DEFAULT_TRANSFORM = {
|
|
6783
6786
|
offsetX: 0,
|
|
@@ -6887,6 +6890,336 @@ function ZoomBlur($$anchor, $$props) {
|
|
|
6887
6890
|
children?.($$anchor);
|
|
6888
6891
|
$.pop();
|
|
6889
6892
|
}
|
|
6893
|
+
function WaveDistortion($$anchor, $$props) {
|
|
6894
|
+
$.push($$props, true);
|
|
6895
|
+
const DEFAULT_TRANSFORM = {
|
|
6896
|
+
offsetX: 0,
|
|
6897
|
+
offsetY: 0,
|
|
6898
|
+
rotation: 0,
|
|
6899
|
+
scale: 1,
|
|
6900
|
+
anchorX: .5,
|
|
6901
|
+
anchorY: .5,
|
|
6902
|
+
edges: "transparent"
|
|
6903
|
+
};
|
|
6904
|
+
const componentDefaults = {
|
|
6905
|
+
blendMode: "normal",
|
|
6906
|
+
renderOrder: 0,
|
|
6907
|
+
visible: true,
|
|
6908
|
+
...Object.entries(componentDefinition$62.props).reduce((acc, [key, config]) => {
|
|
6909
|
+
acc[key] = config.default;
|
|
6910
|
+
return acc;
|
|
6911
|
+
}, {})
|
|
6912
|
+
};
|
|
6913
|
+
const props = $.rest_props($$props, [
|
|
6914
|
+
"$$slots",
|
|
6915
|
+
"$$events",
|
|
6916
|
+
"$$legacy"
|
|
6917
|
+
]);
|
|
6918
|
+
const blendMode = $$props.blendMode ?? componentDefaults.blendMode;
|
|
6919
|
+
const opacity = $$props.opacity;
|
|
6920
|
+
const visible = $$props.visible ?? componentDefaults.visible;
|
|
6921
|
+
const id = $$props.id;
|
|
6922
|
+
const maskSource = $$props.maskSource;
|
|
6923
|
+
const maskType = $$props.maskType;
|
|
6924
|
+
const renderOrder = $$props.renderOrder ?? componentDefaults.renderOrder;
|
|
6925
|
+
const { children } = props;
|
|
6926
|
+
const effectiveTransform = $.derived(() => ({
|
|
6927
|
+
...DEFAULT_TRANSFORM,
|
|
6928
|
+
...$$props.transform
|
|
6929
|
+
}));
|
|
6930
|
+
const parentId = getContext("shaderParentId");
|
|
6931
|
+
if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
6932
|
+
const instanceId = id || `${componentDefinition$62.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
|
|
6933
|
+
setContext("shaderParentId", instanceId);
|
|
6934
|
+
const shaderReadyProps = $.derived(() => {
|
|
6935
|
+
let baseProps = { ...componentDefaults };
|
|
6936
|
+
for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && key !== "children") {
|
|
6937
|
+
const propValue = props[key];
|
|
6938
|
+
const defaultValue = componentDefaults[key];
|
|
6939
|
+
if (propValue !== void 0 && propValue !== defaultValue) baseProps[key] = propValue;
|
|
6940
|
+
}
|
|
6941
|
+
return baseProps;
|
|
6942
|
+
});
|
|
6943
|
+
const uniforms = createUniformsMap(componentDefinition$62, $.get(shaderReadyProps), instanceId);
|
|
6944
|
+
const parentRegister = getContext("shaderNodeRegister");
|
|
6945
|
+
if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
6946
|
+
const parentUniformUpdate = getContext("shaderUniformUpdate");
|
|
6947
|
+
if (parentUniformUpdate === void 0) throw new Error("Shader components require shaderUniformUpdate from parent");
|
|
6948
|
+
const parentMetadataUpdate = getContext("shaderMetadataUpdate");
|
|
6949
|
+
if (parentMetadataUpdate === void 0) throw new Error("Shader components require shaderMetadataUpdate from parent");
|
|
6950
|
+
let isRegistered = $.state(false);
|
|
6951
|
+
Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
|
|
6952
|
+
$.user_effect(() => {
|
|
6953
|
+
if (!$.get(isRegistered)) return;
|
|
6954
|
+
if (uniform && uniform.value !== void 0) {
|
|
6955
|
+
const newValue = props[propName];
|
|
6956
|
+
if (newValue !== void 0) parentUniformUpdate(instanceId, propName, newValue);
|
|
6957
|
+
}
|
|
6958
|
+
});
|
|
6959
|
+
});
|
|
6960
|
+
$.user_effect(() => {
|
|
6961
|
+
if (!$.get(isRegistered)) return;
|
|
6962
|
+
parentMetadataUpdate(instanceId, {
|
|
6963
|
+
blendMode,
|
|
6964
|
+
opacity,
|
|
6965
|
+
visible: visible === false ? false : true,
|
|
6966
|
+
id,
|
|
6967
|
+
mask: maskSource ? {
|
|
6968
|
+
source: maskSource,
|
|
6969
|
+
type: maskType || "alpha"
|
|
6970
|
+
} : void 0,
|
|
6971
|
+
renderOrder,
|
|
6972
|
+
transform: $.get(effectiveTransform)
|
|
6973
|
+
});
|
|
6974
|
+
});
|
|
6975
|
+
onMount(() => {
|
|
6976
|
+
if (componentDefinition$62 && typeof componentDefinition$62.fragmentNode === "function") {
|
|
6977
|
+
parentRegister(instanceId, componentDefinition$62.fragmentNode, parentId, {
|
|
6978
|
+
blendMode,
|
|
6979
|
+
opacity,
|
|
6980
|
+
visible: visible !== false ? true : false,
|
|
6981
|
+
id,
|
|
6982
|
+
mask: maskSource ? {
|
|
6983
|
+
source: maskSource,
|
|
6984
|
+
type: maskType || "alpha"
|
|
6985
|
+
} : void 0,
|
|
6986
|
+
renderOrder,
|
|
6987
|
+
transform: $.get(effectiveTransform)
|
|
6988
|
+
}, uniforms);
|
|
6989
|
+
$.set(isRegistered, true);
|
|
6990
|
+
} else console.error("componentDefinition.fragmentNode is not a function:", {
|
|
6991
|
+
componentDefinition: componentDefinition$62,
|
|
6992
|
+
fragmentNode: componentDefinition$62?.fragmentNode,
|
|
6993
|
+
type: typeof componentDefinition$62?.fragmentNode
|
|
6994
|
+
});
|
|
6995
|
+
});
|
|
6996
|
+
onDestroy(() => {
|
|
6997
|
+
$.set(isRegistered, false);
|
|
6998
|
+
parentRegister(instanceId, null, null, null, null);
|
|
6999
|
+
});
|
|
7000
|
+
children?.($$anchor);
|
|
7001
|
+
$.pop();
|
|
7002
|
+
}
|
|
7003
|
+
function WebcamTexture($$anchor, $$props) {
|
|
7004
|
+
$.push($$props, true);
|
|
7005
|
+
const DEFAULT_TRANSFORM = {
|
|
7006
|
+
offsetX: 0,
|
|
7007
|
+
offsetY: 0,
|
|
7008
|
+
rotation: 0,
|
|
7009
|
+
scale: 1,
|
|
7010
|
+
anchorX: .5,
|
|
7011
|
+
anchorY: .5,
|
|
7012
|
+
edges: "transparent"
|
|
7013
|
+
};
|
|
7014
|
+
const componentDefaults = {
|
|
7015
|
+
blendMode: "normal",
|
|
7016
|
+
renderOrder: 0,
|
|
7017
|
+
visible: true,
|
|
7018
|
+
...Object.entries(componentDefinition$63.props).reduce((acc, [key, config]) => {
|
|
7019
|
+
acc[key] = config.default;
|
|
7020
|
+
return acc;
|
|
7021
|
+
}, {})
|
|
7022
|
+
};
|
|
7023
|
+
const props = $.rest_props($$props, [
|
|
7024
|
+
"$$slots",
|
|
7025
|
+
"$$events",
|
|
7026
|
+
"$$legacy"
|
|
7027
|
+
]);
|
|
7028
|
+
const blendMode = $$props.blendMode ?? componentDefaults.blendMode;
|
|
7029
|
+
const opacity = $$props.opacity;
|
|
7030
|
+
const visible = $$props.visible ?? componentDefaults.visible;
|
|
7031
|
+
const id = $$props.id;
|
|
7032
|
+
const maskSource = $$props.maskSource;
|
|
7033
|
+
const maskType = $$props.maskType;
|
|
7034
|
+
const renderOrder = $$props.renderOrder ?? componentDefaults.renderOrder;
|
|
7035
|
+
const { children } = props;
|
|
7036
|
+
const effectiveTransform = $.derived(() => ({
|
|
7037
|
+
...DEFAULT_TRANSFORM,
|
|
7038
|
+
...$$props.transform
|
|
7039
|
+
}));
|
|
7040
|
+
const parentId = getContext("shaderParentId");
|
|
7041
|
+
if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
7042
|
+
const instanceId = id || `${componentDefinition$63.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
|
|
7043
|
+
setContext("shaderParentId", instanceId);
|
|
7044
|
+
const shaderReadyProps = $.derived(() => {
|
|
7045
|
+
let baseProps = { ...componentDefaults };
|
|
7046
|
+
for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && key !== "children") {
|
|
7047
|
+
const propValue = props[key];
|
|
7048
|
+
const defaultValue = componentDefaults[key];
|
|
7049
|
+
if (propValue !== void 0 && propValue !== defaultValue) baseProps[key] = propValue;
|
|
7050
|
+
}
|
|
7051
|
+
return baseProps;
|
|
7052
|
+
});
|
|
7053
|
+
const uniforms = createUniformsMap(componentDefinition$63, $.get(shaderReadyProps), instanceId);
|
|
7054
|
+
const parentRegister = getContext("shaderNodeRegister");
|
|
7055
|
+
if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
7056
|
+
const parentUniformUpdate = getContext("shaderUniformUpdate");
|
|
7057
|
+
if (parentUniformUpdate === void 0) throw new Error("Shader components require shaderUniformUpdate from parent");
|
|
7058
|
+
const parentMetadataUpdate = getContext("shaderMetadataUpdate");
|
|
7059
|
+
if (parentMetadataUpdate === void 0) throw new Error("Shader components require shaderMetadataUpdate from parent");
|
|
7060
|
+
let isRegistered = $.state(false);
|
|
7061
|
+
Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
|
|
7062
|
+
$.user_effect(() => {
|
|
7063
|
+
if (!$.get(isRegistered)) return;
|
|
7064
|
+
if (uniform && uniform.value !== void 0) {
|
|
7065
|
+
const newValue = props[propName];
|
|
7066
|
+
if (newValue !== void 0) parentUniformUpdate(instanceId, propName, newValue);
|
|
7067
|
+
}
|
|
7068
|
+
});
|
|
7069
|
+
});
|
|
7070
|
+
$.user_effect(() => {
|
|
7071
|
+
if (!$.get(isRegistered)) return;
|
|
7072
|
+
parentMetadataUpdate(instanceId, {
|
|
7073
|
+
blendMode,
|
|
7074
|
+
opacity,
|
|
7075
|
+
visible: visible === false ? false : true,
|
|
7076
|
+
id,
|
|
7077
|
+
mask: maskSource ? {
|
|
7078
|
+
source: maskSource,
|
|
7079
|
+
type: maskType || "alpha"
|
|
7080
|
+
} : void 0,
|
|
7081
|
+
renderOrder,
|
|
7082
|
+
transform: $.get(effectiveTransform)
|
|
7083
|
+
});
|
|
7084
|
+
});
|
|
7085
|
+
onMount(() => {
|
|
7086
|
+
if (componentDefinition$63 && typeof componentDefinition$63.fragmentNode === "function") {
|
|
7087
|
+
parentRegister(instanceId, componentDefinition$63.fragmentNode, parentId, {
|
|
7088
|
+
blendMode,
|
|
7089
|
+
opacity,
|
|
7090
|
+
visible: visible !== false ? true : false,
|
|
7091
|
+
id,
|
|
7092
|
+
mask: maskSource ? {
|
|
7093
|
+
source: maskSource,
|
|
7094
|
+
type: maskType || "alpha"
|
|
7095
|
+
} : void 0,
|
|
7096
|
+
renderOrder,
|
|
7097
|
+
transform: $.get(effectiveTransform)
|
|
7098
|
+
}, uniforms);
|
|
7099
|
+
$.set(isRegistered, true);
|
|
7100
|
+
} else console.error("componentDefinition.fragmentNode is not a function:", {
|
|
7101
|
+
componentDefinition: componentDefinition$63,
|
|
7102
|
+
fragmentNode: componentDefinition$63?.fragmentNode,
|
|
7103
|
+
type: typeof componentDefinition$63?.fragmentNode
|
|
7104
|
+
});
|
|
7105
|
+
});
|
|
7106
|
+
onDestroy(() => {
|
|
7107
|
+
$.set(isRegistered, false);
|
|
7108
|
+
parentRegister(instanceId, null, null, null, null);
|
|
7109
|
+
});
|
|
7110
|
+
children?.($$anchor);
|
|
7111
|
+
$.pop();
|
|
7112
|
+
}
|
|
7113
|
+
function ZoomBlur($$anchor, $$props) {
|
|
7114
|
+
$.push($$props, true);
|
|
7115
|
+
const DEFAULT_TRANSFORM = {
|
|
7116
|
+
offsetX: 0,
|
|
7117
|
+
offsetY: 0,
|
|
7118
|
+
rotation: 0,
|
|
7119
|
+
scale: 1,
|
|
7120
|
+
anchorX: .5,
|
|
7121
|
+
anchorY: .5,
|
|
7122
|
+
edges: "transparent"
|
|
7123
|
+
};
|
|
7124
|
+
const componentDefaults = {
|
|
7125
|
+
blendMode: "normal",
|
|
7126
|
+
renderOrder: 0,
|
|
7127
|
+
visible: true,
|
|
7128
|
+
...Object.entries(componentDefinition$64.props).reduce((acc, [key, config]) => {
|
|
7129
|
+
acc[key] = config.default;
|
|
7130
|
+
return acc;
|
|
7131
|
+
}, {})
|
|
7132
|
+
};
|
|
7133
|
+
const props = $.rest_props($$props, [
|
|
7134
|
+
"$$slots",
|
|
7135
|
+
"$$events",
|
|
7136
|
+
"$$legacy"
|
|
7137
|
+
]);
|
|
7138
|
+
const blendMode = $$props.blendMode ?? componentDefaults.blendMode;
|
|
7139
|
+
const opacity = $$props.opacity;
|
|
7140
|
+
const visible = $$props.visible ?? componentDefaults.visible;
|
|
7141
|
+
const id = $$props.id;
|
|
7142
|
+
const maskSource = $$props.maskSource;
|
|
7143
|
+
const maskType = $$props.maskType;
|
|
7144
|
+
const renderOrder = $$props.renderOrder ?? componentDefaults.renderOrder;
|
|
7145
|
+
const { children } = props;
|
|
7146
|
+
const effectiveTransform = $.derived(() => ({
|
|
7147
|
+
...DEFAULT_TRANSFORM,
|
|
7148
|
+
...$$props.transform
|
|
7149
|
+
}));
|
|
7150
|
+
const parentId = getContext("shaderParentId");
|
|
7151
|
+
if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
7152
|
+
const instanceId = id || `${componentDefinition$64.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
|
|
7153
|
+
setContext("shaderParentId", instanceId);
|
|
7154
|
+
const shaderReadyProps = $.derived(() => {
|
|
7155
|
+
let baseProps = { ...componentDefaults };
|
|
7156
|
+
for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && key !== "children") {
|
|
7157
|
+
const propValue = props[key];
|
|
7158
|
+
const defaultValue = componentDefaults[key];
|
|
7159
|
+
if (propValue !== void 0 && propValue !== defaultValue) baseProps[key] = propValue;
|
|
7160
|
+
}
|
|
7161
|
+
return baseProps;
|
|
7162
|
+
});
|
|
7163
|
+
const uniforms = createUniformsMap(componentDefinition$64, $.get(shaderReadyProps), instanceId);
|
|
7164
|
+
const parentRegister = getContext("shaderNodeRegister");
|
|
7165
|
+
if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
7166
|
+
const parentUniformUpdate = getContext("shaderUniformUpdate");
|
|
7167
|
+
if (parentUniformUpdate === void 0) throw new Error("Shader components require shaderUniformUpdate from parent");
|
|
7168
|
+
const parentMetadataUpdate = getContext("shaderMetadataUpdate");
|
|
7169
|
+
if (parentMetadataUpdate === void 0) throw new Error("Shader components require shaderMetadataUpdate from parent");
|
|
7170
|
+
let isRegistered = $.state(false);
|
|
7171
|
+
Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
|
|
7172
|
+
$.user_effect(() => {
|
|
7173
|
+
if (!$.get(isRegistered)) return;
|
|
7174
|
+
if (uniform && uniform.value !== void 0) {
|
|
7175
|
+
const newValue = props[propName];
|
|
7176
|
+
if (newValue !== void 0) parentUniformUpdate(instanceId, propName, newValue);
|
|
7177
|
+
}
|
|
7178
|
+
});
|
|
7179
|
+
});
|
|
7180
|
+
$.user_effect(() => {
|
|
7181
|
+
if (!$.get(isRegistered)) return;
|
|
7182
|
+
parentMetadataUpdate(instanceId, {
|
|
7183
|
+
blendMode,
|
|
7184
|
+
opacity,
|
|
7185
|
+
visible: visible === false ? false : true,
|
|
7186
|
+
id,
|
|
7187
|
+
mask: maskSource ? {
|
|
7188
|
+
source: maskSource,
|
|
7189
|
+
type: maskType || "alpha"
|
|
7190
|
+
} : void 0,
|
|
7191
|
+
renderOrder,
|
|
7192
|
+
transform: $.get(effectiveTransform)
|
|
7193
|
+
});
|
|
7194
|
+
});
|
|
7195
|
+
onMount(() => {
|
|
7196
|
+
if (componentDefinition$64 && typeof componentDefinition$64.fragmentNode === "function") {
|
|
7197
|
+
parentRegister(instanceId, componentDefinition$64.fragmentNode, parentId, {
|
|
7198
|
+
blendMode,
|
|
7199
|
+
opacity,
|
|
7200
|
+
visible: visible !== false ? true : false,
|
|
7201
|
+
id,
|
|
7202
|
+
mask: maskSource ? {
|
|
7203
|
+
source: maskSource,
|
|
7204
|
+
type: maskType || "alpha"
|
|
7205
|
+
} : void 0,
|
|
7206
|
+
renderOrder,
|
|
7207
|
+
transform: $.get(effectiveTransform)
|
|
7208
|
+
}, uniforms);
|
|
7209
|
+
$.set(isRegistered, true);
|
|
7210
|
+
} else console.error("componentDefinition.fragmentNode is not a function:", {
|
|
7211
|
+
componentDefinition: componentDefinition$64,
|
|
7212
|
+
fragmentNode: componentDefinition$64?.fragmentNode,
|
|
7213
|
+
type: typeof componentDefinition$64?.fragmentNode
|
|
7214
|
+
});
|
|
7215
|
+
});
|
|
7216
|
+
onDestroy(() => {
|
|
7217
|
+
$.set(isRegistered, false);
|
|
7218
|
+
parentRegister(instanceId, null, null, null, null);
|
|
7219
|
+
});
|
|
7220
|
+
children?.($$anchor);
|
|
7221
|
+
$.pop();
|
|
7222
|
+
}
|
|
6890
7223
|
var root = $.from_html(`<div><canvas data-renderer="shaders" style="width: 100%; height: 100%; display: block;"></canvas> <!></div>`);
|
|
6891
7224
|
function Shader($$anchor, $$props) {
|
|
6892
7225
|
$.push($$props, true);
|
|
@@ -7002,4 +7335,4 @@ function Shader($$anchor, $$props) {
|
|
|
7002
7335
|
$.append($$anchor, div);
|
|
7003
7336
|
$.pop();
|
|
7004
7337
|
}
|
|
7005
|
-
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 };
|
|
7338
|
+
export { AngularBlur, Ascii, Beam, Blob, Blur, BrightnessContrast, Bulge, CRTScreen, ChannelBlur, Checkerboard, ChromaFlow, ChromaticAberration, Circle, CursorTrail, DiffuseBlur, Dither, DotGrid, Duotone, FilmGrain, FloatingParticles, FlowField, GlassTiles, Glow, Godrays, Grayscale, Grid, GridDistortion, Group, Halftone, HueShift, ImageTexture, Invert, Kaleidoscope, LinearBlur, LinearGradient, Liquify, Mirror, 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 };
|