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

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

[EDITED]

Hello.
This is my fourth day on FramerJS and Javascript.
I'm trying to understand better programming just for prototyping some interaction's ideas.

Today i'm working on simple open/close interaction.

Any suggestions for improve my code?
Thanks

4 Comments

Sabato Urciuoli

This is the code:

PSD = Framer.Importer.load "imported/menu"
curve1 = "spring(400,60,0)"
curve2 = "spring(400,80,0)"

Open = PSD.open
Base = PSD.base

Open.on Events.Click, ->
Base.animate
properties:
y: 500
curve: curve1

Open.on Events.Click, ->
Open.animate
properties:
rotationZ: 45
curve: curve2

Open.on Events.Click, ->
Open.animate
properties:
rotationZ: 0
curve: curve1

Open.on Events.Click, ->
Base.animate
properties:
y: 0
curve: curve2

Ed Chao

I think people may have trouble seeing your prototype, you may want to put your project in a dropbox public folder and share the link. thats the easiest way to share :)

Koen Bok

Or just zip your project.

Min-Sang Choi

sharing on codepen wouldn't be a bad option. keep it up!

Read the entire post on Facebook