@pixerate/flair 0.21.1 → 0.22.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @pixerate/flair
2
2
 
3
+ ## 0.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4eb5f23: `image-duotone` is now only a duotone: it maps the picture onto two colours by brightness, still and without its built-in light sweep (the `uSweep` control is gone). For the glare, lay the `shine-sweep` overlay over it.
8
+
3
9
  ## 0.21.1
4
10
 
5
11
  ### Patch Changes
@@ -27,7 +27,7 @@ import {
27
27
  vectorControlIssues,
28
28
  vectorControls,
29
29
  vectorEffectControls
30
- } from "../chunk-ECBG5K6E.js";
30
+ } from "../chunk-3RKDS64M.js";
31
31
  import "../chunk-OHW7UG6D.js";
32
32
  import "../chunk-EHDJ3CPJ.js";
33
33
  import "../chunk-VYOMXE6I.js";
@@ -456,17 +456,16 @@ var imageDuotone = {
456
456
  kind: "shader",
457
457
  id: "image-duotone",
458
458
  name: "Duotone",
459
- description: "An image mapped onto two colours, with a slow light sweep.",
459
+ description: "An image mapped onto two colours, from its shadows to its highlights. For a passing glare, lay `shine-sweep` over it.",
460
460
  category: "image",
461
461
  video: "filter",
462
462
  tags: ["image", "brand", "editorial", "colour"],
463
463
  source: glsl(
464
- `// Duotone: an image mapped onto two colours, with a light sweep.
464
+ `// Duotone: an image mapped onto two colours by its brightness.
465
465
  uniform sampler2D uImage; // @control filter=linear wrap=clamp default=${SAMPLE_IMAGES.landscape} label="Image"
466
466
  uniform vec3 uShadow; // @control color default=#1E1B4B label="Shadows"
467
467
  uniform vec3 uHighlight; // @control color default=#FB7185 label="Highlights"
468
468
  uniform float uContrast; // @control min=0.5 max=3 default=1.2 label="Contrast"
469
- uniform float uSweep; // @control min=0 max=1 default=0.3 label="Light sweep"
470
469
  ${BACKDROP_CONTROLS}`,
471
470
  PICTURE,
472
471
  `void mainImage(out vec4 fragColor, in vec2 fragCoord) {
@@ -474,9 +473,7 @@ ${BACKDROP_CONTROLS}`,
474
473
  vec4 src = pictureRGBA(uImage, uv);
475
474
  float l = dot(src.rgb, vec3(0.2126, 0.7152, 0.0722));
476
475
  l = clamp((l - 0.5) * uContrast + 0.5, 0.0, 1.0);
477
- float sweep = exp(-pow((uv.x + uv.y * 0.4 - fract(iTime * 0.15) * 2.0 + 0.4) * 6.0, 2.0));
478
- vec3 col = mix(uShadow, uHighlight, l) + sweep * uSweep;
479
- fragColor = vec4(col, src.a);
476
+ fragColor = vec4(mix(uShadow, uHighlight, l), src.a);
480
477
  }`
481
478
  ),
482
479
  presets: [
@@ -20182,4 +20179,4 @@ export {
20182
20179
  effectControls,
20183
20180
  effectDefaults
20184
20181
  };
20185
- //# sourceMappingURL=chunk-ECBG5K6E.js.map
20182
+ //# sourceMappingURL=chunk-3RKDS64M.js.map