shaders 2.3.65 → 2.3.67

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 (113) hide show
  1. package/dist/core/{Aurora-CYCPE1wp.js → Aurora-NksIvzEl.js} +3 -2
  2. package/dist/core/{Beam-COjEb2JI.js → Beam-CprkmCUE.js} +3 -2
  3. package/dist/core/{Blob-jHnoxt2N.js → Blob-Bbq8XbWa.js} +3 -2
  4. package/dist/core/{Bulge-CsNj4Jew.js → Bulge-iv4gvOrb.js} +3 -2
  5. package/dist/core/{Checkerboard-DwiW08iJ.js → Checkerboard-DgAStqo1.js} +3 -2
  6. package/dist/core/{Circle-CUYMdgd5.js → Circle-CNU59YUv.js} +3 -2
  7. package/dist/core/{ConcentricSpin-DBqXmCjg.js → ConcentricSpin-Dq4fuhxf.js} +3 -2
  8. package/dist/core/{CursorRipples-JWrDL_dU.js → CursorRipples-CG13qsO5.js} +5 -4
  9. package/dist/core/{CursorTrail-D2_14ZEz.js → CursorTrail-BBTqzAWC.js} +3 -2
  10. package/dist/core/{DiffuseBlur-siJmc-84.js → DiffuseBlur-CpB0j4XW.js} +3 -2
  11. package/dist/core/{Dither-GoyNQ4_v.js → Dither-DO8Q9sfQ.js} +33 -12
  12. package/dist/core/{Duotone-CRiDL3YN.js → Duotone-CyTYB0rJ.js} +3 -2
  13. package/dist/core/{FlowField-B-sNApu9.js → FlowField-Ynwwfkic.js} +3 -2
  14. package/dist/core/{GridDistortion-CKhOZRpM.js → GridDistortion-C_av0CL_.js} +3 -2
  15. package/dist/core/{Kaleidoscope-BDTIWTFC.js → Kaleidoscope-BFoudqX3.js} +5 -4
  16. package/dist/core/{LensFlare-CxyJBEvr.js → LensFlare-sRuR8OkY.js} +4 -4
  17. package/dist/core/{LinearGradient-BP91wtXm.js → LinearGradient-HhfaMKwI.js} +27 -14
  18. package/dist/core/{Liquify-2u2lkBhB.js → Liquify-Ad7waFTE.js} +3 -2
  19. package/dist/core/{Mirror-BonA1elw.js → Mirror-BgbXJY0N.js} +3 -2
  20. package/dist/core/{Perspective-Cwpv4683.js → Perspective-BZnZPXEf.js} +3 -2
  21. package/dist/core/{Plasma-BU4ujuLB.js → Plasma-BfyFnIWL.js} +3 -2
  22. package/dist/core/{PolarCoordinates-6BZYZFoj.js → PolarCoordinates-IItXQawD.js} +3 -2
  23. package/dist/core/{RadialGradient-DauSwpwY.js → RadialGradient-BtLDAPYQ.js} +3 -2
  24. package/dist/core/{RectangularCoordinates-C5585uvf.js → RectangularCoordinates-DoXEjIhd.js} +3 -2
  25. package/dist/core/{Ripples-QWGujQgy.js → Ripples-5SBqOFLG.js} +2 -2
  26. package/dist/core/{Shatter-DRSn9uGZ.js → Shatter-CT5oSWfn.js} +6 -5
  27. package/dist/core/{SimplexNoise-W0fx_Y5Q.js → SimplexNoise-D9d1EuGu.js} +3 -3
  28. package/dist/core/{Spiral-DWBdkW7Y.js → Spiral-6tSyCqRu.js} +3 -2
  29. package/dist/core/{Stretch-CB92XLiC.js → Stretch-CIkhKgUB.js} +3 -2
  30. package/dist/core/{Stripes-CTmvjI0U.js → Stripes-Bqb8_lUf.js} +3 -2
  31. package/dist/core/{Swirl-DVaTB8HY.js → Swirl-CzI_Fddg.js} +3 -2
  32. package/dist/core/{Tritone-BETUi-og.js → Tritone-DMAv26OS.js} +5 -3
  33. package/dist/core/{Twirl-BUlMUymT.js → Twirl-CFMQvxzf.js} +3 -2
  34. package/dist/core/{WaveDistortion-D8LOc-Dc.js → WaveDistortion-BlF3UOIL.js} +23 -15
  35. package/dist/core/{colorMixing-D_wMclqL.js → colorMixing-jSm3tbMv.js} +40 -19
  36. package/dist/core/edges-CfGcQniB.js +25 -0
  37. package/dist/core/index.js +13 -3
  38. package/dist/core/registry.js +36 -36
  39. package/dist/core/renderer.d.ts.map +1 -1
  40. package/dist/core/shaders/Aurora/index.d.ts.map +1 -1
  41. package/dist/core/shaders/Aurora/index.js +2 -2
  42. package/dist/core/shaders/Beam/index.d.ts.map +1 -1
  43. package/dist/core/shaders/Beam/index.js +2 -2
  44. package/dist/core/shaders/Blob/index.d.ts.map +1 -1
  45. package/dist/core/shaders/Blob/index.js +2 -2
  46. package/dist/core/shaders/Bulge/index.d.ts.map +1 -1
  47. package/dist/core/shaders/Bulge/index.js +2 -2
  48. package/dist/core/shaders/Checkerboard/index.d.ts.map +1 -1
  49. package/dist/core/shaders/Checkerboard/index.js +2 -2
  50. package/dist/core/shaders/Circle/index.d.ts.map +1 -1
  51. package/dist/core/shaders/Circle/index.js +2 -2
  52. package/dist/core/shaders/ConcentricSpin/index.d.ts.map +1 -1
  53. package/dist/core/shaders/ConcentricSpin/index.js +2 -2
  54. package/dist/core/shaders/CursorRipples/index.d.ts.map +1 -1
  55. package/dist/core/shaders/CursorRipples/index.js +2 -2
  56. package/dist/core/shaders/CursorTrail/index.d.ts.map +1 -1
  57. package/dist/core/shaders/CursorTrail/index.js +2 -2
  58. package/dist/core/shaders/DiffuseBlur/index.d.ts.map +1 -1
  59. package/dist/core/shaders/DiffuseBlur/index.js +2 -2
  60. package/dist/core/shaders/Dither/index.d.ts.map +1 -1
  61. package/dist/core/shaders/Dither/index.js +1 -1
  62. package/dist/core/shaders/Duotone/index.d.ts.map +1 -1
  63. package/dist/core/shaders/Duotone/index.js +2 -2
  64. package/dist/core/shaders/FlowField/index.d.ts.map +1 -1
  65. package/dist/core/shaders/FlowField/index.js +2 -2
  66. package/dist/core/shaders/GridDistortion/index.d.ts.map +1 -1
  67. package/dist/core/shaders/GridDistortion/index.js +2 -2
  68. package/dist/core/shaders/Kaleidoscope/index.d.ts.map +1 -1
  69. package/dist/core/shaders/Kaleidoscope/index.js +2 -2
  70. package/dist/core/shaders/LensFlare/index.js +1 -1
  71. package/dist/core/shaders/LinearGradient/index.d.ts.map +1 -1
  72. package/dist/core/shaders/LinearGradient/index.js +2 -2
  73. package/dist/core/shaders/Liquify/index.d.ts.map +1 -1
  74. package/dist/core/shaders/Liquify/index.js +2 -2
  75. package/dist/core/shaders/Mirror/index.d.ts.map +1 -1
  76. package/dist/core/shaders/Mirror/index.js +2 -2
  77. package/dist/core/shaders/Perspective/index.d.ts.map +1 -1
  78. package/dist/core/shaders/Perspective/index.js +2 -2
  79. package/dist/core/shaders/Plasma/index.d.ts.map +1 -1
  80. package/dist/core/shaders/Plasma/index.js +2 -2
  81. package/dist/core/shaders/PolarCoordinates/index.d.ts.map +1 -1
  82. package/dist/core/shaders/PolarCoordinates/index.js +2 -2
  83. package/dist/core/shaders/RadialGradient/index.d.ts.map +1 -1
  84. package/dist/core/shaders/RadialGradient/index.js +2 -2
  85. package/dist/core/shaders/RectangularCoordinates/index.d.ts.map +1 -1
  86. package/dist/core/shaders/RectangularCoordinates/index.js +2 -2
  87. package/dist/core/shaders/Ripples/index.js +2 -2
  88. package/dist/core/shaders/Shatter/index.d.ts.map +1 -1
  89. package/dist/core/shaders/Shatter/index.js +2 -2
  90. package/dist/core/shaders/SimplexNoise/index.js +2 -2
  91. package/dist/core/shaders/Spiral/index.d.ts.map +1 -1
  92. package/dist/core/shaders/Spiral/index.js +2 -2
  93. package/dist/core/shaders/Stretch/index.d.ts.map +1 -1
  94. package/dist/core/shaders/Stretch/index.js +2 -2
  95. package/dist/core/shaders/Stripes/index.d.ts.map +1 -1
  96. package/dist/core/shaders/Stripes/index.js +2 -2
  97. package/dist/core/shaders/Swirl/index.d.ts.map +1 -1
  98. package/dist/core/shaders/Swirl/index.js +2 -2
  99. package/dist/core/shaders/Tritone/index.d.ts.map +1 -1
  100. package/dist/core/shaders/Tritone/index.js +2 -2
  101. package/dist/core/shaders/Twirl/index.d.ts.map +1 -1
  102. package/dist/core/shaders/Twirl/index.js +2 -2
  103. package/dist/core/shaders/WaveDistortion/index.js +2 -2
  104. package/dist/core/types.d.ts +2 -0
  105. package/dist/core/types.d.ts.map +1 -1
  106. package/dist/core/utilities/colorMixing.d.ts +7 -2
  107. package/dist/core/utilities/colorMixing.d.ts.map +1 -1
  108. package/dist/core/utilities/edges.d.ts +4 -4
  109. package/dist/core/utilities/edges.d.ts.map +1 -1
  110. package/dist/core/utilities/uniforms.d.ts.map +1 -1
  111. package/dist/registry.js +34 -0
  112. package/package.json +2 -2
  113. package/dist/core/edges-Bd7GP4s2.js +0 -16
@@ -7,10 +7,10 @@ import { Node, TextureNode } from 'three/webgpu';
7
7
  * before the next distortion transforms those UVs further.
8
8
  *
9
9
  * @param uv The UV coordinates to transform
10
- * @param edgeModeUniform The edge mode (0=stretch, 1=transparent, 2=mirror, 3=wrap)
10
+ * @param edgeMode The edge mode (0=stretch, 1=transparent, 2=mirror, 3=wrap)
11
11
  * @returns Transformed UV coordinates
12
12
  */
13
- export declare const applyEdgeToUV: (uv: Node, edgeModeUniform: Node) => Node;
13
+ export declare const applyEdgeToUV: (uv: Node, edgeMode: number) => Node;
14
14
  /**
15
15
  * Applies edge handling to sampled colors based on UV bounds.
16
16
  * Supports multiple modes for handling distorted UVs that fall outside the 0-1 range.
@@ -18,8 +18,8 @@ export declare const applyEdgeToUV: (uv: Node, edgeModeUniform: Node) => Node;
18
18
  * @param distortedUV The distorted UV coordinates (vec2)
19
19
  * @param sampledColor The color sampled with clamped UVs
20
20
  * @param childTexture The texture to sample from (needed for mirror/wrap modes). Can be null for non-RTT path.
21
- * @param edgeModeUniform The edge handling uniform (0 = stretch, 1 = transparent, 2 = mirror, 3 = wrap)
21
+ * @param edgeMode The edge handling mode (0 = stretch, 1 = transparent, 2 = mirror, 3 = wrap)
22
22
  * @returns The final color with edge handling applied
23
23
  */
24
- export declare const applyEdgeHandling: (distortedUV: Node, sampledColor: Node, childTexture: TextureNode | null, edgeModeUniform: Node) => Node;
24
+ export declare const applyEdgeHandling: (distortedUV: Node, sampledColor: Node, childTexture: TextureNode | null, edgeMode: number) => Node;
25
25
  //# sourceMappingURL=edges.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"edges.d.ts","sourceRoot":"","sources":["../../src/utilities/edges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,WAAW,EAAC,MAAM,cAAc,CAAA;AAE9C;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,OAAQ,IAAI,mBAAmB,IAAI,KAAG,IA6B/D,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,gBACb,IAAI,gBACH,IAAI,gBACJ,WAAW,GAAG,IAAI,mBACf,IAAI,KACtB,IA+CF,CAAA"}
1
+ {"version":3,"file":"edges.d.ts","sourceRoot":"","sources":["../../src/utilities/edges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,WAAW,EAAC,MAAM,cAAc,CAAA;AAE9C;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,OAAQ,IAAI,YAAY,MAAM,KAAG,IAsB1D,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,gBACb,IAAI,gBACH,IAAI,gBACJ,WAAW,GAAG,IAAI,YACtB,MAAM,KACjB,IAgCF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"uniforms.d.ts","sourceRoot":"","sources":["../../src/utilities/uniforms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAUhE,wBAAgB,iBAAiB,CAC7B,SAAS,EAAE,mBAAmB,EAC9B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClC,UAAU,EAAE,MAAM,GACnB,WAAW,CAkDb;AAED,wBAAgB,kBAAkB,CAC9B,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,EAC5B,QAAQ,EAAE,GAAG,GACd,IAAI,CA6BN"}
1
+ {"version":3,"file":"uniforms.d.ts","sourceRoot":"","sources":["../../src/utilities/uniforms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAUhE,wBAAgB,iBAAiB,CAC7B,SAAS,EAAE,mBAAmB,EAC9B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClC,UAAU,EAAE,MAAM,GACnB,WAAW,CAmDb;AAED,wBAAgB,kBAAkB,CAC9B,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,EAC5B,QAAQ,EAAE,GAAG,GACd,IAAI,CA6BN"}
package/dist/registry.js CHANGED
@@ -431,6 +431,7 @@ export const shaderRegistry = [
431
431
  },
432
432
  "colorSpace": {
433
433
  "default": "linear",
434
+ "compileTime": true,
434
435
  "description": "Color space for color interpolation",
435
436
  "ui": {
436
437
  "type": "select",
@@ -849,6 +850,7 @@ export const shaderRegistry = [
849
850
  },
850
851
  "colorSpace": {
851
852
  "default": "linear",
853
+ "compileTime": true,
852
854
  "description": "Color space for color interpolation",
853
855
  "ui": {
854
856
  "type": "select",
@@ -1171,6 +1173,7 @@ export const shaderRegistry = [
1171
1173
  },
1172
1174
  "colorSpace": {
1173
1175
  "default": "linear",
1176
+ "compileTime": true,
1174
1177
  "description": "Color space for color interpolation",
1175
1178
  "ui": {
1176
1179
  "type": "select",
@@ -1562,6 +1565,7 @@ export const shaderRegistry = [
1562
1565
  "edges": {
1563
1566
  "default": "stretch",
1564
1567
  "description": "How to handle edges when distortion pushes content out of bounds",
1568
+ "compileTime": true,
1565
1569
  "ui": {
1566
1570
  "type": "select",
1567
1571
  "options": [
@@ -1810,6 +1814,7 @@ export const shaderRegistry = [
1810
1814
  },
1811
1815
  "colorSpace": {
1812
1816
  "default": "linear",
1817
+ "compileTime": true,
1813
1818
  "description": "Color space for color interpolation",
1814
1819
  "ui": {
1815
1820
  "type": "select",
@@ -2341,6 +2346,7 @@ export const shaderRegistry = [
2341
2346
  },
2342
2347
  "colorSpace": {
2343
2348
  "default": "linear",
2349
+ "compileTime": true,
2344
2350
  "description": "Color space for blending fill and stroke colors in soft edges",
2345
2351
  "ui": {
2346
2352
  "type": "select",
@@ -2591,6 +2597,7 @@ export const shaderRegistry = [
2591
2597
  "edges": {
2592
2598
  "default": "mirror",
2593
2599
  "description": "How to handle edges when distortion pushes content out of bounds",
2600
+ "compileTime": true,
2594
2601
  "ui": {
2595
2602
  "type": "select",
2596
2603
  "options": [
@@ -3272,6 +3279,7 @@ export const shaderRegistry = [
3272
3279
  "edges": {
3273
3280
  "default": "stretch",
3274
3281
  "description": "How to handle edges when distortion pushes content out of bounds",
3282
+ "compileTime": true,
3275
3283
  "ui": {
3276
3284
  "type": "select",
3277
3285
  "options": [
@@ -3442,6 +3450,7 @@ export const shaderRegistry = [
3442
3450
  },
3443
3451
  "colorSpace": {
3444
3452
  "default": "linear",
3453
+ "compileTime": true,
3445
3454
  "description": "Color space for color interpolation",
3446
3455
  "ui": {
3447
3456
  "type": "select",
@@ -3597,6 +3606,7 @@ export const shaderRegistry = [
3597
3606
  "edges": {
3598
3607
  "default": "stretch",
3599
3608
  "description": "How to handle edges when distortion pushes content out of bounds",
3609
+ "compileTime": true,
3600
3610
  "ui": {
3601
3611
  "type": "select",
3602
3612
  "options": [
@@ -3680,6 +3690,7 @@ export const shaderRegistry = [
3680
3690
  "props": {
3681
3691
  "pattern": {
3682
3692
  "default": "bayer4",
3693
+ "compileTime": true,
3683
3694
  "description": "Dithering pattern algorithm",
3684
3695
  "ui": {
3685
3696
  "type": "select",
@@ -3751,6 +3762,7 @@ export const shaderRegistry = [
3751
3762
  },
3752
3763
  "colorMode": {
3753
3764
  "default": "custom",
3765
+ "compileTime": true,
3754
3766
  "description": "How colors are determined",
3755
3767
  "ui": {
3756
3768
  "type": "select",
@@ -4061,6 +4073,7 @@ export const shaderRegistry = [
4061
4073
  },
4062
4074
  "colorSpace": {
4063
4075
  "default": "linear",
4076
+ "compileTime": true,
4064
4077
  "description": "Color space for color interpolation",
4065
4078
  "ui": {
4066
4079
  "type": "select",
@@ -4531,6 +4544,7 @@ export const shaderRegistry = [
4531
4544
  "edges": {
4532
4545
  "default": "mirror",
4533
4546
  "description": "How to handle edges when distortion pushes content out of bounds",
4547
+ "compileTime": true,
4534
4548
  "ui": {
4535
4549
  "type": "select",
4536
4550
  "options": [
@@ -5345,6 +5359,7 @@ export const shaderRegistry = [
5345
5359
  "edges": {
5346
5360
  "default": "stretch",
5347
5361
  "description": "How to handle edges when distortion pushes content out of bounds",
5362
+ "compileTime": true,
5348
5363
  "ui": {
5349
5364
  "type": "select",
5350
5365
  "options": [
@@ -5756,6 +5771,7 @@ export const shaderRegistry = [
5756
5771
  "edges": {
5757
5772
  "default": "mirror",
5758
5773
  "description": "How to handle edges when distortion pushes content out of bounds",
5774
+ "compileTime": true,
5759
5775
  "ui": {
5760
5776
  "type": "select",
5761
5777
  "options": [
@@ -6403,6 +6419,7 @@ export const shaderRegistry = [
6403
6419
  },
6404
6420
  "edges": {
6405
6421
  "default": "stretch",
6422
+ "compileTime": true,
6406
6423
  "description": "How to handle areas beyond the gradient endpoints",
6407
6424
  "ui": {
6408
6425
  "type": "select",
@@ -6430,6 +6447,7 @@ export const shaderRegistry = [
6430
6447
  },
6431
6448
  "colorSpace": {
6432
6449
  "default": "linear",
6450
+ "compileTime": true,
6433
6451
  "description": "Color space for color interpolation",
6434
6452
  "ui": {
6435
6453
  "type": "select",
@@ -6636,6 +6654,7 @@ export const shaderRegistry = [
6636
6654
  "edges": {
6637
6655
  "default": "stretch",
6638
6656
  "description": "How to handle edges when distortion pushes content out of bounds",
6657
+ "compileTime": true,
6639
6658
  "ui": {
6640
6659
  "type": "select",
6641
6660
  "options": [
@@ -6768,6 +6787,7 @@ export const shaderRegistry = [
6768
6787
  "edges": {
6769
6788
  "default": "mirror",
6770
6789
  "description": "How to handle edges when distortion pushes content out of bounds",
6790
+ "compileTime": true,
6771
6791
  "ui": {
6772
6792
  "type": "select",
6773
6793
  "options": [
@@ -6936,6 +6956,7 @@ export const shaderRegistry = [
6936
6956
  "edges": {
6937
6957
  "default": "transparent",
6938
6958
  "description": "How to handle edges",
6959
+ "compileTime": true,
6939
6960
  "ui": {
6940
6961
  "type": "select",
6941
6962
  "options": [
@@ -7208,6 +7229,7 @@ export const shaderRegistry = [
7208
7229
  },
7209
7230
  "colorSpace": {
7210
7231
  "default": "linear",
7232
+ "compileTime": true,
7211
7233
  "description": "Color space for color interpolation",
7212
7234
  "ui": {
7213
7235
  "type": "select",
@@ -7435,6 +7457,7 @@ export const shaderRegistry = [
7435
7457
  "edges": {
7436
7458
  "default": "transparent",
7437
7459
  "description": "How to handle edges when distortion pushes content out of bounds",
7460
+ "compileTime": true,
7438
7461
  "ui": {
7439
7462
  "type": "select",
7440
7463
  "options": [
@@ -7748,6 +7771,7 @@ export const shaderRegistry = [
7748
7771
  },
7749
7772
  "colorSpace": {
7750
7773
  "default": "linear",
7774
+ "compileTime": true,
7751
7775
  "description": "Color space for color interpolation",
7752
7776
  "ui": {
7753
7777
  "type": "select",
@@ -7915,6 +7939,7 @@ export const shaderRegistry = [
7915
7939
  "edges": {
7916
7940
  "default": "transparent",
7917
7941
  "description": "How to handle edges when distortion pushes content out of bounds",
7942
+ "compileTime": true,
7918
7943
  "ui": {
7919
7944
  "type": "select",
7920
7945
  "options": [
@@ -8397,6 +8422,7 @@ export const shaderRegistry = [
8397
8422
  "edges": {
8398
8423
  "default": "mirror",
8399
8424
  "description": "How to handle edges when displacement pushes content out of bounds",
8425
+ "compileTime": true,
8400
8426
  "ui": {
8401
8427
  "type": "select",
8402
8428
  "options": [
@@ -9236,6 +9262,7 @@ export const shaderRegistry = [
9236
9262
  },
9237
9263
  "colorSpace": {
9238
9264
  "default": "linear",
9265
+ "compileTime": true,
9239
9266
  "description": "Color space for color interpolation",
9240
9267
  "ui": {
9241
9268
  "type": "select",
@@ -9685,6 +9712,7 @@ export const shaderRegistry = [
9685
9712
  "edges": {
9686
9713
  "default": "stretch",
9687
9714
  "description": "How to handle edges when distortion pushes content out of bounds",
9715
+ "compileTime": true,
9688
9716
  "ui": {
9689
9717
  "type": "select",
9690
9718
  "options": [
@@ -9891,6 +9919,7 @@ export const shaderRegistry = [
9891
9919
  },
9892
9920
  "colorSpace": {
9893
9921
  "default": "linear",
9922
+ "compileTime": true,
9894
9923
  "description": "Color space for interpolation",
9895
9924
  "ui": {
9896
9925
  "type": "select",
@@ -10567,6 +10596,7 @@ export const shaderRegistry = [
10567
10596
  },
10568
10597
  "colorSpace": {
10569
10598
  "default": "linear",
10599
+ "compileTime": true,
10570
10600
  "description": "Color space for color interpolation",
10571
10601
  "ui": {
10572
10602
  "type": "select",
@@ -10963,6 +10993,7 @@ export const shaderRegistry = [
10963
10993
  },
10964
10994
  "colorSpace": {
10965
10995
  "default": "linear",
10996
+ "compileTime": true,
10966
10997
  "description": "Color space for color interpolation",
10967
10998
  "ui": {
10968
10999
  "type": "select",
@@ -11115,6 +11146,7 @@ export const shaderRegistry = [
11115
11146
  "edges": {
11116
11147
  "default": "stretch",
11117
11148
  "description": "How to handle edges when distortion pushes content out of bounds",
11149
+ "compileTime": true,
11118
11150
  "ui": {
11119
11151
  "type": "select",
11120
11152
  "options": [
@@ -11413,6 +11445,7 @@ export const shaderRegistry = [
11413
11445
  "waveType": {
11414
11446
  "default": "sine",
11415
11447
  "description": "Shape of the distortion wave",
11448
+ "compileTime": true,
11416
11449
  "ui": {
11417
11450
  "type": "select",
11418
11451
  "options": [
@@ -11444,6 +11477,7 @@ export const shaderRegistry = [
11444
11477
  "edges": {
11445
11478
  "default": "stretch",
11446
11479
  "description": "How to handle edges when distortion pushes content out of bounds",
11480
+ "compileTime": true,
11447
11481
  "ui": {
11448
11482
  "type": "select",
11449
11483
  "options": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shaders",
3
- "version": "2.3.65",
3
+ "version": "2.3.67",
4
4
  "description": "Shader magic for modern frontends",
5
5
  "author": "Shader Effects Inc.",
6
6
  "homepage": "https://shaders.com/",
@@ -705,7 +705,7 @@
705
705
  "typecheck": "tsc --noEmit"
706
706
  },
707
707
  "dependencies": {
708
- "three": "^0.182.0"
708
+ "three": "^0.183.0"
709
709
  },
710
710
  "devDependencies": {
711
711
  "@types/fs-extra": "^11.0.4",
@@ -1,16 +0,0 @@
1
- import { abs, float, fract, mod, select, step, vec2, vec4 } from "three/tsl";
2
- const applyEdgeHandling = (distortedUV, sampledColor, childTexture, edgeModeUniform) => {
3
- const inBoundsX = step(float(0), distortedUV.x).mul(step(distortedUV.x, float(1)));
4
- const inBoundsY = step(float(0), distortedUV.y).mul(step(distortedUV.y, float(1)));
5
- const inBounds = inBoundsX.mul(inBoundsY);
6
- const transparentColor = vec4(sampledColor.rgb, sampledColor.a.mul(inBounds));
7
- if (!childTexture) return select(step(float(.5), edgeModeUniform), transparentColor, sampledColor);
8
- const mirrorX = mod(abs(distortedUV.x), float(2));
9
- const mirrorY = mod(abs(distortedUV.y), float(2));
10
- const mirroredUV = vec2(select(step(float(1), mirrorX), float(2).sub(mirrorX), mirrorX), select(step(float(1), mirrorY), float(2).sub(mirrorY), mirrorY));
11
- const mirrorColor = childTexture.sample(mirroredUV);
12
- const wrappedUV = vec2(fract(distortedUV.x), fract(distortedUV.y));
13
- const wrapColor = childTexture.sample(wrappedUV);
14
- return select(step(float(.5), edgeModeUniform), select(step(float(1.5), edgeModeUniform), select(step(float(2.5), edgeModeUniform), wrapColor, mirrorColor), transparentColor), sampledColor);
15
- };
16
- export { applyEdgeHandling as t };