Stary Sky Glitters
WORTH THE WAIT!!!!
same as stary sky but with colourful stars.
just do CTRL+R after putting the sketch to full screen to enjoy.
for anyone interested in the p5.js code
Here:
var star = [{x:10,y:10,s:3,col:200,col2:200,col3:200,dim:200}]
function setup() {createCanvas(windowWidth,windowHeight);background(0);}
function draw() {background(0);starySky(400);}
function starySky(numStars){if(star.length<numStars){for(var j=0;j<numStars;j++){star.push({x:10,y:10,s:3,col:200,col2:200,col3:200,dim:200});}}for(var i=0;i<star.length;i++) {fill(star[i].col,star[i].col2,star[i].col3,star[i].dim);ellipse(star[i].x,star[i].y,star[i].s);if(random(0,1)<0.1){star[i].col = random(0,255);star[i].col2 = random(0,255);star[i].col3 = random(0,255);star[i].dim -= 1;star[i].s = random(1,4);}if(star[i].dim==0){star[i].x = random(0,width);star[i].y = random(0,height);star[i].dim = 200;}}}
Leave a comment
Log in with itch.io to leave a comment.