

Google Gravity experiment - ericthegoodking
http://www.mrdoob.com/projects/chromeexperiments/google-gravity/
Google Gravity Experiment , check it out.
======
peterjmag
I was showing this to a friend a couple of years ago when we accidentally
discovered, to our delight, that it's orientation-aware. If you're using
Chrome on a Mac laptop, try tilting your machine to see how it affects the
elements on screen. (Theoretically, it should also work on most iOS devices
and other laptops with motion sensors, but I haven't really tested it
extensively.)

Prior to that discovery, I had no idea that a non-mobile browser could access
motion sensor data. Turns out that on a MBP at least, the data comes from the
Sudden Motion Sensor[1], which is also responsible for parking disk drive
heads if you drop your laptop. Pretty cool stuff.

[1]
[https://en.wikipedia.org/wiki/Sudden_Motion_Sensor](https://en.wikipedia.org/wiki/Sudden_Motion_Sensor)

A couple more links for the curious:

[http://www.html5rocks.com/en/tutorials/device/orientation/](http://www.html5rocks.com/en/tutorials/device/orientation/)

[https://developer.mozilla.org/en-
US/docs/WebAPI/Detecting_de...](https://developer.mozilla.org/en-
US/docs/WebAPI/Detecting_device_orientation)

EDIT: Almost forgot, but I actually created a little drawing experiment based
on this:
[http://peterjmags.com/accelosketch/](http://peterjmags.com/accelosketch/).
Try clicking around and tilting your laptop to draw.

~~~
dekhn
iOS didn't always expose device orientation events in javascript browser. In
particular, one of the first apps I wrote, for iPhone 3GS, specifically could
not be a browser app for this reason.

Objective C is a hell of a programming language to learn just to access motion
sensors.

~~~
zackmorris
And for anything else devices do that could have been done in a browser..

Nothing like that sinking feeling in the pit of your stomach when you realize
you have yet another memory leak, zombie object or mysterious exception in the
main run loop to debug!

------
quarterto
Interesting to see this posted here. It's a Chrome experiment almost as old as
Chrome itself.

~~~
dekhn
And in many ways, i think it demonstrates that the idea of using physics
engines to manipulate the DOM is still pretty cool, and underutilized.

~~~
tinco
Pretty cool? Yes. Under utilized? I know of one page on the web that does it,
this one, and I think that's more than enough :)

~~~
moocowduckquack
Using physics in interfaces gives naturalistic motions right out of the box,
you get nice animation curves for free essentially. Of course if you want flat
pages, then this doesn't matter, and I do agree with providing flat versions
of useful stuff, but if you want something that has a good feel for any gui
animation, then integrating physics makes a lot of sense. Not so that you
notice it, but rather so that you don't.

~~~
techdragon
Even with flat UI. The motion of natural 'objects' is very much wired into us.
If you have elements moving in a 2D plane, their motion is typically perceived
as more 'pleasing' when they obey physics often at a subconscious level. Its a
bit like the golden ratio.

~~~
moocowduckquack
Sorry, by flat I was meaning basic unanimated pages, not just 2d. I should
have been more clear.

------
brokentone
Fun little project. However--I'm now slightly concerned that websites have
access to accelerometer data without any kind of privacy prompt? There must be
a browser setting here somewhere, but again, would love to have different
settings by default.

~~~
lukedjn
I'm curious, why would the accelerometer invade your privacy? Is there a
significant difference between your mouse or keyboard and the accelerometer?

~~~
hippish
Fingerprinting devices for one
[http://blog.sfgate.com/techchron/2013/10/10/stanford-
researc...](http://blog.sfgate.com/techchron/2013/10/10/stanford-researchers-
discover-alarming-method-for-phone-tracking-fingerprinting-through-sensor-
flaws/)

~~~
mistercow
I wonder how many bits of entropy that fingerprint has, though. 8 bits would
make for an impressive and scary looking demo, for example, but for ad
tracking it would be useless.

~~~
maaku
I don't think ad tracking is the scary application...

~~~
mistercow
That's a good point, and p = 1/256 is definitely good enough to convince a
judge or jury.

------
blueblob
Maybe I am missing something, but why is this interesting? Is it because you
copied the source from the google homepage and didn't change the links?

~~~
AndreasFrom
Do you have JS enabled? The whole page falls down when interacting with it.
The physics are quite nice actually and you can toss the elements around.

~~~
blueblob
I have javascript enabled but I use a firefox plugin called ghostery and
didn't realize that I needed to disable it.

~~~
mikro2nd
Funny... I have ghostery, noscript (with some whitelisting) and a bunch of
other plugins but it worked just fine for me. Something else than ghostery,
perhaps?

~~~
ksrm
I only had to turn ghostery off for it to start working.

------
ogig
This is old, still mrdoob's site is always worth checking out.
[http://www.mrdoob.com/](http://www.mrdoob.com/)

------
ozh
Old stuff, but cool because it uses Google's legacy UI that _didn 't use to
suck ass as it does today_

~~~
scott_s
Funny, I hated that black bar. I think the current one is much more in spirit
with what they were before its introduction.

------
loopasam
I did a similar thing a while ago (inspired from this experiment) on the
website of the institute where I'm working at:
[http://loopasam.github.io/experiments/ebi-
gravity/](http://loopasam.github.io/experiments/ebi-gravity/)

------
franze
same, same but different
[https://github.com/franzenzenhofer/box2d-jquery](https://github.com/franzenzenhofer/box2d-jquery)

(we are currently reviving the project, i.e.: added collision events, other
stuff to follow)

------
DonGateley
Many years ago when X-Window was in its youth there was a smart little program
that made it possible to do that to the screen of anyone else that was
connected by network. Try to imagine the first time your working screen simply
falls to pieces and melts. :-)

------
platz
Reminds of this wonderful study in usability:
[http://dl.dropboxusercontent.com/u/25059665/CustomerForm.htm...](http://dl.dropboxusercontent.com/u/25059665/CustomerForm.html)

------
denisnazarov
I think seeing this is what originally got me into web development.

------
patrickaljord
This is a few years old. Still cool though.

