From 582cea2aedd3b5763232837cc4960f07223908fb Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 9 Mar 2020 14:22:58 -0500 Subject: Transfer components to lib repo --- components/force/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 components/force/index.js (limited to 'components/force/index.js') diff --git a/components/force/index.js b/components/force/index.js new file mode 100644 index 0000000..8953b55 --- /dev/null +++ b/components/force/index.js @@ -0,0 +1,19 @@ +import { Component } from '@serpentity/serpentity'; + +/* + * Force component, stores the components of a force vector + * Public members: + * -x // the x component of force vector + * -y // the y component of force vector + * -z // the z component of force vector + */ +module export class Force extends Component { + constructor(config) { + + super(config) + + this.x = this.x || 0; + this.y = this.y || 0; + this.z = this.z || 0; + } +}; -- cgit