My experiment involves using the anime.js framework to create a simulation of leaves falling from a tree. The animation triggers when the user scrolls to the top of the page. However, I am facing an issue where the animation only plays once; if the user scrolls down and then back up, the animation does not restart. This problem could stem from my anime code or JavaScript implementation.
To visualize this scenario more effectively, please run the snippet below:
// Your custom JavaScript code here...
/* Your custom CSS styles here... */