IFClite TypeScript API
    Preparing search index...

    Interface FitPolicy

    interface FitPolicy {
        aspect: number;
        distance: number;
        kind: FitPolicyKind;
        orthoSize?: number;
        position: Vec3;
        target: Vec3;
        up: Vec3;
    }
    Index
    aspect: number

    Bbox aspect ratio (longest / shortest, clamped). Surfaced for tests.

    distance: number

    Distance from position to target. Convenience copy for callers.

    Which heuristic produced this pose — for telemetry / UI hints.

    orthoSize?: number

    Orthographic half-height that frames the box from this pose: both axes, with the same margin the portrait perspective fit keeps. Distance sets no scale in orthographic projection, so without this an orthographic fit kept whatever zoom it had. Set on the compact pose when the viewport's aspect is known; the caller applies it only in orthographic mode.

    position: Vec3

    Where the camera should sit.

    target: Vec3

    Where the camera should look.

    up: Vec3

    World up vector. Always (0, 1, 0) — both policies are Y-up.