batchku
September 24, 2017, 2:28pm
1
Hello all,
I’m having some unexpected experience with THREE.line.
I’m trying to make a nice circle with a dashed line stroke.
I have two issues:
the linewidth
parameter doesn’t seem to have any effect
the circle looks ok on chrome on a computer, but not ok on chrome on my Pixel phone running Android 8
Here it is on laptop:
And here on mobile:
Any advice anyone?
Thank you,
Ali
looeee
September 25, 2017, 4:24am
2
From the docs for LineBasicMaterial :
Due to limitations in the ANGLE layer, with the WebGL renderer on Windows platforms linewidth will always be 1 regardless of the set value.
Not sure what’s happening on the phone though - what does VR mode mean? And does setting linewidth back to 1 make any difference?
Mugen87
September 25, 2017, 9:24am
3
Can you provide a fiddle that shows the bug? I’ve tested some line examples with my Pixel (Android 8) and found no problems.
thank you for your advice everyone.
the problem goes away if the linewidth is 1; this satisfies my present task, but i do wonder how i might be able to get thicker dahsed lines on mobile…
This PR might be interesting for you: https://github.com/mrdoob/three.js/pull/11349
The following article provides some background information:
Twitter: @mattdesl Drawing lines might not sound like rocket science, but it’s damn difficult to do well in OpenGL, particularly WebGL. Here I explore a few different techniques for 2D and 3D line rendering, and accompany each with a small canvas......
2 Likes