]> git.r.bdr.sh - rbdr/serpentity-lib/blobdiff - components/acceleration/index.js
Transfer components to lib repo
[rbdr/serpentity-lib] / components / acceleration / index.js
diff --git a/components/acceleration/index.js b/components/acceleration/index.js
new file mode 100644 (file)
index 0000000..ffc5cb6
--- /dev/null
@@ -0,0 +1,19 @@
+import { Component } from '@serpentity/serpentity';
+
+/*
+ * Acceleration component, stores the components of a acceleration vector
+ * Public members:
+ * -x <Number> // the x component of acceleration vector
+ * -y <Number> // the y component of acceleration vector
+ * -z <Number> // the z component of acceleration vector
+ */
+export default class Acceleration extends Component {
+  constructor(config) {
+
+    super(config)
+
+    this.x = this.x || 0;
+    this.y = this.y || 0;
+    this.z = this.z || 0;
+  }
+};