HTML compass madness!

So I wanted to do a compass from a while just to push it to some apps, mostly as a nice way of showing directions (e.g. "this way to the museum"). I thought that the hardest part would be to draw the needle, and translate North azimuth to object azimuth. Turned out I was wrong...

Update: There is now a more stable version of below code with additional library for mocking compass and PhoneGap support. See: WebCompass project.


Subscribe to JavaScript