@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 +6 -0
- package/dist/catalog/index.js +1 -1
- package/dist/{chunk-ECBG5K6E.js → chunk-3RKDS64M.js} +4 -7
- package/dist/chunk-3RKDS64M.js.map +1 -0
- package/dist/editor/index.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/svelte/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-ECBG5K6E.js.map +0 -1
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
|
package/dist/catalog/index.js
CHANGED
|
@@ -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,
|
|
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
|
|
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
|
-
|
|
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-
|
|
20182
|
+
//# sourceMappingURL=chunk-3RKDS64M.js.map
|