Euler

Euler class.

Constructor

new Euler(xopt, yopt, zopt, orderopt)

Parameters:
NameTypeAttributesDefaultDescription
xnumber<optional>
0
ynumber<optional>
0
znumber<optional>
0
orderstring<optional>
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() → {Euler}

Returns a new Euler with the same parameters as this one.

Returns:
Type: 
Euler

copy(euler) → {Euler}

Copies value of euler to this euler.

Parameters:
NameTypeDescription
eulerEuler
Returns:
Type: 
Euler

onChange(callback) → {Euler}

Parameters:
NameTypeDescription
callbackfunction

When the Euler angle value changes, the callback method is triggered

Returns:
Type: 
Euler

set(x, y, z, order) → {Euler}

Parameters:
NameTypeDefaultDescription
xnumber0

the angle of the x axis in radians.

ynumber0

the angle of the y axis in radians.

znumber0

the angle of the z axis in radians.

orderstring

(optional) a string representing the order that the rotations are applied.

Returns:
Type: 
Euler

setFromQuaternion(q, order, updateopt) → {Euler}

Sets the angles of this euler transform from a normalized quaternion based on the orientation specified by order.

Parameters:
NameTypeAttributesDefaultDescription
qQuaternion

a normalized quaternion.

orderstring

(optional) a string representing the order that the rotations are applied.

updateboolean<optional>
true

Whether to notify Euler angle has changed

Returns:
Type: 
Euler

setFromRotationMatrix(m, order, updateopt) → {Euler}

Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order.

Parameters:
NameTypeAttributesDefaultDescription
mMatrix4

a Matrix4 of which the upper 3x3 of matrix is a pure rotation matrix

orderstring

(optional) a string representing the order that the rotations are applied.

updateboolean<optional>
true

Whether to notify Euler angle has changed

Returns:
Type: 
Euler