xxxxxxxxxx
15
function setup() {
createCanvas3D(600, 400);
background3D("#333333");
diffuse("orange");
// We create a thin cylinder
var straw = cylinder(0, 0, 0, 0.1, 4);
// Now we can move or rotate it
straw.setPositionY(1); //a bit upper
straw.setRotationZ(45); //rotated 45° on Z-axis
straw.setScale(2); //double scale
}
function draw() {}