mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 11:24:00 +00:00
fix(wind): bound GFS acquisition and preserve canvas trails and lifecycle
This commit is contained in:
1 parent
93d4224fdf
commit
dcb3339070
17 files changed
+251
-101
No files matched your search
@@ -21,6 +21,8 @@ export function resampleWindGrid({
|
||||
dx = 1,
|
||||
dy = 1,
|
||||
}) {
|
||||
if (!Number.isInteger(ni) || !Number.isInteger(nj) || ni < 1 || nj < 1 || ni * nj > 2_000_000 || u?.length !== ni * nj || v?.length !== ni * nj || ![lo1, la1, di, dj, dx, dy].every(Number.isFinite) || di <= 0 || dj <= 0 || dx < 0.25 || dy < 0.25 || dx > 180 || dy > 180)
|
||||
throw new Error('Invalid wind grid geometry');
|
||||
const nx = Math.round(360 / dx);
|
||||
const ny = Math.round(180 / dy) + 1;
|
||||
const outU = new Float32Array(nx * ny);
|
||||
|
||||
Reference in new issue
Block a user