@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.
32 lines (31 loc) • 872 B
TypeScript
import { ElementType } from "../types";
import { InputType, InputTypeObserver } from "./InputType";
export interface WheelInputOption {
inputKey?: string[];
scale?: number;
releaseDelay?: number;
useNormalized?: boolean;
useAnimation?: boolean;
}
export declare class WheelInput implements InputType {
options: WheelInputOption;
axes: string[];
element: HTMLElement;
private _observer;
private _direction;
private _enabled;
private _holding;
private _timer;
constructor(el: ElementType, options?: WheelInputOption);
mapAxes(axes: string[]): void;
connect(observer: InputTypeObserver): InputType;
disconnect(): this;
destroy(): void;
enable(): this;
disable(): this;
isEnabled(): boolean;
private _onWheel;
private _getOffset;
private _attachEvent;
private _detachEvent;
}