@egjs/axes
Version:
A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates. You can easily create a UI that responds to user actions.
26 lines (25 loc) • 889 B
TypeScript
import { InputEventType, ExtendedEvent } from "../types";
import { EventInput } from "./EventInput";
export declare class PointerEventInput extends EventInput {
readonly start: string[];
readonly move: string[];
readonly end: string[];
private _firstInputs;
private _recentInputs;
onEventStart(event: InputEventType, inputKey?: string[], inputButton?: string[]): ExtendedEvent;
onEventMove(event: InputEventType, inputKey?: string[], inputButton?: string[]): ExtendedEvent;
onEventEnd(event: InputEventType): void;
onRelease(): void;
getTouches(): number;
protected _getScale(): number;
protected _getCenter(event: PointerEvent): {
x: number;
y: number;
};
protected _getMovement(event: PointerEvent): {
x: number;
y: number;
};
private _updatePointerEvent;
private _removePointerEvent;
}