Files
Foundry-VTT-Docker/resources/app/node_modules/@pixi/events/lib/FederatedMouseEvent.mjs.map

1 line
7.0 KiB
Plaintext
Raw Normal View History

2025-01-04 00:34:03 +01:00
{"version":3,"file":"FederatedMouseEvent.mjs","sources":["../src/FederatedMouseEvent.ts"],"sourcesContent":["import { Point } from '@pixi/core';\nimport { FederatedEvent } from './FederatedEvent';\n\nimport type { IPointData } from '@pixi/core';\nimport type { DisplayObject } from '@pixi/display';\nimport type { PixiTouch } from './FederatedEvent';\n\n/**\n * A {@link PIXI.FederatedEvent} for mouse events.\n * @memberof PIXI\n */\nexport class FederatedMouseEvent extends FederatedEvent<\nMouseEvent | PointerEvent | PixiTouch\n> implements MouseEvent\n{\n /** Whether the \"alt\" key was pressed when this mouse event occurred. */\n altKey: boolean;\n\n /** The specific button that was pressed in this mouse event. */\n button: number;\n\n /** The button depressed when this event occurred. */\n buttons: number;\n\n /** Whether the \"control\" key was pressed when this mouse event occurred. */\n ctrlKey: boolean;\n\n /** Whether the \"meta\" key was pressed when this mouse event occurred. */\n metaKey: boolean;\n\n /** This is currently not implemented in the Federated Events API. */\n relatedTarget: EventTarget;\n\n /** Whether the \"shift\" key was pressed when this mouse event occurred. */\n shiftKey: boolean;\n\n /** The coordinates of the mouse event relative to the canvas. */\n public client: Point = new Point();\n\n /** @readonly */\n public get clientX(): number { return this.client.x; }\n\n /** @readonly */\n public get clientY(): number { return this.client.y; }\n\n /**\n * Alias for {@link PIXI.FederatedMouseEvent.clientX this.clientX}.\n * @readonly\n */\n get x(): number { return this.clientX; }\n\n /**\n * Alias for {@link PIXI.FederatedMouseEvent.clientY this.clientY}.\n * @readonly\n */\n get y(): number { return this.clientY; }\n\n /** This is the number of clicks that occurs in 200ms/click of each other. */\n public detail: number;\n\n /** The movement in this pointer relative to the last `mousemove` event. */\n public movement: Point = new Point();\n\n /** @readonly */\n get movementX(): number { return this.movement.x; }\n\n /** @readonly */\n get movementY(): number { return this.movement.y; }\n\n /**\n * The offset of the pointer coordinates w.r.t. target DisplayObject in world space. This is\n * not supported at the moment.\n */\n public offset: Point = new Point();\n\n /** @readonly */\n get offsetX(): number { return this.offset.x; }\n\n /** @readonly */\n get offsetY(): number { return this.offset.y; }\n\n /** The pointer coordinates in world space. */\n public global: Point = new Point();\n\n /** @readonly */\n get globalX(): number { return this.global.x; }\n\n /** @readonly */\n get globalY(): number { return this.global.y; }\n\n /**\n * The pointer coordinates in the renderer's {@link PIXI.Renderer.screen screen}. This has slightly\n * different semantics than native PointerEvent screenX/screenY.\n */\n public screen: Point = new Point();\n\n /**\n * The pointer coordinates in the renderer's screen. Alias for {@code screen.x}.\n * @readonly\n */\n get screenX(): number { return this.screen.x; }\n\n /**\n * The pointer coordinates in the renderer's screen. Alias for {@code screen.y}.\n * @readonly\n */\n get screenY(): number { return this.screen.y; }\n\n /**\n * This will return the local coordinates of the specified displayObject for this InteractionData\n * @param {PIXI.DisplayObject} displayObject - The DisplayObject that you would like the local\n * coords off\n * @param {PIXI.IPointData} point - A Point object in which to store the value, optional (otherwise\n * will create a new point)\n * @param {PIXI.IPointData} globalPos - A Point object containing your custom global coords, optional\n * (otherwise will use the current global coords)\n * @returns - A point containing the coordinates of the InteractionData position relative\n *