adashabeta

ProximityEffect demo 1

*mouse required

Scale + brightness + jitter.

 

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: 60,
    runoff:    50,
    invert: true,
	jitter:   120,
    attack:     0.9,
    decay:      0.1,
    accuracy: 1
};

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

fader.addEffect('scale',      0.2, 1);
fader.addEffect('brightness', 0, 650);