dataarts / webgl-globe

WebGL Globe is a platform for visualizing latitude longitude based information using WebGL.
https://experiments.withgoogle.com/chrome/globe
Other
3.61k stars 1.16k forks source link

Keeping animated to true renders all markers flat #31

Open Orbyt opened 9 years ago

Orbyt commented 9 years ago

Keeping the animated field on true makes all markers render flat on the globe, eg, 0 magnitude. Setting the animated field to false causes the markers to render at their proper magnitudes.

for (i=0;i<data.length;i++) { globe.addData(data[i][1], {format: 'magnitude', name: data[i][0], animated: false}); }

Any ideas on why this is happening, and a fix?

mattslocum commented 9 years ago

If you are using animation you need to set the globe.time. That is what the main demo does when you mouse over the year. https://github.com/dataarts/webgl-globe/blob/master/globe/index.html#L145 They are using a tween, but you could simply do globe.time = 0 or 1 or something in between.