This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Alexander Artsvuni
Posted Feb 13 - Read on Facebook

Question: if layer has 3 animation states set, is it possible to set layer.states.animationOptions individually for each of the states?

So far it seems that its a global setting for the layer.

Im new to framer and programming, so apologise if the question is not valid ))


Joshua Tucker

Hey Alexander! You're correct in that the animationOptions applies for all the states. You can't set them individually.

However, before calling a state, you can do the following:

layer.states.animationOptions.curve = whatever

Alexander Artsvuni

Joshua Tucker thanks a lot! Works!

Joshua Tucker

Alexander! I have an update on this. I didn't realize you could set curves like this when calling states until today. Saves you one line of code from what I told you. Go Ryhan Hassan! Check out the post (the comment is shown after you click the link)

Wanted to make sure you got the most up-to-date info. Hopefully this works well for you.

Alexander Artsvuni

Dude your a legend! This really saved me much more then one line of code, i was fiddling with quite complex animation, but now the code is so much more cleaner and readable. Really appreciate this.

Joshua Tucker

Right on, glad it worked out! If you are able to share your work with us one day, I would love to see it! Keep up the good work mate.

Alexander Artsvuni

I defiantly will share this prototype when its done.

Read the entire post on Facebook