Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Ticker, UPDATE_PRIORITY } from '@pixi/ticker';
import { Point } from '@pixi/math';
import { DisplayObject } from '@pixi/display';
import InteractionData from './InteractionData';
import InteractionEvent from './InteractionEvent';
import InteractionTrackingData from './InteractionTrackingData';
import { EventEmitter } from '@pixi/utils';
import interactiveTarget from './interactiveTarget';
// Mix interactiveTarget into DisplayObject.prototype,
// after deprecation has been handled
DisplayObject.mixin(interactiveTarget);
const MOUSE_POINTER_ID = 1;
// helpers for hitTest() - only used inside hitTest()
const hitTestEvent = {
target: null,
data: {
global: null,
},
};
/**
* The interaction manager deals with mouse, touch and pointer events.
*
* Any DisplayObject can be interactive if its `interactive` property is set to true.
*
import { accessibleTarget } from './accessibleTarget';
import { removeItems, isMobile } from '@pixi/utils';
import { DisplayObject } from '@pixi/display';
// add some extra variables to the container..
DisplayObject.mixin(accessibleTarget);
const KEY_CODE_TAB = 9;
const DIV_TOUCH_SIZE = 100;
const DIV_TOUCH_POS_X = 0;
const DIV_TOUCH_POS_Y = 0;
const DIV_TOUCH_ZINDEX = 2;
const DIV_HOOK_SIZE = 1;
const DIV_HOOK_POS_X = -1000;
const DIV_HOOK_POS_Y = -1000;
const DIV_HOOK_ZINDEX = 2;
/**
* The Accessibility manager recreates the ability to tab and have content read by screen readers.
* This is very important as it can possibly help people with disabilities access PixiJS content.