// Cloned by Harpreet Singh on 5 Oct 2019 from World "Cube in a cube" by Harpreet Singh
// Please leave this clone trail here.
// Cloned by Harpreet Singh on 5 Oct 2019 from World "One Cube World (P5)" by Starter user
// Please leave this clone trail here.
let radiusx = 200;
let radiusy = 200;
let radiusz = 50;
let expand = true;
function expandcontract()
{
if (expand)
{
radiusz += 3.5;
if (radiusz>=300) expand = false;
}
else
{
radiusz -= 3.5;
if (radiusz<=50) expand = true;
}
}
function setup() // "setup" is called once at start of run
{
createCanvas ( ABWorld.fullwidth(), ABWorld.fullheight(), WEBGL );
}
function draw() // "draw" is called every timestep during run
{
background("navy");
ellipsoid(radiusx, radiusy, radiusz);
expandcontract();
}