Friday, February 14, 2014

Tutorial Facebook's Paper photo tilt feature in HTML5

Do you want to share?

Do you like this story?

John Tregoning created a HTML5 clone of the photo tilt feature found in Facebook's Paper app.

One advantage that native currently has over the mobile web is that there is no way to stop the device from changing orientation (portrait/landscape) when tilting too much. There is an experimental feature: Screen.lockOrientation but currently only works in Firefox for web pages that are in full-screen mode.

Finally, here is a working demo. Make sure you test this on a device with a triaxial/accelerometer, like a phone/tablet, with orientation locked in portrait mode.


0 komentar:

Post a Comment