Is there a way to outline an arrow or line using the ArrowHelper or Line geometries within the Three.js framework?
While trying to achieve this, I encountered the issue that outlining a complex object or a line is not as straightforward as shown in this example by Stemkoski.
After some experimentation, I discovered a method for determining the bounding box minimums and maximums for both scenarios. This is how I obtained these parameters:
var edgeBoundingBox = new THREE.Box3().setFromObject(element);
For lines, I had to adjust the bounding box with some additional height and width to make it visible, as otherwise it would have 0 height and 0 width. Then, I utilized BoxGeometry to create the desired outline effect with a THREE.BackSide mesh.
However, the resulting outcome did not align correctly with the position and rotation of the original line/arrow element, requiring some workarounds to match them up. Are there any more efficient or cleaner methods to achieve this? Perhaps another technique that yields better results? Should I be retrieving the rotation and position information from a different source?