#include <psychlops.h>
using namespace Psychlops;

void psychlops_main() {
  Canvas cnvs(Canvas::window);

  Figures::ShaderGrating grating;
  grating.phase = 0;
  grating.contrast = 1;
  grating.wavelength = 50;
  grating.orientation = 2*PI/10.0;
  grating.set(500,1000).centering();


  while(!Keyboard::esc.pushed()) {
    cnvs.clear(Color::gray);
    grating.phase += 2*PI/60;
    grating.draw();
    cnvs.flip();
  }
}
