rotation(...)
Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.
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
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
val | number[] | The value to set the rotation to, in the following form: [x, y, z] . |
Returns
Section titled “Returns”this
Example
Section titled “Example”myobject.rotation([90, 0, 0]);// myobject is now rotated by 90 degrees around its x axis.