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

What is Framer? Join the Community
Return to index
Giovanni Caruso
Posted Sep 13 - Read on Facebook

Hi! Trying to recreate a PageComponent with a parallax effect.
This is the code I came with:
page.content.on "change:x", ->
if page.content.draggable.direction is "right"
image.x = Utils.modulate(page.content.x, [0, 300], [288, 650], true)
else
image.x = Utils.modulate(page.content.x, [300, 0], [288, -100], true)

While it is ok when dragging to the right, I can't get the correct behaviour on the opposite. #headScratching

2 Comments

Jonas Treub

Here is an example I made a while back: http://share.framerjs.com/zutq0ego4907/

Giovanni Caruso

...easier than I've thought. Thanks!!!

Read the entire post on Facebook