Constructor
new Euler(xopt, yopt, zopt, orderopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x | Number | <optional> | 0 | |
y | Number | <optional> | 0 | |
z | Number | <optional> | 0 | |
order | String | <optional> | t3d.Euler.DefaultOrder |
Members
order :String
Type:
- String
order :String
Type:
- String
x :Number
Type:
- Number
x :Number
Type:
- Number
y :Number
Type:
- Number
y :Number
Type:
- Number
z :Number
Type:
- Number
z :Number
Type:
- Number
(static, readonly) DefaultOrder
The default order in which to apply rotations.
(static, readonly) RotationOrders
The order in which to apply rotations.
Methods
clone() → {t3d.Euler}
Returns a new Euler with the same parameters as this one.
Returns:
- Type:
- t3d.
Euler
copy(euler) → {t3d.Euler}
Copies value of euler to this euler.
Parameters:
Name | Type | Description |
---|---|---|
euler | t3d. |
Returns:
- Type:
- t3d.
Euler
onChange(callback) → {t3d.Euler}
Parameters:
Name | Type | Description |
---|---|---|
callback | function | When the Euler angle value changes, the callback method is triggered |
Returns:
- Type:
- t3d.
Euler
set(x, y, z, order) → {t3d.Euler}
Parameters:
Name | Type | Default | Description |
---|---|---|---|
x | Number | 0 | the angle of the x axis in radians. |
y | Number | 0 | the angle of the y axis in radians. |
z | Number | 0 | the angle of the z axis in radians. |
order | String | (optional) a string representing the order that the rotations are applied. |
Returns:
- Type:
- t3d.
Euler
setFromQuaternion(q, order, updateopt) → {t3d.Euler}
Sets the angles of this euler transform from a normalized quaternion based on the orientation specified by order.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
q | t3d. | a normalized quaternion. | ||
order | String | (optional) a string representing the order that the rotations are applied. | ||
update | Boolean | <optional> | true | Whether to notify Euler angle has changed |
Returns:
- Type:
- t3d.
Euler
setFromRotationMatrix(m, order, updateopt) → {t3d.Euler}
Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
m | t3d. | a Matrix4 of which the upper 3x3 of matrix is a pure rotation matrix | ||
order | String | (optional) a string representing the order that the rotations are applied. | ||
update | Boolean | <optional> | true | Whether to notify Euler angle has changed |
Returns:
- Type:
- t3d.
Euler