Class FirstPersonControls

Hierarchy

  • FirstPersonControls

Constructors

Properties

camera: Camera
flyMode: boolean
hasMoved: boolean
mouseButton: number
mouseDrag: boolean
mouseMovement: Vector2
moveDirection: Vector3
rotationDirection: Vector3
rotationSpeed: number
targetOrbitX: Quaternion
targetOrbitY: Quaternion
translationSpeed: number

Methods

  • Handles the keydown event, updating the moveDirection vector based on the key pressed.

    Parameters

    • event: KeyboardEvent

      The keyboard event object

    Returns void

  • Handles the keyup event, updating the moveDirection vector based on the key released.

    Parameters

    • event: KeyboardEvent

      The keyboard event object

    Returns void

  • Handles the mousedown event, setting a flag to indicate that the mouse is being dragged.

    Parameters

    • event: MouseEvent

      The mouse event object

    Returns void

  • Handles the mousemove event, updating the mouseMovement vector with the movement of the mouse.

    Parameters

    • event: MouseEvent

      The mouse event object

    Returns void

  • Handles the mouseup event, setting a flag to indicate that the mouse is no longer being dragged.

    Parameters

    • event: MouseEvent

      The mouse event object

    Returns void

Generated using TypeDoc