dixonandmoe / rellax

Lightweight, vanilla javascript parallax library
https://dixonandmoe.com/rellax/
MIT License
7.06k stars 878 forks source link

Animation transform before rellax #162

Closed Gustavolh7 closed 4 years ago

Gustavolh7 commented 5 years ago

Hi guys, I've encounter a problem in which I would like you to help me, I want to apply a parallax effect on certain elements but before that I've created and animation with tweenmax on those elements, I want them to apply that animation, which is a scale from 0 to 1, and then apply to those very same element the parallax effect.

The problem is that rellax kills my previous animation (tweenmax) and use the transform3d inline with it. How could I apply both transforms so they can't have issues between them?.

Gustavolh7 commented 5 years ago

No matter, I've found the solution, I apply a setTimeout for creating the rellax instance, so there could be time for the animation and afterwards create the rellax instance.