FlyCameraMouseInput

Listen to mouse events to control the camera.

see

http://doc.babylonjs.com/how_to/customizing_camera_inputs

Hierarchy

  • FlyCameraMouseInput

Implements

Index

Constructors

constructor

Find examples in Playground

Properties

activeButton

Find examples in Playground
activeButton: number

Detect if any button is being pressed while mouse is moved. -1 = Mouse locked. 0 = Left button. 1 = Middle Button. 2 = Right Button.

angularSensibility

Find examples in Playground
angularSensibility: number

Defines the pointer's angular sensibility, to control the camera rotation speed. Higher values reduce its sensitivity.

buttons

Find examples in Playground
buttons: number[]

Defines the buttons associated with the input to handle camera rotation.

buttonsPitch

Find examples in Playground
buttonsPitch: number[]

Assign buttons for Pitch control.

buttonsRoll

Find examples in Playground
buttonsRoll: number[]

Assign buttons for Roll control.

buttonsYaw

Find examples in Playground
buttonsYaw: number[]

Assign buttons for Yaw control.

camera

Find examples in Playground
camera: FlyCamera

Defines the camera the input is attached to.

touchEnabled

Find examples in Playground
touchEnabled: boolean

Defines if touch is enabled. (Default is true.)

Methods

attachControl

Find examples in Playground
  • attachControl(element: HTMLElement, noPreventDefault?: boolean): void
  • Attach the mouse control to the HTML DOM element.

    Parameters

    • element: HTMLElement

      Defines the element that listens to the input events.

    • Optional noPreventDefault: boolean

      Defines whether events caught by the controls should call preventdefault().

    Returns void

detachControl

Find examples in Playground
  • detachControl(element: Nullable<HTMLElement>): void
  • Detach the current controls from the specified dom element.

    Parameters

    • element: Nullable<HTMLElement>

      Defines the element to stop listening the inputs from

    Returns void

getClassName

Find examples in Playground
  • getClassName(): string

getSimpleName

Find examples in Playground
  • getSimpleName(): string
  • Get the friendly name associated with the input class.

    Returns string

    the input's friendly name.

Generated using TypeDoc