function SineWaveGenerator()

in website/assets/header.js [17:41]


function SineWaveGenerator(options) {
  $.extend(this, options || {});

  if (!this.el) {
    throw "No Canvas Selected";
  }
  this.ctx = this.el.getContext('2d');

  if (!this.waves.length) {
    throw "No waves specified";
  }

  // Internal
  this._resizeWidth();
  window.addEventListener('resize', this._resizeWidth.bind(this));
  // User
  this.resizeEvent();
  window.addEventListener('resize', this.resizeEvent.bind(this));

  if (typeof this.initialize === 'function') {
    this.initialize.call(this);
  }
  // Start the magic
  this.loop();
}