[][src]Static p5_sys::global::rotateY

pub static rotateY: RotateYInternalType

Rotates a shape around Y axis by the amount specified in angle parameter. The angles can be entered in either RADIANS or DEGREES.

Objects are always rotated around their relative position to the origin and positive numbers rotate objects in a clockwise direction. All tranformations are reset when draw() begins again.

Examples

function setup() {
  createCanvas(100, 100, WEBGL);
}
function draw() {
  background(255);
  rotateY(millis() / 1000);
  box();
}

Parameters

angle the angle of rotation, specified in radians or degrees, depending on current angleMode