Creating two examples of drawing lines in three.js
was quite a fun challenge. One example showcased different geometry
and material
, while the other kept it simple with just one geometry
and material
. The demonstration links can be found here: Example 1 and Example 2.
In example 1, I enjoyed hovering over the lines to see the material color
change on mouseover. However, in example 2, the whole lineMesh
changed its color
when hovered since there was only one material
.
Now I'm intrigued by the thought of using just one geometry
like in example 2, but still achieving the distinct hover effect seen in example 1 with multiple LineSegment
pieces. Is this even possible?
An important consideration for me is that using multiple geometry
seems to slow down the browser significantly, especially when rendering large models with numerous members. As I plan to incorporate multiple three.js
models in different div elements on a page, I am concerned about the overall performance impact on the browser.