Skip to content

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]

ParameterTypeDescription
valnumber[]The value to set the rotation to, in the following form: [x, y, z].

this

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