Class: Quaternion
WebSG.Quaternion
A Quaternion class with x, y, z, and w components. The class provides methods to set the components of the quaternion using an array-like syntax.
Indexable
▪ [n: number
]: number
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new Quaternion()
Properties
length
• Readonly
length: number
The number of components in the quaternion.
Defined in
w
• w: number
The w-component of the quaternion.
Defined in
x
• x: number
The x-component of the quaternion.
Defined in
y
• y: number
The y-component of the quaternion.
Defined in
z
• z: number
The z-component of the quaternion.
Defined in
Methods
set
▸ set(value
): Quaternion
Sets the quaternion components to the given values.
Parameters
Name | Type | Description |
---|---|---|
value | ArrayLike <number > | An array-like object containing the quaternion components. |