assassin-bug/framework/input/inputs/mouse.d.ts

35 lines
870 B
TypeScript
Raw Permalink Normal View History

2022-11-26 01:22:02 +00:00
import { BaseInput } from './base-input';
export declare class Mouse extends BaseInput {
private mousePosition;
private mouseDelta;
private mouseWheel;
private mouseButtons;
constructor(element: HTMLElement);
capture(): void;
release(): void;
getState(): IMouse;
private handleMouseDown;
private handleMouseMove;
private handleMouseUp;
private handlePointerChange;
}
export declare class Position {
x: number;
y: number;
}
export declare class MouseButtons {
keysDown: Map<number, boolean>;
keysJustPressed: Map<number, boolean>;
keysJustReleased: Map<number, boolean>;
}
export declare class Delta {
x: number;
y: number;
}
export interface IMouse {
mouseButtons: MouseButtons;
mousePosition: Position;
mouseWheel: Delta;
mouseDelta: Delta;
}