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

What is Framer? Join the Community
Return to index
Noah Tsutsui
Posted Aug 06 - Read on Facebook

How do I add a shadow property during an animation? This doesn't seem to work.

mySquare.on Events.Click, ->
mySquare.animate
properties:
shadowX: 10
shadowY: 10
shadowSpread: 10
shadowBlur: 40
shadowColor: "#000000"
scale: 2
borderRadius: 10

4 Comments

Noah Levin

You need to have initialized a shadow on that layer to begin with so it can animate from something. So just set a shadow to 0 before the click event then give it a shot.

There should be some good examples in framerjs.com/examples for this too if you get stuck. Good luck dude!

Noah Tsutsui

thanks dude.

Noah Tsutsui

"x property not initialized" errors would be cool.

Noah Levin

I think shadows are the only property that need this -- and I think because they are expensive to draw even when set to 0 for every layer when they don't all need them. Framer should detect if you are trying to animate a layer with it though and just initialize it for you. Cc/ Koen

Read the entire post on Facebook