Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

GSAP HTML5 Banner that use Smartphone Accelerometer

Recommended Posts

Hi All,


Starting from 0 here.


My boss has asked if a GSAP HTML5 Banner that use Smartphone Accelerometer is possible.


The idea would be that i multilayered image with a foreground, mid-ground and background would 'move' with the tilt on a smartphone.


Can anyone point me in the right direction?


Thanks for any help,



Link to comment
Share on other sites

I've never done it personally, but it seems totally doable. It's unrelated to GSAP, though. A quick Google search resulted in:



With the right hooks in place, you should be able to create the effect you're after. Let us know how it goes. We'd love to see the final result (and hear about any tips and tricks you discover along the way)

  • Like 1
Link to comment
Share on other sites

Here are some other useful links that might help. It's just setting up the right events to detect and have your animation with GSAP do different stuff depending on the orientation and rotation.


Detecting Device Orientation:



Google HTML5 Rocks - This End Up: Using Device Orientation:



Device Motion Demo (test on mobile):




  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.