Euler - noobgl/noobgl-euler GitHub Wiki
The Euler is a tool to compute rotations
Import
import { Euler } from "noobgl-euler";
Constructor
new Euler(x, y, z, order);
-
x
(optional) rotation angle along x axis in radian (default 0). -
y
(optional) rotation angle along y axis in radian (default 0). -
z
(optional) rotation angle along z axis in radian (default 0). -
order
(optional) order in which to compute rotations (defaultXYZ
).XYZ
XZY
YXZ
YZX
ZXY
ZYX
Methods
set(x, y, z)
Set the x, y and z angles.
-
x
rotation angle along x axis in radian. -
y
rotation angle along y axis in radian. -
z
rotation angle along z axis in radian.
add(x, y, z)
Add these angles to the current angles along x, y and z axis.
-
x
rotation angle along x axis in radian. -
y
rotation angle along y axis in radian. -
z
rotation angle along z axis in radian.
add(x, y, z)
Add these angles to the current angles along x, y and z axis.
-
x
rotation angle along x axis in radian. -
y
rotation angle along y axis in radian. -
z
rotation angle along z axis in radian.
subtract(x, y, z)
Subtract these angles to the current angles along x, y and z axis.
-
x
rotation angle along x axis in radian. -
y
rotation angle along y axis in radian. -
z
rotation angle along z axis in radian.
multiply(x, y, z)
Multiply these angles to the current angles along x, y and z axis.
-
x
rotation angle along x axis in radian. -
y
rotation angle along y axis in radian. -
z
rotation angle along z axis in radian.
divide(x, y, z)
Divide these angles to the current angles along x, y and z axis.
-
x
rotation angle along x axis in radian. -
y
rotation angle along y axis in radian. -
z
rotation angle along z axis in radian.
clone()
Clone the current Euler instance.
static from(source, order)
Create an instance of Euler from another type of data.
-
source
the data from which rotation is extracted, may be:Matrix3
Matrix4
-
order
(optional) order in which to compute rotations (defaultXYZ
).XYZ
XZY
YXZ
YZX
ZXY
ZYX