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

What is Framer? Join the Community
Return to index
Julius Gehrig
Posted May 15 - Read on Facebook

Is there a way to access the gyroscope somehow with framer? Trying to recreate some origami compositions like the photo panning in Facebook paper with framer.
Thanks in advance!

12 Comments

Julius Gehrig

Dexter Wang It does! Thanks :)

Callil Capuozzo

I have fixed up this code for framer 3 - I can post it here. ok with you Cemre Güngör ?

Joshua Tucker

Hey Julius! Cemre Güngör's post is a great start (thanks for that Cemre). I took a screenshot of the code editor in Framer Studio so I could highlight for you how I use the two types of "device orientation/motion" events.

Please check out the actual documentation for both events because it has a LOT of great stuff to learn. Especially with devicemotionevents, because you can incorporate gravity or not (in this case, I showed acceleration.x versus accelerationIncludingGravity.x). You can obviously name variables and pass them however you desire but this is just a basic layout.

I also not too long ago posted how I was able to design a menu that could change position based on whether someone was using their left or right hand. That utilizes motion/gyro so if you wish to look into that, it's available here: http://cl.ly/ZOJa (one of the first projects I ever released with FramerJS so it's not super perfect but I'm available for questions anytime).

Julius Gehrig

Wow thanks Joshua! I'll contact you if I have any further questions! :)

Jordan Robert Dobson

Nice to see how that's progressing Joshua!

Joshua Tucker

Haha Jordan - unrelated to modules. I had this working without them :).

Jordan Robert Dobson

We'll get there! I want to test it out soon.

Joshua Tucker

Jordan Robert Dobson Me too.

Danny White

Hey Callil Capuozzo, any chance you could share that updated code?

Callil Capuozzo

Danny White http://share.framerjs.com/vc22kpsoco7u/
here's the demo project I put together. Basic functionality is there, and when you're not on a mobile device it simulates the movement with your mouse. This is really just a direct port and I think a module for this would be awesome!

Danny White

Thanks!

Read the entire post on Facebook