xxxxxxxxxx
//New Store Link: https://joescodeart.etsy.com
/*
Hey Sableraph and Friends!
Hope you all enjoy this sketch of Intertwined!
To use the border I have on any of your sketches:
1) Click on the settings button at the top right of your sketch (it is an icon with 3 lines, and a dot on each line)
2) A new window will opn on the right side of the sketch. Click on the "SKETCH" tab on the window that opened.
3) For the "Mode" option choose "HTML/CSS/JS" in the same window, and you will then have 2 additional tabs on your sketch: "style.ss" and "index.html"
4) Copy the code from my "style.css" tab above, to your "style.css" tab that was created, and you should now have a frame around your sketch!
*/
let timer=0
function setup()
{
createCanvas(windowWidth, windowHeight,WEBGL);
background(100);
}
function draw()
{
rotateX(timer/90)
rotateY(timer/20)
rotateZ(timer/90)
timer++
for(x=-50;x<50;x++)//creates grid - X axis coordinates
{
for(y=-50;y<50;y++)//creates grid - Y axis coordinates
{
push()
for(z=0;z<10;z++)
{
translate(x*20,y*20,0)
}
if(timer%10==0 && timer<61) //creates spheres
{
if(x==0 & y==0) stroke(random(255),random(255),random(255),200)
else if(x==0 & y==1 & timer<30) stroke(random(255),random(255),random(255),200)
else if(x==0 & y==-1 & timer<30) stroke(random(255),random(255),random(255),200)
else stroke(0)
sphere(random(25))
}
else if(timer>=61 && timer<77) //creates touch of light at top right corner at end of sketch
{
stroke(random(255),20)
noFill()
translate(200,100,-500)
strokeWeight(.5)
for(i=0;i<3;i++)
{
rotateX(timer*4)
box(x*15,-900+x*15,10)
}
}
else if(timer<77) //creates giant circles/rings around the spheres
{
if(x==0&y==0) stroke(random(255),random(255),random(255),200)
else if(x==0 & y==1 & timer<30) stroke(random(255),random(255),random(255),200)
else if(x==0 & y==-1 & timer<30) stroke(random(255),random(255),random(255),200)
else stroke(0)
strokeWeight(.5);
noFill();
circle(0,0,200)
}
pop()
}
}
}