diff options
Diffstat (limited to 'lib/components/force.js')
| -rw-r--r-- | lib/components/force.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/components/force.js b/lib/components/force.js new file mode 100644 index 0000000..f0e460c --- /dev/null +++ b/lib/components/force.js @@ -0,0 +1,43 @@ +import { Component } from '@serpentity/serpentity'; + +/** + * Component that stores a force vector + * + * @extends {external:Serpentity.Component} + * @class ForceComponent + * @param {object} config a configuration object to extend. + */ +export default class ForceComponent extends Component { + constructor(config) { + + super(config); + + /** + * The properthy that holds the x component of the vector + * + * @property {number} x + * @instance + * @memberof AngleComponent + */ + this.x = this.x || 0; + + /** + * The properthy that holds the y component of the vector + * + * @property {number} y + * @instance + * @memberof AngleComponent + */ + + this.y = this.y || 0; + /** + * The properthy that holds the z component of the vector + * + * @property {number} z + * @instance + * @memberof AngleComponent + */ + this.z = this.z || 0; + } +}; + |