fix(weather): upright N. America cloud tiles; lift shells over coarse 3D tiles (#730)

This commit is contained in:
Bilawal Sidhu authored and GitHub committed 2026-09-23 14:49:39 -05:00
1 parent 082074a006
commit 005254fcd1
7 files changed
+130 -3

No files matched your search

+12
View File
@@ -10,8 +10,12 @@ import {
function canvas() {
const output = {};
output.getContext = () => ({
setTransform: (...matrix) => {
output.transforms = [...(output.transforms ?? []), matrix];
},
drawImage: (image) => {
output.image = image;
output.drawnWith = output.transforms?.at(-1) ?? null;
},
getImageData: () => ({ data: new Uint8ClampedArray([194, 0, 0, 200]) }),
putImageData: (pixels) => {
@@ -34,6 +38,14 @@ test('decoded pixels are processed once on a same-sized canvas', () => {
);
});
test('flipY draws a bottom-up image upright, then restores the transform', () => {
const image = { width: 4, height: 8 };
assert.equal(processInfraredImage(image, 'full', canvas).drawnWith, null);
const output = processInfraredImage(image, 'full', canvas, { flipY: true });
assert.deepEqual(output.drawnWith, [1, 0, 0, -1, 0, 8]);
assert.deepEqual(output.transforms.at(-1), [1, 0, 0, 1, 0, 0]);
});
test('mosaic fetch is capped at 4 MiB, forwards cancellation, and releases decoded images', async () => {
const controller = new AbortController();
let closes = 0,