API

Interface GeospatialLimits

Pitch/yaw/radius bounds for a GeospatialCamera.

Pure state, mirroring Babylon.js GeospatialLimits. Behaviour (getEffectivePitchMax, clampZoomDistance) lives in standalone functions so unused limit logic is tree-shaken.

All angles are in radians. Pitch is measured from "looking straight down at the planet centre" (0) to "looking at the horizon" (π/2).

interface GeospatialLimits {
    pitchDisabledRadiusScale: { x: number; y: number } | null;
    pitchMax: number;
    pitchMin: number;
    planetRadius: number;
    radiusMax: number;
    radiusMin: number;
    yawMax: number;
    yawMin: number;
}
Index
pitchDisabledRadiusScale: { x: number; y: number } | null

Controls how pitch is disabled as the camera zooms out. x = radius scale at which full pitch is allowed (e.g. 2 ⇒ 2·planetRadius), y = radius scale at which pitch is fully disabled (forced to pitchMin). null disables this feature (full pitch at every radius).

pitchMax: number

Maximum pitch angle (π/2 = looking at the horizon).

pitchMin: number

Minimum pitch angle (≈0 = looking straight down at the planet).

planetRadius: number

Radius of the planet — used for altitude/radius conversions.

radiusMax: number

Maximum camera distance from its centre point (farthest zoom). Default planetRadius * 4.

radiusMin: number

Minimum camera distance from its centre point (closest zoom). Default 10.

yawMax: number

Maximum yaw angle. Default +Infinity.

yawMin: number

Minimum yaw angle (rotation about the geocentric up axis). Default -Infinity.