Is it possible to texture map a Line

I am using LineGeometry, LineMaterial to create a Line2 mesh object. I am currently using vertex colors. Is it possible to apply a texture to a Line2

For context:

Unfortunately, no. Wide lines do not support textures, see:

You can use Meshline to achieve that. It’s somewhat similar to Line2 but not in the core THREE. Note, however, that it’s lacking a bit behind because of lack of active maintainers. There is a branch here that works with Three 132.

With the method I used to build the road, you can also create thin lines with texture.

From the Collection of examples from discourse.threejs.org

CarRacing

Thanks for the helpful pointers guys,

Have you used this? I am trying to use the branch but none of the demos work.

Yes, I’m currently using this in a project. Made a dead simple example that shows a meshline with a texture here: https://turquoise-flossy-celery.glitch.me (remix here). It’s dead simple: just draws a meshline and applies a texture. But it shows that it works.

I finally got it to work. I had to edit the MeshLine code that had a bug handling BufferGeometry. I have it in my own branch now.

I also found it does not handle CanvasTexture properly. It does not recognize rotated UVs