mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
- Clicks: when two tools want the globe's clicks, the newest takes them and the older is told and turns itself off; a click is decided when it arrives, and ambient selection fires only when no tool holds the pointer. The "map is busy" paths and their strings are removed. - Recession: the limb fade is shared (src/render/recession.js) and reaches icon and model sets through SetSpec.recede; tuning applies on the next frame. - Display panel groups are published through src/ui/displayGroups.js; the Weather group and src/viewWeather.js are removed. - Draw port: a set whose icons only move is moved in place, and models that did not change are not restyled each frame, so moving fleets cost what they did when drawn directly; an untinted, fully opaque model is drawn without a colour. - Conformance: input.lease.lost checks the new lease inside onLost and reports a throwing onLost; draw.sets.recede covers model sets. - QA scripts read the renderer host instead of internals the seam replaced.
55 lines
1.2 KiB
TypeScript
55 lines
1.2 KiB
TypeScript
/**
|
|
* Wind streamlines baked from a wind grid (`streamlines.js`): the paths a
|
|
* `windStreamlines` field draws.
|
|
*/
|
|
|
|
/** A wind grid: row-major from `la1` (north) southward. */
|
|
export interface WindGrid {
|
|
u: Float32Array;
|
|
v: Float32Array;
|
|
nx: number;
|
|
ny: number;
|
|
lo1: number;
|
|
la1: number;
|
|
dx: number;
|
|
dy: number;
|
|
}
|
|
|
|
export interface WindPath {
|
|
coordinates: Array<[lon: number, lat: number]>;
|
|
speed: number;
|
|
seed: number;
|
|
phase: number;
|
|
}
|
|
|
|
export const WIND_PATH_LIMIT: number;
|
|
export const WIND_NARROW_PATH_LIMIT: number;
|
|
export const WIND_PATH_STEPS: number;
|
|
export const WIND_DISPLAY_HEIGHT_METERS: number;
|
|
export const WIND_CELL_DEGREES: number;
|
|
|
|
/**
|
|
* Bake streamlines once from a wind grid; with `bounds` (degrees), seeds
|
|
* fall inside it and paths stop at its edges.
|
|
*/
|
|
export function bakeWindStreamlines(
|
|
grid: WindGrid,
|
|
options?: {
|
|
count?: number;
|
|
steps?: number;
|
|
stepSeconds?: number;
|
|
bounds?: {
|
|
west: number;
|
|
south: number;
|
|
east: number;
|
|
north: number;
|
|
} | null;
|
|
},
|
|
): WindPath[];
|
|
|
|
/** Group baked paths by their middle coordinate. */
|
|
export function groupWindPaths(
|
|
paths: WindPath[],
|
|
cellDegrees?: number,
|
|
): Array<{ id: number; paths: WindPath[] }>;
|