How to make gradient follow path?

This problem has troubled me for a long time.
Do you have any good implementation ideas?
Whether it is canvas or webgl ?

Just use a texture with a gradient and suitable UV coordinates along the path. That’s all you need (at least in Three.js).

https://codepen.io/boytchev/full/GRPPvGm

image

2 Likes

great !!!

Thank you so much, unparalleled !

1 Like