Options
All
  • Public
  • Public/Protected
  • All
Menu
classdesc

Creates a DuckEngine MouseInput

description

The MouseInput Class. Use the mouse as input

since

1.0.0-beta

Hierarchy

  • MouseInput

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

eventEmitter

eventEmitter: EventEmitter
memberof

MouseInput

description

The EventEmitter used to emit for Mouse events

since

2.0.0

game

game: Game
memberof

MouseInput

description

Game instance

since

2.0.0

mice

mice: {}
memberof

MouseInput

description

All of the Mice added to the MouseInput

since

2.0.0

Type declaration

scene

scene: Scene
memberof

MouseInput

description

Scene instance

since

2.0.0

Accessors

inputs

  • get inputs(): {}

Methods

addMice

  • memberof

    MouseInput

    description

    Adds Mice to the MouseInput

    since

    2.0.0

    Parameters

    • mice: MouseBase[]

      An array of Mouse Base configuration to use to add mice to the MouseInput

    Returns void

addMouse

  • addMouse(button: 0 | 1 | 4 | 2 | 3, descriptor: string, mouseDown?: (e: MouseEvent) => any, mouseUp?: (e: MouseEvent) => any, mouseMove?: (e: MouseEvent) => any): Mouse
  • memberof

    MouseInput

    description

    Adds a Mouse to the MouseInput

    since

    2.0.0

    Parameters

    • button: 0 | 1 | 4 | 2 | 3

      Mouse Button

    • descriptor: string

      The Mouse descriptor, used to set the value to MouseInput.mouse

    • Optional mouseDown: (e: MouseEvent) => any
        • (e: MouseEvent): any
        • Parameters

          • e: MouseEvent

          Returns any

    • Optional mouseUp: (e: MouseEvent) => any
        • (e: MouseEvent): any
        • Parameters

          • e: MouseEvent

          Returns any

    • Optional mouseMove: (e: MouseEvent) => any
        • (e: MouseEvent): any
        • Parameters

          • e: MouseEvent

          Returns any

    Returns Mouse

Generated using TypeDoc