Hilo3d API - v2.0.0-alpha.3
    Preparing search index...

    Class OrbitControls

    Camera-centric orbit, dolly, and pan controls for a PerspectiveCamera.

    Mouse: drag to orbit, right-drag or Shift-drag to pan, and wheel to dolly. Touch: drag with one finger to orbit, or use two fingers to pan and pinch-to-dolly.

    Index

    Perspective camera manipulated by these controls.

    canvas: HTMLCanvasElement

    Canvas that receives pointer, wheel, and touch events.

    enablePan: boolean

    Whether pan gestures are accepted.

    enableRotate: boolean

    Whether orbit gestures are accepted.

    enableZoom: boolean

    Whether dolly gestures are accepted.

    isEnabled: boolean = false

    Whether browser event listeners are currently attached.

    maxDistance: number

    Maximum camera distance from the target.

    maxPolarAngle: number

    Maximum polar orbit angle in radians.

    minDistance: number

    Minimum camera distance from the target.

    minPolarAngle: number

    Minimum polar orbit angle in radians.

    onChange: (() => void) | undefined

    Optional callback invoked after the controls change the camera view.

    panSpeed: number

    Pan sensitivity multiplier.

    rotateSpeed: number

    Orbit sensitivity multiplier.

    stage: Stage

    Stage that owns the controlled canvas and default camera.

    target: Vector3

    Mutable orbit center in the camera parent's coordinate space.

    zoomSpeed: number

    Dolly sensitivity multiplier.

    • Move the camera toward its target. Values above one zoom in; values below one zoom out.

      Parameters

      • scale: number

      Returns void

    • Pan in screen pixels while preserving the camera-to-target offset.

      Parameters

      • deltaX: number
      • deltaY: number

      Returns void

    • Orbit by a pointer delta measured in CSS pixels.

      Parameters

      • deltaX: number
      • deltaY: number

      Returns void

    • Set a complete camera view while applying the configured orbit limits.

      This is useful for scripted tours that should share the same camera contract as pointer interaction.

      Parameters

      Returns void

    • Reorient the camera toward the target and enforce the configured orbit limits.

      Returns void