Fat lines: Scaling very small segments?


#1

I’m trying to use the implementation from here:

I can’t seem to figure out how to scale very small segments?
My line segments are coming from geolocation and when converted to x,y the distances are very small
and i’d like to somehow scale everything as if i was looking at it from very close.
Should i do that from the shader itself? I thought i could just do line.scale.set(100, 100, 1) or something…

Here is an example:
https://jsfiddle.net/ogLq49rw/28/


#2

Hi!
Well. scaling works as expected.
line.scale.setScalar(1000);
https://jsfiddle.net/prisoner849/ps2tugab/
Maybe I’ve missed something from your question, could you put more clarification then? :slight_smile:


#3

but this way the entire line moved no?
I’d expect it to start on the positives xy and z=0 but just bigger overall.

Thanks!


#4

but just bigger overall.

Do you mean thicker / fatter? The thickness of the lines is defined in screen space, not world space. That is, it’s defined in terms of pixels on your screen rather than three.js units. So when you scale, you are scaling the parts that are defined in three.js units (start point, end point, etc.), but not the thickness.