text: /* 
  6.7 p5.js clicking on objects
  Code for video https://vimeo.com/channels/learningp5js/141919520
  */
  
  var bubbles = [];
  
  function setup() {
    createCanvas(600, 400);
    for (var i = 0; i < 10; i++) {
      var x = random(width);
      var y = random(height);
      bubbles.push(new Bubble(x, y));
    }
  }
  
  function mousePressed() {
    for (var i = 0; i < bubbles.length; i++) {
      bubbles[i].clicked();
    }
  }
  
  function draw() {
    background(0);
    for (var i = 0; i < bubbles.length; i++) {
      bubbles[i].move();
      bubbles[i].display();
    }
  }