aboutsummaryrefslogtreecommitdiff
path: root/lib/components/max_velocity.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/components/max_velocity.js')
-rw-r--r--lib/components/max_velocity.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/components/max_velocity.js b/lib/components/max_velocity.js
new file mode 100644
index 0000000..70bf343
--- /dev/null
+++ b/lib/components/max_velocity.js
@@ -0,0 +1,25 @@
+import { Component } from '@serpentity/serpentity';
+
+/**
+ * Component that stores max velocity constraint
+ *
+ * @extends {external:Serpentity.Component}
+ * @class MaxVelocityComponent
+ * @param {object} config a configuration object to extend.
+ */
+export default class MaxVelocityComponent extends Component {
+ constructor(config) {
+
+ super(config);
+
+ /**
+ * The properthy that holds the max velocity
+ *
+ * @property {number} maxVelocity
+ * @instance
+ * @memberof MaxVelocityComponent
+ */
+ this.maxVelocity = this.maxVelocity || 20;
+ }
+};
+