mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
feat(weather): add satellite cloud filter strength slider
Blend the existing infrared brightness key from Full (0%) to Clouds only (100%), preserving Soft/Vivid as independent opacity presets. Commit filter changes on slider release and retain legacy share-link mode codes.
This commit is contained in:
1 parent
614b207c32
commit
86b7dc8d3c
12 files changed
+421
-38
No files matched your search
@@ -40,6 +40,21 @@ test('filtered infrared preserves RGB and input bytes, scales existing alpha, an
|
||||
);
|
||||
});
|
||||
|
||||
test('filter strength interpolates between the full infrared image and the cloud key', () => {
|
||||
const pixels = new Uint8ClampedArray([
|
||||
0, 0, 0, 255, 194, 0, 0, 200, 12, 50, 217, 128,
|
||||
]);
|
||||
assert.deepEqual([...infraredAlpha(pixels, 0)], [...pixels]);
|
||||
assert.deepEqual(
|
||||
infraredAlpha(pixels, 100),
|
||||
infraredAlpha(pixels, 'filtered'),
|
||||
);
|
||||
assert.deepEqual(
|
||||
[...infraredAlpha(pixels, 50)],
|
||||
[0, 0, 0, 128, 194, 0, 0, 149, 12, 50, 217, 128],
|
||||
);
|
||||
});
|
||||
|
||||
test('full infrared preserves every channel including partial and zero alpha', () => {
|
||||
const pixels = new Uint8ClampedArray([
|
||||
12, 50, 194, 80, 0, 0, 0, 255, 255, 200, 0, 0,
|
||||
|
||||
Reference in new issue
Block a user