adashabeta

ProximityEffect demo 5

*mouse required

’Twas brillig, and the slithy toves
Did gyre and gimble in the wabe:
All mimsy were the borogoves,
And the mome raths outgrabe.

let lines = document.querySelectorAll('*.line');
lines.forEach(line => WrapChars.wrap(line, 'letter', 'span'));


let params = {
    threshold: 40,
    distance:  20,
    attack:     0.6,
    decay:      0.6,
	jitter: 30
};

let els = document.querySelectorAll('*.line > *');
let fader = new ProximityEffect(els, params);
fader.addEffect('opacity', 1, 0.5);
fader.addEffect('scale',   1, 1.5);
fader.addEffect('blur',    0, 5);