API

Interface ArcRotateCamera

ArcRotateCamera — orbits around a target point. Uses Babylon.js convention: left-handed, alpha=rotation around Y, beta=elevation. Plain data + methods. Does NOT know about the scene.

Push-based dirty tracking: alpha/beta/radius use Object.defineProperty, target uses ObservableVec3. Changes call wm.markLocalDirty() immediately.

Inertia follows the Babylon.js model: input handlers accumulate per-frame offsets (inertialAlphaOffset, etc.) which are applied and exponentially decayed each frame by the controls module.

interface ArcRotateCamera {
    alpha: number;
    angularSensibility: number;
    beta: number;
    children: SceneNode[];
    farPlane: number;
    fov: number;
    inertia: number;
    inertialAlphaOffset: number;
    inertialBetaOffset: number;
    inertialPanningX: number;
    inertialPanningY: number;
    inertialRadiusOffset: number;
    lowerAlphaLimit?: number;
    lowerBetaLimit?: number;
    lowerRadiusLimit?: number;
    name?: string;
    nearPlane: number;
    ortho?: OrthographicBounds | null;
    panningInertia: number;
    panningSensibility: number;
    parent: IWorldMatrixProvider | null;
    radius: number;
    target: Vec3;
    upperAlphaLimit?: number;
    upperBetaLimit?: number;
    upperRadiusLimit?: number;
    viewport?: NormalizedViewport;
    wheelPrecision: number;
    worldMatrix: Mat4;
    worldMatrixVersion: number;
}

Hierarchy (View Summary)

Index
alpha: number
angularSensibility: number

Mouse-drag orbit sensitivity (HIGHER = slower rotation). Babylon default 1000.

beta: number
children: SceneNode[]
farPlane: number
fov: number
inertia: number

Inertia coefficient for rotation and zoom (0 = instant stop, 0.9 = default, 1 = no decay).

inertialAlphaOffset: number

Per-frame inertial offsets — accumulated by input, applied & decayed each frame.

inertialBetaOffset: number
inertialPanningX: number
inertialPanningY: number
inertialRadiusOffset: number
lowerAlphaLimit?: number

Optional orbit limits enforced by attachControl's per-frame loop. undefined means unbounded on that side. Set these via setCameraLimits so the current pose is clamped immediately (and inertia zeroed at the wall), avoiding any overshoot-then-snap jiggle. Angles are in radians.

lowerBetaLimit?: number
lowerRadiusLimit?: number
name?: string

Optional source/debug name. Imported glTF cameras use the glTF camera name, or camera{index} when the source definition is unnamed.

nearPlane: number
ortho?: OrthographicBounds | null

Live orthographic view-volume extents, installed by enableOrthographicCamera and mutable/animatable thereafter. Null or undefined means the camera projects perspectively through fov.

panningInertia: number

Inertia coefficient for panning (0 = instant stop, 0.9 = default).

panningSensibility: number

Right-drag panning sensitivity in pixels-per-unit (LOWER = faster pan). Babylon default 50.

parent: IWorldMatrixProvider | null
radius: number
target: Vec3
upperAlphaLimit?: number
upperBetaLimit?: number
upperRadiusLimit?: number
wheelPrecision: number

Wheel-zoom sensitivity (HIGHER = slower zoom). Babylon default 3.

worldMatrix: Mat4

World-space 4×4 column-major matrix. May trigger lazy recomputation.

worldMatrixVersion: number

Monotonically increasing counter — bumped each time worldMatrix recomputes. Children snapshot this value to detect when their parent has changed. Must never decrease: _cameraChangeKey sums it with the projection revision and relies on that to detect every change without aliasing.