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

What is Framer? Join the Community
Return to index
Josh Ackerman
Posted Jul 16 - Read on Facebook

Hello,
Has anyone achieved a floating/hover effect through animation? My current solution which does not work very well, is to animate the layer position with y: layer.y - (Utils.randomNumber(2, 8) * direction), where the direction cycles through [-1,1]. This results in layer moving up and down, although it is fairly choppy. My next idea is to move layer around a tiny circle at a possibly random speed. It would help me greatly to hear any other ideas.
Thanks.

2 Comments

Benjamin Den Boer

Hey Josh Ackerman - I was playing a bit with animating particles / randomizing animations a while back. Here's one of those experiments - it may prove to be useful. I've used Math.PI, Math.cos and Math.sin to animate them in different directions. Hope it helps a bit! :-)

See video: http://d.pr/v/1694n
Download: http://share.framerjs.com/51nexzsbqs6s/

Jordan Robert Dobson

Ooooh. Nice Benjamin Den Boer

Read the entire post on Facebook