adashabeta

ProximityEffect demo 4

*mouse required

translateZ + blur.

 

var t = document.querySelector('#sampleelement');
var n = t.removeChild(t.querySelector('*.childelement'));

for(var i=0; i<10; i++)
{
	for(var j=0; j<10; j++)
	{
		t.appendChild(n.cloneNode());
	}
}

var params = {
    threshold: 80,
    runoff:    20,
    attack:     0.4,
    decay:      0.4,
};

var fader = new ProximityEffect(document.querySelectorAll('*.childelement'), params);

fader.addEffect('translateZ', 0, 1000);
fader.addEffect('blur',       0,   20);