import type { EntityPosition } from "../scene/entityStore.js"; export interface FrustumCamera { position: EntityPosition; lookAt: EntityPosition; /** Vertical field of view in degrees. Default 55. */ fovDeg?: number; /** Width / height. Default 16 / 9. */ aspect?: number; near?: number; far?: number; } export interface FrustumTarget { id: string; position: EntityPosition; /** Subject radius in world units, used by the framing-size score. Default 0.5. */ radius?: number; } export interface FrustumProjection { inView: boolean; distance: number; /** -1..1, 0 = screen center, negative = left/down. */ screenX: number; screenY: number; } /** * Project a world point into the camera's view. Pure geometry — no three.js — * so a game can run "is this framed?" checks headlessly (photo-mode scoring, * server-side kill-cam validation) as well as from the live render camera. * @internal */ export declare function projectToView(camera: FrustumCamera, point: EntityPosition): FrustumProjection; export interface FramingConfig { /** World-unit distance from camera that reads as "ideally framed" size. Default 6. */ idealDistance?: number; /** Weight of screen-center placement in the framing score. Default 0.6. */ centerWeight?: number; /** Weight of subject size (distance-to-ideal) in the framing score. Default 0.4. */ sizeWeight?: number; } /** 0 (not framed) .. 1 (dead-center, ideal distance) framing quality for an in-view projection. * @internal */ export declare function framingScore(projection: FrustumProjection, config?: FramingConfig): number; export interface FrustumSample { id: string; inView: boolean; distance: number; screenX: number; screenY: number; framing: number; /** Seconds continuously in view, up to and including this tick; resets to 0 the instant the subject leaves view. */ dwellSeconds: number; } export interface FrustumSensor { tick(camera: FrustumCamera, targets: readonly FrustumTarget[], dt: number): FrustumSample[]; reset(id?: string): void; } /** * A view-frustum sensor on a held camera object: which entities are in frame, * how well framed they are, and how long they've stayed on-screen (photo-mode * "is this subject framed", Content Warning-style monster-filming scoring). * @internal */ export declare function createFrustumSensor(config?: FramingConfig): FrustumSensor;