feat: v0.1.0 — scaffold + MapLibre map with EU airports

This commit is contained in:
2026-09-16 18:24:27 +00:00
parent fd2a887524
commit 30e33a08cf
23 changed files with 10813 additions and 5 deletions
+13
View File
@@ -0,0 +1,13 @@
export const PITCH_ZOOM_MIN = 6;
export const PITCH_ZOOM_MAX = 12;
export const MAX_PITCH_DEG = 45;
export function smoothstep(edge0: number, edge1: number, x: number): number {
const t = Math.min(1, Math.max(0, (x - edge0) / (edge1 - edge0)));
return t * t * (3 - 2 * t);
}
// Pitch is a pure function of zoom so it never fights user pan/zoom gestures.
export function pitchForZoom(zoom: number): number {
return smoothstep(PITCH_ZOOM_MIN, PITCH_ZOOM_MAX, zoom) * MAX_PITCH_DEG;
}