ICameraInput<TCamera>

This is the contract to implement in order to create a new input class. Inputs are dealing with listening to user actions and moving the camera accordingly.

Type parameters

Hierarchy

  • ICameraInput

Implemented by

Index

Properties

camera

Find examples in Playground
camera: Nullable<TCamera>

Defines the camera the input is attached to.

Optional checkInputs

Find examples in Playground
checkInputs: function

Update the current camera state depending on the inputs that have been used this frame. This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.

Type declaration

    • (): void
    • Returns void

Methods

attachControl

Find examples in Playground
  • attachControl(element: HTMLElement, noPreventDefault?: boolean): void
  • Attach the input controls to a specific dom element to get the input from.

    Parameters

    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
  • Gets the class name of the current intput.

    Returns string

    the class name

getSimpleName

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

    Returns string

    the input friendly name

Generated using TypeDoc