getRotation
Last updated
Returns the rotation of an object.
getRotation(objectName: string): Promise<Euler>objectName
string
Yes
Object name
Promise<Euler> — Object rotation as {x, y, z, order}.
x, y, z — rotation angles in degrees
order — rotation order (e.g., "XYZ")
See Euler in Common Types.
const rotation = await api.getRotation("Chair");
console.log(rotation); // { x: 0, y: 45, z: 0, order: "XYZ" }Values are in degrees, not radians
Returns local rotation (relative to parent)
Same value as getObjects()[0].rotation
Only accepts string, not array
Last updated