adashabeta

ProximityEffect demo 2

 

View/download project on GitHub.


// effect config
var params = {
    threshold: 60,
    distance:  60,
    attack: 0.6,
    decay:  0.6,
};


// add effects
fader.addEffect('translateZ', 200,   0);
fader.addEffect('blur',        10,   0);
fader.addEffect('saturate',   100,   0);
fader.addEffect('brightness', 100, 250);

fader.setCenterPoints(); //fix flow issue in some browsers