How to draw fading line towards the end

I stumbled upon this great Solar System view on the NASA website (https://solarsystem.nasa.gov/) and would like to ask if anyone has ideas about how to draw a line that fades away towards the end?

Here is a screenshot, I think the way the orbit lines are drawn is lovely.

On the website you can get to the simulation by clicking the “solar system” button on the navigation bar, at the top-right of the screen.

Hello!

it depends on how you write your lines but simply using a vertex color (that you fade towards the ends) could probably do it

Example of colored lines: Lines Examples | Babylon.js Playground (babylonjs.com)

5 Likes

Great suggestion, @Deltakosh. I totally forgot about the Alpha property and line colors :slight_smile:

Thanks!

1 Like