pixijs-input-devices 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -38
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -213,23 +213,7 @@ declare class NavigationManager {
|
|
|
213
213
|
/**
|
|
214
214
|
* Spatial navigation options.
|
|
215
215
|
*/
|
|
216
|
-
spatial:
|
|
217
|
-
/**
|
|
218
|
-
* Minimum distance in a direction that a container has to be
|
|
219
|
-
* from the global position of the container to appear as the
|
|
220
|
-
* next option.
|
|
221
|
-
*
|
|
222
|
-
* @default 10
|
|
223
|
-
*/
|
|
224
|
-
minimumDistance: number;
|
|
225
|
-
/**
|
|
226
|
-
* Search preference given to containers along the same axis
|
|
227
|
-
* as the navigation intent.
|
|
228
|
-
*
|
|
229
|
-
* @default 2.5
|
|
230
|
-
*/
|
|
231
|
-
directionAxisWeight: number;
|
|
232
|
-
};
|
|
216
|
+
spatial: SpatialNavigationOptions;
|
|
233
217
|
/**
|
|
234
218
|
* FederatedPointerEvents to fire when navigating containers.
|
|
235
219
|
*/
|
|
@@ -280,6 +264,8 @@ declare class NavigationManager {
|
|
|
280
264
|
private _rootContainer?;
|
|
281
265
|
private _rootFocused?;
|
|
282
266
|
private _clearBinds?;
|
|
267
|
+
private _backtrackSource;
|
|
268
|
+
private _backtrackDirection;
|
|
283
269
|
private constructor();
|
|
284
270
|
/**
|
|
285
271
|
* Whether navigation is enabled and NOT paused.
|
|
@@ -306,13 +292,6 @@ declare class NavigationManager {
|
|
|
306
292
|
* @param stageRoot - Root navigation responder container, where navigatable
|
|
307
293
|
* containers can live.
|
|
308
294
|
*/
|
|
309
|
-
/**
|
|
310
|
-
* Manually invalidate the navigatable-list cache for the current stage.
|
|
311
|
-
*
|
|
312
|
-
* Call this after any structural change to the UI tree (adding/removing
|
|
313
|
-
* children, toggling visibility) so the next navigation query is accurate.
|
|
314
|
-
*/
|
|
315
|
-
invalidateNavCache(): void;
|
|
316
295
|
enable(stageRoot: Container): this;
|
|
317
296
|
/**
|
|
318
297
|
* Set the new top-most global interaction target.
|
|
@@ -346,6 +325,7 @@ declare class NavigationManager {
|
|
|
346
325
|
* @param device - The device setting focus. When omitted, assumes pointer.
|
|
347
326
|
*/
|
|
348
327
|
setFocus(target: Container | undefined | null, device?: Device): void;
|
|
328
|
+
private _clearBacktrack;
|
|
349
329
|
private _clearNavigateBindsHandler;
|
|
350
330
|
private _handleNavigateBindEvent;
|
|
351
331
|
private _focus;
|
|
@@ -964,25 +944,12 @@ export declare const Navigate: Readonly<{
|
|
|
964
944
|
* Set stage to enable the global responder behaviors.
|
|
965
945
|
*/
|
|
966
946
|
export declare const UINavigation: NavigationManager;
|
|
967
|
-
/**
|
|
968
|
-
* @returns all navigatable containers in some container.
|
|
969
|
-
*
|
|
970
|
-
* Results are cached per-root; call `invalidateNavigatablesCache(root)` after
|
|
971
|
-
* structural or visibility changes.
|
|
972
|
-
*/
|
|
947
|
+
/** @returns all navigatable containers in some container. */
|
|
973
948
|
export declare function getAllNavigatables(target: Container, navigatables?: NavigatableContainer[]): NavigatableContainer[];
|
|
974
949
|
/**
|
|
975
950
|
* @returns the first navigatable container in the given direction
|
|
976
951
|
*/
|
|
977
952
|
export declare function getFirstNavigatable(root: Container, options: NavigatableQueryOptions): NavigatableContainer | undefined;
|
|
978
|
-
/**
|
|
979
|
-
* Invalidate the navigatable-list cache for a specific root (or the entire
|
|
980
|
-
* cache when no argument is given).
|
|
981
|
-
*
|
|
982
|
-
* Call this after adding/removing navigatable children or changing their
|
|
983
|
-
* `visible` property so the next directional-navigation query stays correct.
|
|
984
|
-
*/
|
|
985
|
-
export declare function invalidateNavigatablesCache(root?: Container): void;
|
|
986
953
|
export declare function isChildOf(child: Container, root: Container): boolean;
|
|
987
954
|
export declare function isVisible(target: Container): boolean;
|
|
988
955
|
/**
|
|
@@ -1250,6 +1217,7 @@ export interface NavigationResponder {
|
|
|
1250
1217
|
export interface SpatialNavigationOptions {
|
|
1251
1218
|
minimumDistance: number;
|
|
1252
1219
|
directionAxisWeight: number;
|
|
1220
|
+
backtracking: boolean;
|
|
1253
1221
|
}
|
|
1254
1222
|
export type Axis = (typeof Axis)[keyof typeof Axis];
|
|
1255
1223
|
export type AxisCode = typeof AxisCode[number];
|