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

What is Framer? Join the Community
Return to index
Gregory Dean Hall
Posted Nov 26 - Read on Facebook

Is it possible to have multiple layers in an animation function? Only the last one works!

14 Comments

Andrew Nalband

I don't believe so - one animation per layer as far as I can tell and then you can call all three in your click event

Gregory Dean Hall

okay and to reverse all these animations?

Andrew Nalband

Gregory Dean Hall the docs are your friend: http://framerjs.com/docs/#animation.reverse

Gregory Dean Hall

yeah but if i have a stack of layers then reverse animation wont work. Probably have to create an array of a different states

Nathan Krischer

You can't pass an object literal with three keys all called 'layer' all keys in an object literal must be unique

Gregory Dean Hall

okay so should rename them them. Ill try it

Nathan Krischer

I doubt that will work because I don't think that function will be expecting whatever you name them. It's probably expecting an object with a layer and a properties key, nothing more.

Gregory Dean Hall

okay

Gregory Dean Hall

it seems like bad practise for m to make all those animations and then manually reverse them

Gregory Dean Hall

thanks

Hoffer Gábor

Why not make a function and put 3 separate animations in and call the function instead playing the animation...

Stephen Crowley

Isaac Weinhausen can you link to your module? I'm away from my computer atm

Isaac Weinhausen

Check out these modules. I wrote them to handle multiple animations concurrently and sequentially. I haven't implemented reverse() yet, but it's on the backlog.
https://github.com/isaacw/framer-animation-collections

Jordan Robert Dobson

#framercode

Read the entire post on Facebook