visionforge icon indicating copy to clipboard operation
visionforge copied to clipboard

Update 3d line width on appropriate parameter change

Open altavir opened this issue 5 years ago • 3 comments

altavir avatar Jan 03 '20 08:01 altavir

It looks like the lines are always displayed as width 1 - "Due to limitations of the OpenGL Core Profile with the WebGL renderer on most platforms linewidth will always be 1 regardless of the set value." (https://threejs.org/docs/#api/en/materials/LineBasicMaterial.linewidth).

So shall we draw cylinders instead of lines?

pklimai avatar Feb 22 '20 15:02 pklimai

There are several existing solutions like this one: https://github.com/spite/THREE.MeshLine/blob/master/README.md. The problem with cylinder is that unlike the line it will scale when moving camera, and it is not the behavior we want.

altavir avatar Feb 22 '20 15:02 altavir

Implemented separate ThreeMeshLineFactory and ThreeSmartLineFactory. The later chooses which implementation to use depending on the line thickness.

altavir avatar Aug 19 '22 08:08 altavir