if (animation.delay !== undefined) {
to.delay = parseFloat(animation.delay);
}
- if (animation.type === 'scalefrom') {
+
+ if (animation.type === 'blurfrom') {
+ animation.type = "blur";
+ animation.from = 1;
+ }
+
+ if (animation.type === 'blur') {
+ let b = 'blur(' + animation.blur + 'px)';
+ let zero = 'blur(0px)';
+ if (css.filter === undefined) {
+ css.filter = '';
+ }
+
+ if (animation.from) {
+ css.filter += ' ' + b;
+ to.filter = zero;
+ } else {
+ css.filter = ' ' + b;
+ to.filter = b;
+ }
+ } else if (animation.type === 'scalefrom') {
to.display = 'block';
to.visibility = 'visible';
if (usegsap) {
to.duration = duration;
let anim = gsap.fromTo(animatedElement, from, to);
+ console.log(animatedElement, from, to, anim);
let anims = [];
if ($(link).data('gsap') !== undefined) {