Tap and drag to rotate the wall. Press 'r' key to start or stop wall rotation. Press 's' key to save screenshot.
A fork of Cone Wall by Richard Bourne
xxxxxxxxxx
let flip = 0; // set flip = 1 before saving a screenshot or thumbnail; then set flip = 0
let hu = 0;
let spin = 0;
function setup() {
createCanvas(1112, 834, WEBGL);
colorMode(HSB, 255);
background(10);
}
function draw() {
background(10);
orbitControl();
if (flip == 1) scale(1, -1);
if (spin == 1) rotateX(frameCount/60);
translate(-width/2+55, -height/2+55);
hu = 0;
for (let u = 0; u < 9; u++){
for (let t = 0; t < 12; t++){
fill(hu%255, 255, 255)
push();
rotateX(PI/2);
rotateY(-frameCount/20);
cylinder(51,200);
pop();
translate(100, 0);
hu+=2.4;
}
translate(-width-88, 100);
}
}
function keyPressed(){
if (key == 's'){
save("img_" + month() + '-' + day() + '_' + hour() + '-' + minute() + '-' + second() + ".jpg");
}
if (key == 'r'){
spin = 1 - spin;
}
}