diff options
| author | Ben Beltran <ben@nsovocal.com> | 2020-03-09 14:22:58 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2020-03-09 14:22:58 -0500 |
| commit | 582cea2aedd3b5763232837cc4960f07223908fb (patch) | |
| tree | aaa3721fe01f4177ba5937f709ca53dd96887b07 /components/force/index.js | |
| parent | 8d90115ac567adb5a3c61eefd27ab675fb3c0ef7 (diff) | |
Transfer components to lib repo
Diffstat (limited to 'components/force/index.js')
| -rw-r--r-- | components/force/index.js | 19 |
1 files changed, 19 insertions, 0 deletions
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 <Number> // the x component of force vector + * -y <Number> // the y component of force vector + * -z <Number> // 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; + } +}; |