old_contents: /*
   * @name Multiple Lights
   * @description All types of lights could be used in one sketch.
   */
  function setup(){
    createCanvas(710, 400, WEBGL);
  }
  
  function draw(){
    background(0);
  
    var locY = (mouseY / height - 0.5) * (-2);
    var locX = (mouseX / width - 0.5) * 2;
  
    ambientLight(50);
    directionalLight(200, 0, 0, 0.25, 0.25, 0.25);
    pointLight(0, 0, 200, locX, locY, 0);
    pointLight(200, 200, 0, -locX, -locY, 0);
  
    push();
    translate(-250, 0, 0);
    rotateZ(frameCount * 0.02);
    rotateX(frameCount * 0.02);
    specularMaterial(250);
    box(100, 100, 100);
    pop();
  
    translate(250, 0, 0);
    ambientMaterial(250);
    sphere(120, 64);
  }
new_contents: /*
   * @name Multiple Lights
   * @description All types of lights could be used in one sketch.
   */
  function setup() {
    createCanvas(710, 400, WEBGL);
  }
  
  function draw() {
    background(0);
  
    var locX = mouseX - height / 2;
    var locY = mouseY - width / 2;
  
    ambientLight(50);
    directionalLight(255, 0, 0, 0.25, 0.25, 0);
    pointLight(0, 0, 255, locX, locY, 250);
  
    push();
    translate(-width / 4, 0, 0);
    rotateZ(frameCount * 0.02);
    rotateX(frameCount * 0.02);
    specularMaterial(250);
    box(100, 100, 100);
    pop();
  
    translate(width / 4, 0, 0);
    ambientMaterial(250);
    sphere(120, 64);
  }
  
subject: update multiple lights example