@pixi/interaction
Advanced tools
Comparing version 6.3.2 to 6.4.0
/*! | ||
* @pixi/interaction - v6.3.2 | ||
* Compiled Wed, 04 May 2022 17:49:13 UTC | ||
* @pixi/interaction - v6.4.0 | ||
* Compiled Wed, 01 Jun 2022 21:14:23 UTC | ||
* | ||
@@ -5,0 +5,0 @@ * @pixi/interaction is licensed under the MIT License. |
/*! | ||
* @pixi/interaction - v6.3.2 | ||
* Compiled Wed, 04 May 2022 17:49:13 UTC | ||
* @pixi/interaction - v6.4.0 | ||
* Compiled Wed, 01 Jun 2022 21:14:23 UTC | ||
* | ||
@@ -5,0 +5,0 @@ * @pixi/interaction is licensed under the MIT License. |
/*! | ||
* @pixi/interaction - v6.3.2 | ||
* Compiled Wed, 04 May 2022 17:49:13 UTC | ||
* @pixi/interaction - v6.4.0 | ||
* Compiled Wed, 01 Jun 2022 21:14:23 UTC | ||
* | ||
@@ -5,0 +5,0 @@ * @pixi/interaction is licensed under the MIT License. |
106
index.d.ts
@@ -26,3 +26,2 @@ /// <reference path="./global.d.ts" /> | ||
* Holds all information related to an Interaction event | ||
* | ||
* @memberof PIXI | ||
@@ -37,3 +36,2 @@ */ | ||
* When passed to an event handler, this will be the original DOM Event that was captured | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent | ||
@@ -49,3 +47,2 @@ * @see https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent | ||
* Indicates whether or not the pointer device that created the event is the primary pointer. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary | ||
@@ -56,3 +53,2 @@ */ | ||
* Indicates which button was pressed on the mouse or pointer device to trigger the event. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button | ||
@@ -63,3 +59,2 @@ */ | ||
* Indicates which buttons are pressed on the mouse or pointer device when the event is triggered. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons | ||
@@ -71,3 +66,2 @@ */ | ||
* radiusX of TouchEvents will be represented by this value. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width | ||
@@ -79,3 +73,2 @@ */ | ||
* radiusY of TouchEvents will be represented by this value. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height | ||
@@ -86,3 +79,2 @@ */ | ||
* The angle, in degrees, between the pointer device and the screen. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX | ||
@@ -93,3 +85,2 @@ */ | ||
* The angle, in degrees, between the pointer device and the screen. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY | ||
@@ -100,3 +91,2 @@ */ | ||
* The type of pointer that triggered the event. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType | ||
@@ -108,3 +98,2 @@ */ | ||
* will be represented by this value. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure | ||
@@ -115,3 +104,2 @@ */ | ||
* From TouchEvents (not PointerEvents triggered by touches), the rotationAngle of the Touch. | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle | ||
@@ -122,3 +110,2 @@ */ | ||
* Twist of a stylus pointer. | ||
* | ||
* @see https://w3c.github.io/pointerevents/#pointerevent-interface | ||
@@ -129,3 +116,2 @@ */ | ||
* Barrel pressure on a stylus pointer. | ||
* | ||
* @see https://w3c.github.io/pointerevents/#pointerevent-interface | ||
@@ -137,3 +123,2 @@ */ | ||
* The unique identifier of the pointer. It will be the same as `identifier`. | ||
* | ||
* @readonly | ||
@@ -145,3 +130,2 @@ * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId | ||
* This will return the local coordinates of the specified displayObject for this InteractionData | ||
* | ||
* @param displayObject - The DisplayObject that you would like the local | ||
@@ -153,3 +137,3 @@ * coords off | ||
* (otherwise will use the current global coords) | ||
* @return - A point containing the coordinates of the InteractionData position relative | ||
* @returns - A point containing the coordinates of the InteractionData position relative | ||
* to the DisplayObject | ||
@@ -160,3 +144,2 @@ */ | ||
* Copies properties from normalized event data. | ||
* | ||
* @param {Touch|MouseEvent|PointerEvent} event - The normalized event data | ||
@@ -171,3 +154,2 @@ */ | ||
* Event class that mimics native DOM events. | ||
* | ||
* @memberof PIXI | ||
@@ -185,3 +167,2 @@ */ | ||
* At which object this event stops propagating. | ||
* | ||
* @private | ||
@@ -194,3 +175,2 @@ */ | ||
* where we start over deeper in the tree again. | ||
* | ||
* @private | ||
@@ -225,3 +205,2 @@ */ | ||
* An instance of this class is automatically created by default, and can be found at `renderer.plugins.interaction` | ||
* | ||
* @memberof PIXI | ||
@@ -232,5 +211,4 @@ */ | ||
* Actively tracked InteractionData | ||
* | ||
* @private | ||
* @member {Object.<number,PIXI.InteractionData>} | ||
* @member {Object<number, PIXI.InteractionData>} | ||
*/ | ||
@@ -240,15 +218,8 @@ readonly activeInteractionData: { | ||
}; | ||
/** | ||
* Does the device support touch events | ||
* https://www.w3.org/TR/touch-events/ | ||
*/ | ||
/** Does the device support touch events https://www.w3.org/TR/touch-events/ */ | ||
readonly supportsTouchEvents: boolean; | ||
/** | ||
* Does the device support pointer events | ||
* https://www.w3.org/Submission/pointer-events/ | ||
*/ | ||
/** Does the device support pointer events https://www.w3.org/Submission/pointer-events/ */ | ||
readonly supportsPointerEvents: boolean; | ||
/** | ||
* Pool of unused InteractionData | ||
* | ||
* @private | ||
@@ -259,3 +230,2 @@ */ | ||
* Internal cached let. | ||
* | ||
* @private | ||
@@ -266,3 +236,2 @@ */ | ||
* Delayed pointer events. Used to guarantee correct ordering of over/out events. | ||
* | ||
* @private | ||
@@ -273,3 +242,2 @@ */ | ||
* TreeSearch component that is used to hitTest stage tree. | ||
* | ||
* @private | ||
@@ -285,3 +253,2 @@ */ | ||
* Thus, for every pointer event, there will always be either a mouse of touch event alongside it. | ||
* | ||
* @default true | ||
@@ -292,3 +259,2 @@ */ | ||
* Maximum frequency in milliseconds at which pointer over/out states will be checked by {@link tickerUpdate}. | ||
* | ||
* @default 10 | ||
@@ -308,3 +274,2 @@ */ | ||
* future versions of pixi. | ||
* | ||
* @default false | ||
@@ -318,14 +283,9 @@ */ | ||
* Default CSS cursor values are provided for 'default' and 'pointer' modes. | ||
* | ||
* @member {Object.<string, Object>} | ||
* @member {Object<string, Object>} | ||
*/ | ||
cursorStyles: Dict<string | ((mode: string) => void) | CSSStyleDeclaration>; | ||
/** | ||
* The mode of the cursor that is being used. | ||
* The value of this is a key from the cursorStyles dictionary. | ||
*/ | ||
/** The mode of the cursor that is being used. The value of this is a key from the cursorStyles dictionary. */ | ||
currentCursorMode: string; | ||
/** | ||
* The current resolution / device pixel ratio. | ||
* | ||
* @default 1 | ||
@@ -349,4 +309,3 @@ */ | ||
* An options object specifies characteristics about the event listener. | ||
* | ||
* @member {Object.<string, boolean>} | ||
* @member {Object<string, boolean>} | ||
*/ | ||
@@ -364,3 +323,2 @@ private readonly _eventListenerOptions; | ||
* Should the InteractionManager automatically add {@link tickerUpdate} to {@link PIXI.Ticker.system}. | ||
* | ||
* @default true | ||
@@ -372,3 +330,2 @@ */ | ||
* Last rendered object or temp object. | ||
* | ||
* @readonly | ||
@@ -380,7 +337,6 @@ * @protected | ||
* Hit tests a point against the display tree, returning the first interactive object that is hit. | ||
* | ||
* @param globalPoint - A point to hit test with, in global space. | ||
* @param root - The root display object to start from. If omitted, defaults | ||
* to the last rendered root of the associated renderer. | ||
* @return - The hit display object, if any. | ||
* @returns - The hit display object, if any. | ||
*/ | ||
@@ -392,3 +348,2 @@ hitTest(globalPoint: Point, root?: DisplayObject): DisplayObject; | ||
* another DOM element to receive those events. | ||
* | ||
* @param element - the DOM element which will receive mouse and touch events. | ||
@@ -411,3 +366,2 @@ * @param resolution - The resolution / device pixel ratio of the new element (relative to the canvas). | ||
* Invoked by a throttled ticker update from {@link PIXI.Ticker.system}. | ||
* | ||
* @param deltaTime - time delta since the last call | ||
@@ -420,3 +374,2 @@ */ | ||
* Sets the current cursor mode, handling any callbacks or CSS style changes. | ||
* | ||
* @param mode - cursor mode, a key from the cursorStyles dictionary | ||
@@ -427,3 +380,2 @@ */ | ||
* Dispatches an event on the display object that was interacted with. | ||
* | ||
* @param displayObject - the display object in question | ||
@@ -437,3 +389,2 @@ * @param eventString - the name of the event (e.g, mousedown) | ||
* ordering of over/out events. | ||
* | ||
* @param displayObject - the display object in question | ||
@@ -448,3 +399,2 @@ * @param eventString - the name of the event (e.g, mousedown) | ||
* element could be scaled and positioned anywhere on the screen. | ||
* | ||
* @param point - the point that the result will be stored in | ||
@@ -459,3 +409,2 @@ * @param x - the x coord of the position to map | ||
* testing the interactive objects and passes the hit across in the function. | ||
* | ||
* @protected | ||
@@ -474,3 +423,2 @@ * @param interactionEvent - event containing the point that | ||
* Is called when the pointer button is pressed down on the renderer element | ||
* | ||
* @param originalEvent - The DOM event of a pointer button being pressed down | ||
@@ -481,3 +429,2 @@ */ | ||
* Processes the result of the pointer down check and dispatches the event if need be | ||
* | ||
* @param interactionEvent - The interaction event wrapping the DOM event | ||
@@ -490,3 +437,2 @@ * @param displayObject - The display object that was tested | ||
* Is called when the pointer button is released on the renderer element | ||
* | ||
* @param originalEvent - The DOM event of a pointer button being released | ||
@@ -499,3 +445,2 @@ * @param cancelled - true if the pointer is cancelled | ||
* Is called when the pointer button is cancelled | ||
* | ||
* @param event - The DOM event of a pointer button being released | ||
@@ -506,3 +451,2 @@ */ | ||
* Processes the result of the pointer cancel check and dispatches the event if need be | ||
* | ||
* @param interactionEvent - The interaction event wrapping the DOM event | ||
@@ -514,3 +458,2 @@ * @param displayObject - The display object that was tested | ||
* Is called when the pointer button is released on the renderer element | ||
* | ||
* @param event - The DOM event of a pointer button being released | ||
@@ -521,3 +464,2 @@ */ | ||
* Processes the result of the pointer up check and dispatches the event if need be | ||
* | ||
* @param interactionEvent - The interaction event wrapping the DOM event | ||
@@ -530,3 +472,2 @@ * @param displayObject - The display object that was tested | ||
* Is called when the pointer moves across the renderer element | ||
* | ||
* @param originalEvent - The DOM event of a pointer moving | ||
@@ -537,3 +478,2 @@ */ | ||
* Processes the result of the pointer move check and dispatches the event if need be | ||
* | ||
* @param interactionEvent - The interaction event wrapping the DOM event | ||
@@ -546,3 +486,2 @@ * @param displayObject - The display object that was tested | ||
* Is called when the pointer is moved out of the renderer element | ||
* | ||
* @private | ||
@@ -554,3 +493,2 @@ * @param {PointerEvent} originalEvent - The DOM event of a pointer being moved out | ||
* Processes the result of the pointer over/out check and dispatches the event if need be. | ||
* | ||
* @param interactionEvent - The interaction event wrapping the DOM event | ||
@@ -563,3 +501,2 @@ * @param displayObject - The display object that was tested | ||
* Is called when the pointer is moved into the renderer element. | ||
* | ||
* @param originalEvent - The DOM event of a pointer button being moved into the renderer view. | ||
@@ -570,5 +507,4 @@ */ | ||
* Get InteractionData for a given pointerId. Store that data as well. | ||
* | ||
* @param event - Normalized pointer event, output from normalizeToPointerData. | ||
* @return - Interaction data for the given pointer identifier. | ||
* @returns - Interaction data for the given pointer identifier. | ||
*/ | ||
@@ -578,3 +514,2 @@ private getInteractionDataForPointerId; | ||
* Return unused InteractionData to the pool, for a given pointerId | ||
* | ||
* @param pointerId - Identifier from a pointer event | ||
@@ -585,3 +520,2 @@ */ | ||
* Configure an InteractionEvent to wrap a DOM PointerEvent and InteractionData | ||
* | ||
* @param interactionEvent - The event to be configured | ||
@@ -591,3 +525,3 @@ * @param pointerEvent - The DOM event that will be paired with the InteractionEvent | ||
* with the InteractionEvent | ||
* @return - the interaction event that was passed in | ||
* @returns - the interaction event that was passed in | ||
*/ | ||
@@ -597,5 +531,4 @@ private configureInteractionEventForDOMEvent; | ||
* Ensures that the original event object contains all data that a regular pointer event would have | ||
* | ||
* @param {TouchEvent|MouseEvent|PointerEvent} event - The original event data from a touch or mouse event | ||
* @return - An array containing a single normalized pointer event, in the case of a pointer | ||
* @returns - An array containing a single normalized pointer event, in the case of a pointer | ||
* or mouse event, or a multiple normalized pointer events if there are multiple changed touches | ||
@@ -616,3 +549,2 @@ */ | ||
* DisplayObjects with the {@link PIXI.interactiveTarget} mixin use this class to track interactions | ||
* | ||
* @class | ||
@@ -640,3 +572,2 @@ * @private | ||
* Unique pointer id of the event | ||
* | ||
* @readonly | ||
@@ -649,3 +580,2 @@ * @private | ||
* State of the tracking data, expressed as bit flags | ||
* | ||
* @private | ||
@@ -658,3 +588,2 @@ * @member {number} | ||
* Is the tracked event inactive (not over or down)? | ||
* | ||
* @private | ||
@@ -666,3 +595,2 @@ * @member {number} | ||
* Is the tracked event over the DisplayObject? | ||
* | ||
* @private | ||
@@ -675,3 +603,2 @@ * @member {boolean} | ||
* Did the right mouse button come down in the DisplayObject? | ||
* | ||
* @private | ||
@@ -684,3 +611,2 @@ * @member {boolean} | ||
* Did the left mouse button come down in the DisplayObject? | ||
* | ||
* @private | ||
@@ -719,6 +645,5 @@ * @member {boolean} | ||
* Used by {@link PIXI.InteractionManager} to automatically give all DisplayObjects these properties | ||
* | ||
* @private | ||
* @name interactiveTarget | ||
* @type {Object} | ||
* @type {object} | ||
* @memberof PIXI | ||
@@ -737,3 +662,2 @@ * @example | ||
* Strategy how to search through stage tree for interactive objects | ||
* | ||
* @memberof PIXI | ||
@@ -746,3 +670,2 @@ */ | ||
* Recursive implementation for findHit | ||
* | ||
* @private | ||
@@ -757,3 +680,3 @@ * @param interactionEvent - event containing the point that | ||
* @param interactive - Whether the displayObject is interactive | ||
* @return - Returns true if the displayObject hit the point | ||
* @returns - Returns true if the displayObject hit the point | ||
*/ | ||
@@ -765,3 +688,2 @@ recursiveFindHit(interactionEvent: InteractionEvent, displayObject: DisplayObject, func?: InteractionCallback, hitTest?: boolean, interactive?: boolean): boolean; | ||
* testing the interactive objects and passes the hit across in the function. | ||
* | ||
* @private | ||
@@ -775,3 +697,3 @@ * @param interactionEvent - event containing the point that | ||
* @param hitTest - this indicates if the objects inside should be hit test against the point | ||
* @return - Returns true if the displayObject hit the point | ||
* @returns - Returns true if the displayObject hit the point | ||
*/ | ||
@@ -778,0 +700,0 @@ findHit(interactionEvent: InteractionEvent, displayObject: DisplayObject, func?: InteractionCallback, hitTest?: boolean): void; |
{ | ||
"name": "@pixi/interaction", | ||
"version": "6.3.2", | ||
"version": "6.4.0", | ||
"main": "dist/cjs/interaction.js", | ||
"module": "dist/esm/interaction.js", | ||
"bundle": "dist/browser/interaction.js", | ||
"types": "index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": { | ||
"default": "./dist/cjs/interaction.js", | ||
"types": "./index.d.ts" | ||
}, | ||
"require": { | ||
"default": "./dist/esm/interaction.js", | ||
"types": "./index.d.ts" | ||
} | ||
} | ||
}, | ||
"description": "Plugin for handling mouse, touch and pointer events", | ||
@@ -28,9 +41,9 @@ "author": "Mat Groves", | ||
"peerDependencies": { | ||
"@pixi/core": "6.3.2", | ||
"@pixi/display": "6.3.2", | ||
"@pixi/math": "6.3.2", | ||
"@pixi/ticker": "6.3.2", | ||
"@pixi/utils": "6.3.2" | ||
"@pixi/core": "6.4.0", | ||
"@pixi/display": "6.4.0", | ||
"@pixi/math": "6.4.0", | ||
"@pixi/ticker": "6.4.0", | ||
"@pixi/utils": "6.4.0" | ||
}, | ||
"gitHead": "87031295631dcd7db3e24b99ed7ceb2c4f963a40" | ||
"gitHead": "e7eaa713b6e0eeb335e90384aec778f5c99c60d5" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1218020
6470