Live data from Hacker News

Rotate the world

jasondavies.com

21–30 of 74 posts

Re: Rotate the world

#21

This is just my personal preference, but I believe the naive implementation is miles ahead of the improved ones. The improved version needs at least two movements to go to the other side of the world, doesn't follow the rotation if the cursor is too fast and worse than all, performs a gamma rotation for each non-equatorial point of the sphere. Since we have two degrees of freedom on the screen, I expect to use them t…

Agreed. You could slightly improve the naive implementation by restricting the north-south rotation so you can't go beyond either pole, so north always stays up. It's not just for the Earth either, I'm now working on a 3D object editor and decided on the naive implementation there as well, because when you're sculpting a chair, it's annoying if up doesn't stay up.

Re: Rotate the world

#23
post #12

Isn't this also called "Arcball rotation"? The biggest advantage over the naïve implementation is no un-intuitive "sideways" rotation after a few sequences of rotation.

I've heard "trackball rotation" but yep, you're spot on.

To give an example, rotate both the unimproved and improved globes so you're facing Antarctica dead on. Then try dragging left and right. The improved is far more intuitive to me at this point.

Re: Rotate the world

#24

Firefox you're breaking my heart. This performs terribly in FF, fine in Chrome.

As an experiment, I'm testing FF for a week, and a friend is testing chrome, this definitely goes in the against list.

Re: Rotate the world

#27

I have a couple of questions, and I'm unfamiliar with the Javascript frameworks so I struggle a bit to find the answers in the source: Are the globes drawn with perspective? And can it suffer from gimbal lock?

The globes are projected orthographically. There is no perspective.

Re: Rotate the world

#28

I have a couple of questions, and I'm unfamiliar with the Javascript frameworks so I struggle a bit to find the answers in the source: Are the globes drawn with perspective? And can it suffer from gimbal lock?

The globes are projected orthographically. There is no perspective.

Cheat! What I thought :(

Re: Rotate the world

#29

Firefox you're breaking my heart. This performs terribly in FF, fine in Chrome.

It could be that his logic optimizes for chrome. I'm sure with a bit more time, he could make it work smoothly in FF... Or fuck it, just write it in ASM, which would be insanely faster.

Re: Rotate the world

#30
post #24

Firefox you're breaking my heart. This performs terribly in FF, fine in Chrome.

As an experiment, I'm testing FF for a week, and a friend is testing chrome, this definitely goes in the against list.

Up until a couple of weeks ago I was a loyal Chrome advocate. However after the Mozilla team's recent AMA on reddit I decided to switch and since then I really haven't found Firefox inferior at all (aside from a couple of examples like this). So for anyone else looking to make the switch, go for it! The only thing I'm missing about Chrome are the excellent dev tools.
Post reply on HN