Nano WebGPU API - v0.11.0
    Preparing search index...

    Class OrbitCameraController

    OrbitCameraController implements professional Orbit Controls:

    • Left-click drag: Rotate orbit around the focal center.
    • Scroll wheel: Smooth zoom (adjusts radial distance).
    • Right or Middle-click drag: Pan focal center along the camera's local axes.
    • Auto-rotation is supported and suspended during manual left-click dragging.

    Hierarchy

    • BaseCameraController
      • OrbitCameraController
    Index

    Constructors

    Methods

    • Cleans up any registered event listeners on the canvas.

      Returns void

    • Computes and returns the forward direction vector aligned with the horizontal XZ plane (Y component zeroed).

      Returns Vec3

      A newly instantiated horizontal forward vector Vec3.

    • Computes and returns the rightward direction vector aligned with the horizontal XZ plane.

      Returns Vec3

      A newly instantiated horizontal right vector Vec3.

    • Automatically invoked by the Scene update routines every frame.

      Parameters

      • dt: number

        Delta frame time in seconds.

      Returns void

    Properties

    autoRotate: boolean = false

    Auto-rotation toggle (orbit mode).

    autoRotateSpeed: number = 1.0

    Auto-rotation velocity in radians per second.

    camera: Camera

    Camera reference driven by this controller.

    center: Vec3 = ...

    Bounding focal center point in 3D space (utilized by orbit mode).

    distance: number = 8

    Radial orbit distance from the focal look-at target.

    eyeHeight: number = 1.7

    Vertical offset relative to target pivot for eye placement (first-person mode).

    height: number = 3

    Orbit height offset above target (third-person mode).

    maxPitch: number = ...

    Maximum clamped pitch angle in radians.

    minPitch: number = ...

    Minimum clamped pitch angle in radians.

    mode: CameraMode = "orbit"

    Active camera scheme mode.

    pitch: number = 0

    Pitch rotation angle in radians (vertical lookup/downwards rotation).

    sensitivity: number = 0.003

    Mouse sensitivity multiplier.

    target: Node3D | null = null

    Target Node3D object (utilized by first-person and third-person modes).

    yaw: number = 0

    Yaw rotation angle in radians (horizontal rotation around Y axis).