Contains the mouse information in the last frame

const mouse = this.inputManager.mouse;

if (mouse.positionInViewport.y < 0 && mouse.leftButtonPressed) {
// if the mouse pointer is below the middle of the screen and left click, do something
}

Constructors

Properties

hasMoved: boolean = false

TRUE if the mouse moved during the last frame

leftButtonPressed: boolean = false

TRUE if the left button is being pressed

positionInViewport: Vector2 = ...

The position of the pointer in the screen view port

rightButtonPressed: boolean = false

TRUE if the right button is beign pressed

scrollButtonPressed: boolean = false

TRUE if the scroll button is being pressed

wheelScroll: Vector2 = ...

The scroll amount of the mouse wheel