Hacker News new | past | comments | ask | show | jobs | submit login
Google Gravity experiment (mrdoob.com)
84 points by ericthegoodking on Oct 14, 2013 | hide | past | favorite | 41 comments

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

A couple more links for the curious:



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

It's also 'window speed aware', if you move/shake the browser window you will notice it.

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.

Yep, looks like it wasn't introduced until iOS 4.2: http://www.sitepoint.com/websockets-and-deviceorientation-su...

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!

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

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.

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 :)

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.

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.

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

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.

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

Apart from fingerprinting that has already been mentioned, a relevant article: “ACCessory: Password Inference using Accelerometers on Smartphones” http://www.hotmobile.org/2012/papers/HotMobile12-final42.pdf

“We show that accelerometer readings are a powerful side channel that can be used to extract entire sequences of entered text on a smart- phone touchscreen keyboard.”

Pending research to the contrary, I would assume that what is typed on the keyboard of a laptop can be recovered through the accelerometer by an application running in the background.

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.

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

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

Using a privacy prompt for access to any sort of sensor seems like a reasonable policy to me, keyboard/mouse/touchscreen excluded.

It's not unthinkable that accelerometer data might reveal more information about a user than cursor motion and keyboard input. Home layout, restroom/kitchen/etc. habits, body type, chair type, and even the squishiness of one's clothing could conceivably be determined.

Is this -currently- the case? Highly unlikely. But will someone seek to profit from these data in the future? Probably.

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?

I imagine you are missing something, yes: http://imgur.com/JO4T1PN.

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.

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

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?

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

Ah, that was it for me too. Thanks!

I've got JS enabled and it doesn't work for me. Neither search itself, nor special effects. (FF 23.0)

Make sure none of your extensions are blocking the Google AJAX Search API

It's called a "Chrome Experiment" for a reason.

It's in the url only :(

Working for me on FF 24.0

This is old, still mrdoob's site is always worth checking out. http://www.mrdoob.com/

Old stuff, but cool because it uses Google's legacy UI that didn't use to suck ass as it does today

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

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/

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. :-)

same, same but different https://github.com/franzenzenhofer/box2d-jquery

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

Reminds of this wonderful study in usability: http://dl.dropboxusercontent.com/u/25059665/CustomerForm.htm...

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

This is a few years old. Still cool though.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact