Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/excaliburjs/Excalibur. 🎮 Your friendly TypeScript 2D game engine for the web 🗡️ excaliburjs.com
excalibur excaliburjs game-development game-engine game-framework gamedev games html5-canvas typescript
Something went wrong. Try again.
TypeScript
123456789101112131415161718192021222324252627282930313233import type { GlobalCoordinates } from '../math/global-coordinates';import type { Vector } from '../math/vector';import type { PointerButton } from './pointer-button';import type { PointerType } from './pointer-type';
export class PointerEvent { public active = true; public cancel() { this.active = false; }
get pagePos(): Vector { return this.coordinates.pagePos; }
get screenPos(): Vector { return this.coordinates.screenPos; }
get worldPos(): Vector { return this.coordinates.worldPos; }
constructor( public type: 'down' | 'up' | 'move' | 'cancel', public pointerId: number, public button: PointerButton, public pointerType: PointerType, public coordinates: GlobalCoordinates, public nativeEvent: Event ) {}}