THREE.MeshLine icon indicating copy to clipboard operation
THREE.MeshLine copied to clipboard

flat lines restricted to a plane instead of billboarding

Open trusktr opened this issue 5 years ago • 3 comments

In some cases it'd be nice to restrict the faces of the line to remain parallel to a given plane instead of billboarding. Is this possible?

F.e., I'd like a line (with the same simplicity as MeshLine), that will be flat on the ground, so as I move the camera the line stays flat on the ground (the ground being a big flat brown plane for example, and the line being some other color).

trusktr avatar May 27 '20 23:05 trusktr

https://github.com/spite/THREE.MeshLine/blob/master/src/THREE.MeshLine.js#L441

If you change it to vec4 normal = vec4( -1., 0., 0., 1. ); you'll get your desired behavior.

tartavull avatar Oct 10 '20 22:10 tartavull

I think this is a duplicate of #49

I'm facing the same issue. Thanks for the tip @tartavull - I'll give that a shot.

nate-peters avatar Oct 14 '20 01:10 nate-peters

https://github.com/spite/THREE.MeshLine/blob/master/src/THREE.MeshLine.js#L441

If you change it to vec4 normal = vec4( -1., 0., 0., 1. ); you'll get your desired behavior.

this does not help @tartavull :/

vas4oo avatar May 19 '21 08:05 vas4oo