me(onFrame);
    return false;
  });

  //
  // MOUSE UP HANDLER
  //

  elem.addEventListener('mouseup', function(e) {
    elem.classList.remove("activated");

    for (var i = 0; i < scope.waves.length; i++) {
      // Declare the next wave that has mouse down to be mouse'ed up.
      var wave = scope.waves[i];
      if (wave.isMouseDown) {
        wave.isMouseDown = false
        wave.mouseUpStart = now();
        wave.mouseDownStart = 0;
        wave.tUp = 0.0;
        break;
      }
    }
    return fa