From 0c7f0571466dd2342a3532eb33d17d0451514fb6 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Tue, 7 May 2024 15:56:30 +0200 Subject: Add euler angle --- components/euler_angle/index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 components/euler_angle/index.js (limited to 'components/euler_angle/index.js') diff --git a/components/euler_angle/index.js b/components/euler_angle/index.js new file mode 100644 index 0000000..d1323a3 --- /dev/null +++ b/components/euler_angle/index.js @@ -0,0 +1,20 @@ +import { Component } from '@serpentity/serpentity'; + +/* + * EulerAngle component, stores the value of an euler + * angle. + * Public members: + * -pitch // the rotation on the x axis + * -yaw // the rotation on the y axis + * -roll // the rotation on the z axis + */ +export default class EulerAngle extends Component { + constructor(config) { + + super(config) + + this.pitch = this.pitch || 0; + this.yaw = this.yaw || 0; + this.roll = this.roll || 0; + } +}; -- cgit