Skip to content
Advertisement

How could I optimize this js animation?

I’ve been trying to build this animation with three palm leaves gently swaying as a background for a website, but it needs to run as smoothly as possible without messing with the page loading time too much. I’m pretty new to js so the code I’ve got at the moment is probably not optimal,

Therefore I am asking if I could get some suggestions on how I could optimize the code to make it run better and faster. What do you think?

this is the code right now

JavaScript

Advertisement

Answer

does this work? i cant even test it

JavaScript

start you class names from 0

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement