]> git.r.bdr.sh - rbdr/sumo/blob - lib/components/force.js
Add control via keyboard (#6)
[rbdr/sumo] / lib / components / force.js
1 import { Component } from '@serpentity/serpentity';
2
3 /**
4 * Component that stores a force vector
5 *
6 * @extends {external:Serpentity.Component}
7 * @class ForceComponent
8 * @param {object} config a configuration object to extend.
9 */
10 export default class ForceComponent extends Component {
11 constructor(config) {
12
13 super(config);
14
15 /**
16 * The properthy that holds the x component of the vector
17 *
18 * @property {number} x
19 * @instance
20 * @memberof AngleComponent
21 */
22 this.x = this.x || 0;
23
24 /**
25 * The properthy that holds the y component of the vector
26 *
27 * @property {number} y
28 * @instance
29 * @memberof AngleComponent
30 */
31
32 this.y = this.y || 0;
33 /**
34 * The properthy that holds the z component of the vector
35 *
36 * @property {number} z
37 * @instance
38 * @memberof AngleComponent
39 */
40 this.z = this.z || 0;
41 }
42 };
43