Creates a new observable quaternion.
The x component.
The y component.
The z component.
The w component.
The callback when changed.
The owner of callback.
The callback function triggered when x
and/or y
are changed
The owner of the callback
Array containing the x, y, z, w values.
Array containing the x, y, z, w values.
The w component of the quaternion.
The w component of the quaternion.
The x component of the quaternion.
The x component of the quaternion.
The y component of the quaternion.
The y component of the quaternion.
The z component of the quaternion.
The z component of the quaternion.
Creates a clone of this quaternion.
Callback when changed.
The callback function triggered when x
and/or y
are changed
Owner of callback.
Copies x, y, z, and w from the given quaternion.
The quaternion to copy from.
Copies x, y, z and w into the given quaternion.
The quaternion to copy to.
Returns true if the given quaternion is equal to this quaternion.
The quaternion to check.
Normalize the quaternion.
The receiving quaternion. If not supplied, a new quaternion will be created.
Sets the quaternion to new x, y, z and w components.
X component to set.
Y component to set.
Z component to set.
W component to set.
Sets the euler angles in degrees.
The x angle.
The y angle.
The z angle.
Sets the quaternion to a new x, y, z and w components.
The array containing x, y, z and w, expected length is 4.
Calculates the conjugate of a quaternion if the quaternion is normalized.
The quaternion to calculate conjugate of.
The receiving quaternion. If not supplied, a new quaternion will be created.
Creates a quaternion from the given euler angle x, y, z.
X axis to rotate around in degrees.
Y axis to rotate around in degrees.
Z axis to rotate around in degrees.
The receiving quaternion. If not supplied, a new quaternion will be created.
Rotates a quaternion by the given angle about the X axis.
The quaternion to rotate.
The angle (in radians) to rotate.
The receiving quaternion. If not supplied, a new quaternion will be created.
Rotates a quaternion by the given angle about the Y axis.
The quaternion to rotate.
The angle (in radians) to rotate.
The receiving quaternion. If not supplied, a new quaternion will be created.
Rotates a quaternion by the given angle about the Z axis.
The quaternion to rotate.
The angle (in radians) to rotate.
The receiving quaternion. If not supplied, a new quaternion will be created.
Performs a spherical linear interpolation between two quaternions.
The first quaternion.
The second quaternion.
The interpolation amount, in the range [0-1], between the two inputs.
The receiving quaternion. If not supplied, a new quaternion will be created.
Generated using TypeDoc
Represents a rotation quaternion in 3D space.