Type alias KeyboardControls

KeyboardControls: {
    activate: (() => void);
    deactivate: (() => void);
    enabled: boolean;
    update: ((delta) => void);
}

The KeyboardControls captures keyboard inputs. Any type of logic can be implemented on top of this.

Type declaration

  • activate: (() => void)
      • (): void
      • Returns void

  • deactivate: (() => void)
      • (): void
      • Returns void

  • enabled: boolean

    Whether the controls are enabled or not.

    Default

    true
    
  • update: ((delta) => void)
      • (delta): void
      • Call this on every frame to update the controls.

        Parameters

        • delta: number

        Returns void

Generated using TypeDoc