• 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/EntityComponentSystem/Components/MotionComponent.ts
1
import { Vector } from '../../Math/vector';
2
import { Component } from '../Component';
3

4
export interface Motion {
5
  /**
6
   * The velocity of an entity in pixels per second
7
   */
8
  vel: Vector;
9

10
  /**
11
   * The acceleration of entity in pixels per second^2
12
   */
13
  acc: Vector;
14

15
  /**
16
   * The scale rate of change in scale units per second
17
   */
18
  scaleFactor: Vector;
19

20
  /**
21
   * The angular velocity which is how quickly the entity is rotating in radians per second
22
   */
23
  angularVelocity: number;
24

25
  /**
26
   * The amount of torque applied to the entity, angular acceleration is torque * inertia
27
   */
28
  torque: number;
29

30
  /**
31
   * Inertia can be thought of as the resistance to motion
32
   */
33
  inertia: number;
34
}
35

36
export class MotionComponent extends Component {
37
  /**
38
   * The velocity of an entity in pixels per second
39
   */
UNCOV
40
  public vel: Vector = Vector.Zero;
×
41

42
  /**
43
   * The acceleration of entity in pixels per second^2
44
   */
UNCOV
45
  public acc: Vector = Vector.Zero;
×
46

47
  /**
48
   * The scale rate of change in scale units per second
49
   */
UNCOV
50
  public scaleFactor: Vector = Vector.Zero;
×
51

52
  /**
53
   * The angular velocity which is how quickly the entity is rotating in radians per second
54
   */
UNCOV
55
  public angularVelocity = 0;
×
56

57
  /**
58
   * The amount of torque applied to the entity, angular acceleration is torque * inertia
59
   */
UNCOV
60
  public torque: number = 0;
×
61

62
  /**
63
   * Inertia can be thought of as the resistance to motion
64
   */
UNCOV
65
  public inertia: number = 1;
×
66
}
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