X-Git-Url: https://git.r.bdr.sh/rbdr/serpentity-lib/blobdiff_plain/8d90115ac567adb5a3c61eefd27ab675fb3c0ef7..582cea2aedd3b5763232837cc4960f07223908fb:/components/velocity/index.js diff --git a/components/velocity/index.js b/components/velocity/index.js new file mode 100644 index 0000000..2becf51 --- /dev/null +++ b/components/velocity/index.js @@ -0,0 +1,19 @@ +import { Component } from '@serpentity/serpentity'; + +/* + * Velocity component, stores the components of a velocity vector + * Public members: + * -x // the x component of velocity vector + * -y // the y component of velocity vector + * -z // the z component of velocity vector + */ +module export class Velocity extends Component { + constructor(config) { + + super(config) + + this.x = this.x || 0; + this.y = this.y || 0; + this.z = this.z || 0; + } +};