transform.rotate

Section: Transform

What it does

transform.rotate acts on transform: it rotates. It takes x, y and z.

The API says: degrees

Signature

transform.rotate(x, y, z)

Arguments

  • x
  • y
  • z

Example · generated

function update(dt) {  transform.rotate(0, 2, 0);}

transform.rotate is called with values of the shape its signature asks for. The code sits in update(dt), which the engine calls every frame: dt is the time since the last one, in seconds.

8 members in transform