var entries = [];
// Create an animation for each entry.
Array.prototype.forEach.call(document.querySelector('.entry'), function(elem, i) {
// Create an instance for the current element in an array.
// We start the animation later using the instances from the array.
entries.push(basicScroll.create({
elem: elem,
from: 'top-bottom',
to: '100px',
props: {
'--ty': {
from: '300px',
to: '0',
direct: true
}
}
}));
});
entries.forEach(function (entry) {
return entry.start();
})
Comments