简体   繁体   中英

Looking for a way to draw a line between two points on a sphere in Three.js

My app (a flight tracker) needs to draw a line between two points (cities say) on a sphere (earth) along the surface (ie 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.

您使用许多粒子来创建一种虚线。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM