import type { EntityPosition } from "../scene/entityStore.js"; export type TelegraphShape = { kind: "circle"; radius: number; } | { kind: "ring"; radius: number; innerRadius: number; } | { kind: "cone"; radius: number; angle: number; } | { kind: "line"; length: number; width: number; }; export interface TelegraphConfig { shape: TelegraphShape; at: EntityPosition; dir?: number; windupMs?: number; turns?: number; kind?: string; } /** @internal */ export declare function telegraphProgress(windupMs: number, startedAtMs: number, nowMs: number): number; export interface HazardCycleConfig { windupMs: number; activeMs: number; /** Rest between one activation's end and the next windup; default `0` (back-to-back). */ cooldownMs?: number; /** Shifts the whole cycle — staggers identical hazards. */ offsetMs?: number; } export type HazardPhase = "windup" | "active" | "cooldown"; export interface HazardCycleSample { phase: HazardPhase; /** Elapsed fraction of the current phase in `[0, 1]` — the windup fraction is the decal fill. */ fraction: number; remainingMs: number; /** How many full cycles have completed before this one. */ cycleIndex: number; } /** * Deterministic repeating hazard timing — windup → active → cooldown as a pure function of absolute * time, for recurring flame vents, crushers, lightning rings. Sample `hazardCycleAt` each tick: draw * the telegraph during `windup`, apply the effect during `active`, rest through `cooldown`. * @internal */ export declare function hazardCycleAt(config: HazardCycleConfig, nowMs: number): HazardCycleSample; /** Absolute time the hazard's next `active` phase begins at or after `nowMs` — the countdown seam. * @internal */ export declare function nextHazardActiveAt(config: HazardCycleConfig, nowMs: number): number; /** @internal */ export declare function telegraphFired(windupMs: number, startedAtMs: number, nowMs: number): boolean; /** @internal */ export declare function telegraphTurnProgress(config: TelegraphConfig, startedTurn: number, currentTurn: number): number; /** @internal */ export declare function telegraphFiredAtTurn(config: TelegraphConfig, startedTurn: number, currentTurn: number): boolean; /** @internal */ export declare function telegraphTurnsRemaining(config: TelegraphConfig, startedTurn: number, currentTurn: number): number; /** @internal */ export declare function pointInTelegraph(config: TelegraphConfig, point: EntityPosition): boolean;