xxxxxxxxxx
/*
Glitch FX
By: Jusitn Johnson
Source Image: helen-3.jpg
Expansion 1 -- UPDATED: January 4th, 2019
With 2 new effects: scanner and noise
Expansion 2 -- UPDATED: January 13th, 2019
With new effect: jpg degradation
*/
var img;
var glitch;
function preload(){
img = loadImage('Helen-3.jpg');
}
function setup() {
createCanvas(windowWidth, windowHeight);
imageMode(CENTER);
glitch = new GlitchFX(img);
noLoop();
}
function draw() {
background(255);
image(glitch.getOutputImage(),width/2,height/2);
}
function keyTyped(){
glitch.mosh();
redraw();
}