Files
gods-eye-view/src/data/iconSegment.d.ts
T
Sameh Khamis 0ab31d4fb8 The renderer seam: clicks go to the newest tool, recession and display groups through the contract, drawing at parity with Cesium
- 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.
2026-11-15 17:03:09 -08:00

85 lines
2.0 KiB
TypeScript

/**
* Icon motion segments packed for the GPU (`iconSegment.js`): one row per
* icon, read by `ICON_SEGMENT_GLSL` as `iconPosition` draws it.
*/
import type { Ecef } from '../render/contract/index';
/** Floats per packed row. */
export const SEGMENT_STRIDE: number;
export const SEGMENT_HOLD: number;
export const SEGMENT_LERP: number;
export const SEGMENT_ARC: number;
/** GLSL that evaluates a packed row. */
export const ICON_SEGMENT_GLSL: string;
/** Stay at `position` facing `courseDeg`. */
export function writeHoldSegment(
out: Float32Array,
row: number,
position: Ecef,
courseDeg: number,
): void;
export function writeLerpSegment(
out: Float32Array,
row: number,
segment: {
from: Ecef;
to: Ecef;
t0: number;
t1: number;
course0Deg: number;
courseSlopeDeg: number;
},
): void;
export function writeArcSegment(
out: Float32Array,
row: number,
segment: {
fix: Ecef;
t0: number;
minDt: number;
maxDt: number;
speedMps: number;
trackDeg: number;
turnRateDps: number;
climbMps?: number;
},
): void;
/**
* Glide row `row`'s drawn course from `fromCourseDeg` onto its segment's,
* at most `rateDps` from `t0` (seconds, as its times were packed).
*/
export function writeCourseGlide(
out: Float32Array,
row: number,
fromCourseDeg: number,
t0: number,
rateDps: number,
offsetDeg?: number,
): void;
/** Move a row's stored times by `deltaSec`. */
export function shiftSegmentTimes(
out: Float32Array,
row: number,
deltaSec: number,
): void;
/** The displayed course at `tau`, degrees clockwise from north. */
export function segmentCourse(
seg: Float32Array,
row: number,
tau: number,
): number;
/** The course the row glides toward at `tau`. */
export function segmentTargetCourse(
seg: Float32Array,
row: number,
tau: number,
): number;
/** Where the row is at `tau`, ECEF, into `result`. */
export function segmentPosition(
seg: Float32Array,
row: number,
tau: number,
result?: Ecef,
): Ecef;