rantern_array01_notfor

In this example below you will see how to do a rantern_array01_notfor 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-XebejR */
    * {
  margin: 0;
  padding: 0;
}


/*Downloaded from https://www.codeseek.co/ayakooo/rantern_array01_notfor-XebejR */
    var lightSize = [];

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

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

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

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

Comments