blob: bf540a17822d66bc6c20862e1582ef0e5f6263dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import type { Accel2D, Force2D } from "../interfaces";
import { Component } from "./Component";
import { ComponentNames } from ".";
/**
* A list of forces and torque, (in newtons, and newton-meters respectively)
* to apply on one Physics system update (after which, they are cleared).
*/
export class Forces extends Component {
public forces: Force2D[];
constructor(forces?: Force2D[]) {
super(ComponentNames.Forces);
this.forces = forces ?? [];
}
}
|