Rotation in Anark Studio 2.5
Specifies rotation direction.
Inherits from:
Instance Properties
name | type | description |
---|---|---|
constructor | Object | A reference to the constructor class for the current object instance. [from Object] |
prototype | Object | The prototype for a class. [from Object] |
x | Number | X-axis rotation. |
y | Number | Y-axis rotation. |
z | Number | Z-axis rotation. |
Instance Methods
name | returns | description |
---|---|---|
add(otherRotation) | (none) | Add on a rotation vector. |
copy() | Rotation | Return a copy of the rotation object. |
equals(otherRotation) | Boolean | Compare two rotation vectors for equivalence. |
hasOwnProperty(propertyOrMethodName) | Boolean | Determines if the object/instance itself has the named property or method. [from Object] |
isPrototypeOf(instanceToTest) | Boolean | Determines if the calling object prototype is in the inheritance chain for the supplied argument. [from Object] |
linear(targetVector,weightFactor) | (none) | Move the rotation towards another rotation vector. |
maxVector(otherRotation) | (none) | Calculate the maximum rotation vector. |
minVector(otherRotation) | (none) | Calculate the minimum rotation vector. |
propertyIsEnumerable(propertyOrMethodName) | Boolean |
Determines if the object/instance itself has a property or method of the supplied name which will appear in a for (prop in obj) enumeration.
[from Object]
|
scale(scaleFactor) | (none) | Scale the rotation by a factor. |
subtract(otherRotation) | (none) | Subtract a rotation amount. |
toLocaleString() | String |
For most objects, the same as toString() unless explicitly overridden.
[from Object]
|
toString() | String | Returns a string representation of the object. [from Object] |
transform(transformMatrix) | (none) | Transform the rotation vector by a matrix. |
valueOf() | String |
Returns the internal this value of the object.
[from Object]
|
Description
A rotation is a special kind of vector encapsulating the data and operations of three angular components, X, Y and Z.
Constructor syntax
var rotation = new Rotation( x, y, z );
x
- optional — The floating point value representing the degrees of rotation about the X axis.
y
- optional — The floating point value representing the degrees of rotation about the Y axis.
z
- optional — The floating point value representing the degrees of rotation about the Z axis.
Methods that return a Rotation
name | of object | description |
---|---|---|
copy() | Rotation | Return a copy of the rotation object. |
Arguments that are a Rotation
name | in method | of object | description |
---|---|---|---|
otherRotation | add(otherRotation) | Rotation | The rotation vector to add. |
otherRotation | subtract(otherRotation) | Rotation | The rotation/vector to subtrac |
otherRotation | equals(otherRotation) | Rotation | The rotation vector to compare |
otherRotation | maxVector(otherRotation) | Rotation | The rotation vector to compare |
otherRotation | minVector(otherRotation) | Rotation | The rotation vector to compare |