• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

excaliburjs / Excalibur / 14804036802

02 May 2025 09:58PM UTC coverage: 5.927% (-83.4%) from 89.28%
14804036802

Pull #3404

github

web-flow
Merge 5c103d7f8 into 0f2ccaeb2
Pull Request #3404: feat: added Graph module to Math

234 of 8383 branches covered (2.79%)

229 of 246 new or added lines in 1 file covered. (93.09%)

13145 existing lines in 208 files now uncovered.

934 of 15759 relevant lines covered (5.93%)

4.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/engine/Input/PointerComponent.ts
1
import { Component } from '../EntityComponentSystem/Component';
2
import { BoundingBox } from '../Collision/BoundingBox';
3

4
export interface PointerComponentOptions {
5
  useColliderShape?: boolean;
6
  useGraphicsBounds?: boolean;
7
  localBounds?: BoundingBox;
8
}
9

10
/**
11
 * Add this component to optionally configure how the pointer
12
 * system detects pointer events.
13
 *
14
 * By default the collider shape is used and graphics bounds is not.
15
 *
16
 * If both collider shape and graphics bounds are enabled it will fire events if either or
17
 * are intersecting the pointer.
18
 */
19
export class PointerComponent extends Component {
20
  /**
21
   * Use any existing Collider component geometry for pointer events. This is useful if you want
22
   * user pointer events only to trigger on the same collision geometry used in the collider component
23
   * for collision resolution. Default is `true`.
24
   */
UNCOV
25
  public useColliderShape = true;
×
26
  /**
27
   * Use any existing Graphics component bounds for pointers. This is useful if you want the axis aligned
28
   * bounds around the graphic to trigger pointer events. Default is `true`.
29
   */
UNCOV
30
  public useGraphicsBounds = true;
×
31

32
  /**
33
   * Optionally use other bounds for pointer testing
34
   */
35
  public localBounds?: BoundingBox;
36

37
  constructor(options?: PointerComponentOptions) {
UNCOV
38
    super();
×
UNCOV
39
    this.useColliderShape = options?.useColliderShape ?? this.useColliderShape;
×
UNCOV
40
    this.useGraphicsBounds = options?.useGraphicsBounds ?? this.useGraphicsBounds;
×
UNCOV
41
    this.localBounds = options?.localBounds;
×
42
  }
43
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc