Class: EulerAngle

EulerAngle

new EulerAngle(phiopt, thetaopt, psiopt)

EulerAngle is an internally used class. A EulerAngle instance is attached to a DisplayObject3D object's transform3D property (which is itself an instance of the Transform3D class). It is part of internal calculations, and should only be accessed by extremely advanced users. You should not have to deal with this class in normal usage of the engine.
Parameters:
Name Type Attributes Default Description
phi Number <optional>
0 New instance's phi value.
theta Number <optional>
0 New instance's theta value.
psi Number <optional>
0 New instance's psi value.
Source:

Members

phi :Number

The EulerAngle instance's phi property. Used for calculations.
Type:
  • Number
Default Value:
  • 0
Source:

psi :Number

The EulerAngle instance's psi property. Used for calculations.
Type:
  • Number
Default Value:
  • 0
Source:

theta :Number

The EulerAngle instance's theta property. Used for calculations.
Type:
  • Number
Default Value:
  • 0
Source:

Methods

clone() → {EulerAngle}

Produces a new EulerAngle instance that is duplicate of the current one.
Source:
Returns:
Returns a new EulerAngle instance.
Type
EulerAngle

copy(ea)

A shortcut to copy the phi, theta, and psi values of another EulerAngle to this one.
Parameters:
Name Type Description
ea EulerAngle The EulerAngle instance to copy values from.
Source:

setMatrix(mtx, tx, ty)

A method for setting the rotational values of a createjs.Matrix2D 3x3 matrix to mimic 3D rotation with affine transforms. Does not return a new createjs.Matrix2D, modifies the given one. Due to that it actually could be used with any matrix type class that uses the properties a, b, c, d, tx, and ty.
Parameters:
Name Type Description
mtx createjs.Matrix2D The createjs.Matrix2D to modify.
tx Number A translation X to apply to the createjs.Matrix2D.
ty Number A translation Y to apply to the createjs.Matrix2D.
Source:

toQuaternion() → {Quaternion}

A method for getting a Quaternion based on the current EulerAngle.
Source:
Returns:
Returns a new Quaternion instance.
Type
Quaternion

toString() → {String}

Returns a String representation of the EulerAngle instance's values.
Source:
Returns:
Returns a string with an object notation form of the phi, theta, and psi properties.
Type
String

updateData(phi, theta, psi)

A shortcut method for setting the phi, theta, and psi properties.
Parameters:
Name Type Description
phi Number New phi value.
theta Number New theta value.
psi Number New psi value.
Source:

updateFromQuaternion(q)

A method for updating the phi, theta, and psi based on a Quaternion intance.
Parameters:
Name Type Description
q Quaternion Quaternion instance to update from.
Source: