rotation(...)

Studio

rotation(...)

rotation(val : number[]) : this;

Sets the current rotation of the node, in the form [x, y, z].

Components form angles, in degrees, around the x, y, and z axis of the parent node, in that order.

Default value: [0, 0, 0]

Parameters

Parameter Type Description
val number[] The value to set the rotation to, in the following form: [x, y, z].

Returns

this

Example

myobject.rotation([90, 0, 0]);
// myobject is now rotated by 90 degrees around its x axis.
Open in new window