gophergfx
    Preparing search index...

    Class FirstPersonControls

    Index
    camera: Camera
    flyMode: boolean
    hasMoved: boolean
    mouseButton: number
    rotationSpeed: number
    translationSpeed: number
    • 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

    • Updates the FirstPersonControls object

      Parameters

      • deltaTime: number

        The amount of time since the last update

      Returns void