rantern_array01_notfor_lightX

In this example below you will see how to do a rantern_array01_notfor_lightX with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by ayakooo, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright ayakooo ©
  • HTML
  • CSS
  • JavaScript
    <script src="//cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.7/p5.min.js"></script>

/*Downloaded from https://www.codeseek.co/ayakooo/rantern_array01_notfor_lightx-xXGvmR */
    * {
  margin: 0;
  padding: 0;
}


/*Downloaded from https://www.codeseek.co/ayakooo/rantern_array01_notfor_lightx-xXGvmR */
    var lightX = [];

function preload() {
 // castleImage = loadImage("castle.png");
}

function setup() {
  createCanvas(windowWidth, windowHeight);
  imageMode(CENTER);
  noStroke();
  
  lightX[0] = random(0,width);
  lightX[1] = random(0,width);
  lightX[2] = random(0,width);
}

function draw() {
  background(0, 50);
 // image(castleImage, width / 2, height / 2);

    fill(255, 255, 0, 50);
  
    ellipse(lightX[0], 200, 50,50);
    ellipse(lightX[1], 200, 50,50);
    ellipse(lightX[2], 200, 50,50);  
  
}

Comments