import { Bounds } from "./../physics/bounds.ts";
/**
* a pointer object, representing a single finger on a touch enabled device.
*/
declare class Pointer extends Bounds {
/**
* constant for left button
*/
LEFT: number;
/**
* constant for middle button
*/
MIDDLE: number;
/**
* constant for right button
*/
RIGHT: number;
/**
* the originating Event Object
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent}
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent}
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent}
*/
event: PointerEvent | TouchEvent | MouseEvent | undefined;
/**
* a string containing the event's type.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Event/type}
*/
type: string;
/**
* the button property indicates which button was pressed on the mouse to trigger the event.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button}
*/
button: number;
/**
* indicates whether or not the pointer device that created the event is the primary pointer.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary}
*/
isPrimary: boolean;
/**
* the horizontal coordinate at which the event occurred, relative to the left edge of the entire document.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/pageX}
*/
pageX: number;
/**
* the vertical coordinate at which the event occurred, relative to the left edge of the entire document.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/pageY}
*/
pageY: number;
/**
* the horizontal coordinate within the application's client area at which the event occurred
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientX}
*/
clientX: number;
/**
* the vertical coordinate within the application's client area at which the event occurred
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientY}
*/
clientY: number;
/**
* the difference in the X coordinate of the pointer since the previous move event
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementX}
*/
movementX: number;
/**
* the difference in the Y coordinate of the pointer since the previous move event
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementY}
*/
movementY: number;
/**
* an unsigned long representing the unit of the delta values scroll amount
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaMode}
*/
deltaMode: number;
/**
* a double representing the horizontal scroll amount in the Wheel Event deltaMode unit.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaX}
*/
deltaX: number;
/**
* a double representing the vertical scroll amount in the Wheel Event deltaMode unit.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaY}
*/
deltaY: number;
/**
* a double representing the scroll amount in the z-axis, in the Wheel Event deltaMode unit.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaZ}
*/
deltaZ: number;
/**
* Event normalized X coordinate within the game canvas itself
*
*/
gameX: number;
/**
* Event normalized Y coordinate within the game canvas itself
*
*/
gameY: number;
/**
* Event X coordinate relative to the viewport
*/
gameScreenX: number;
/**
* Event Y coordinate relative to the viewport
*/
gameScreenY: number;
/**
* Event X coordinate relative to the map
*/
gameWorldX: number;
/**
* Event Y coordinate relative to the map
*/
gameWorldY: number;
/**
* Event X coordinate relative to the holding container
*/
gameLocalX: number;
/**
* Event Y coordinate relative to the holding container
*/
gameLocalY: number;
/**
* The unique identifier of the contact for a touch, mouse or pen
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId}
*/
pointerId: number | undefined;
/**
* true if not originally a pointer event
*/
isNormalized: boolean;
/**
* true if the pointer is currently locked
*/
locked: boolean;
bind: (number | null)[];
/**
* @ignore
*/
constructor(x?: number, y?: number, w?: number, h?: number);
/**
* initialize the Pointer object using the given Event Object
* @param event - the original Event object
* @param pageX - the horizontal coordinate at which the event occurred, relative to the left edge of the entire document
* @param pageY - the vertical coordinate at which the event occurred, relative to the left edge of the entire document
* @param clientX - the horizontal coordinate within the application's client area at which the event occurred
* @param clientY - the vertical coordinate within the application's client area at which the event occurred
* @param pointerId - the Pointer, Touch or Mouse event Id (1)
*/
setEvent(event: Event, pageX?: number, pageY?: number, clientX?: number, clientY?: number, pointerId?: number): void;
}
export default Pointer;
//# sourceMappingURL=pointer.d.ts.map