2

My app (a flight tracker) needs to draw a line between two points (cities say) on a sphere (earth) along the surface (i.e. the great circle route) using Three.js.

I can think of 2 ways - (a) creating Three.js 'Line' with a set of (enough) points that I calculate manually and (b) writing the lines into the texture I use for the sphere after it's loaded but before I apply it as a texture.

I can see problems with both (not even sure if (b) is possible in Three.js yet) - anyone think of a better way or have an opinion?

Thanks in advance.

2
  • 1
    b works. Load your image into a canvas element, paint line(s) and use the canvas as texture. Use texture.needsUpdate on updates. What's your problem with a ? Jun 10, 2012 at 19:38
  • Thank you all - apologies for late reply - I hoped the site would alert me when answers came in.
    – speedwell
    Jun 21, 2012 at 23:25

1 Answer 1

1

You use many particles to create a kind of dotted line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.