Hi all. I'm trying to animate a layer from 90 degrees to 0 degrees. See the image in the attachments. Anyways I wrote the following script but can't seem to get it to work;
It only animates a little bit and after that the layer inside the animate function becomes some weird numbers like 268298.4.
The angle itself goes all the way from 90 to 0 perfectly.
Not sure why this is happening and would love to hear what I'm missing.
I'm not sure if this is the reason why but, It may be an issue with window.requestAnimationFrame()If you use Utils.interval instead it works (I just tried it).
here's a different way to do this using a proxy layer: https://framer.cloud/rCHNi
Fix: window.requestAnimationFrame(animate.bind(this, layer))
You can also animate the x and y values of a layer in separate layer.animate functions, each with different bezier curves. They'll run at the same time, creating whatever curve you'd like. https://framer.cloud/mdcQU