
Device Orientation in HTML5 (tilt your computer if you have a MacBook & Chrome) - pud
http://slides.html5rocks.com/#slide-orientation
======
asadotzler
The last three versions of Firefox have supported the W3C device orientation
spec. Before that, and going all the way back to Firefox 3.5 more than two
years ago, Firefox supported a vendor prefixed version.

------
mp3geek
Pity the developer didn't include -moz extensions, given the use of -webkit
extensions you'd think he doesnt care about anything but Webkit.

~~~
mgcross
Yeah, it's a couple years old now:
<http://news.ycombinator.com/item?id=1272481> At this point, much of the CSS3
demonstrated wouldn't require a vendor prefix at all.

------
zobzu
About 50% of the things on this page aren't HTML5, but chrome-only features.

Bleh for standardization, really.

~~~
nkassis
If you are building something for wide market use then definitively don't use
these new features until they are supported by multiple vendors. But before
standardization can happen things have to be tried out, I don't see what all
the negativity is about when it comes to new features in chrome (I don't get
the same vibe with Firefox only features).

It's better, in my opinion, to have a working prototype of a feature working
and used by some early adopters than to build standards in a vacum.

Those early adopters need to know those features my disappear or the apis
change and be ready to fix their code.

~~~
gcp
The API they use _was_ standardized, and supported by multiple browsers since
long. The page is written to only work in WebKit browsers.

There is no need or sense in defending this behavior. It's bad, and
shortsighted.

------
ComputerGuru
Or an IBM/Lenovo ThinkPad.

They all (ingeniously) use the sudden-drop detection that prevents hard drive
head crashes to double as an accelerometer.

~~~
terinjokes
Many years ago, 2006, I was using the sudden-drop detection in my iBook G4 to
know when people were walking down the hallway to my office.

~~~
reledi
Wouldn't you get false positives every time you typed?

~~~
terinjokes
Yes, but due to how the structure was (poorly? likely…) constructed, the
movement caused by someone walking down the hall was much larger than me
typing.

------
daniel_iversen
it would be cool if GMail and other data sensitive web applications used these
APIs so that it would log you out of the web service if your computer had a
lot of motion (e.g. someone running away with it).

~~~
ntkachov
Interesting idea but it would make gmail impossible to use on a train or bus.

~~~
zobzu
true :D

~~~
daniel_iversen
correct, back to the drawing board! :)

------
potch
wrote a labyrinth demo back in the day to demo the Firefox-prefixed version of
the API. I've updated it here: <http://potch.me/labyrinth/>

------
jurre
doesn't seem to work on my 2011 air

~~~
AdamGibbins
Nor mine, I suspect its because the accelerometer is designed to halt the disk
if it detects sudden movement. There is no hard disk in the airs thus it has
no need for an accelerometer.

------
shalmanese
I'm still waiting for someone to build a popular whack based interface based
on this data. I'd love a photo album where I would tap the side of my screen
to advance to the next/previous photo.

~~~
PAPPP
The hdaps Linux kernel driver for Thinkpads' sensors (don't know about the
other flavors) can export the data as a joydev, which can be mapped
arbitrarily - I've tried things like desktop switching by hard taps to either
side of the keyboard, but it's more of a neat gimmick than a useful
interaction mode. Some (severely out of date) scripts here:
<http://www.thinkwiki.org/wiki/HDAPS> (no HTML in comments?)

------
nostromo
It seems to only react to two axes (beta and gamma -- in other words, if I
rotate my MBP on a flat surface, nothing happens) -- is anyone on a device
that provides alpha as well? I know the iPhone does, but this demo doesn't
seem to work in Mobile Safari.

~~~
cmelbye
Doesn't that require a gyroscope? Most devices that would work with this only
have accelerometers.

------
taylorbuley
No JS required w/CSS media query, e.g. @media only screen and (orientation:
landscape) {...}

