I’m currently working with LineMeshes and I want to set a highlight behaviors on some lines. But it seems that it’s not possible to do it just with the highlightLayer.
My alternative solution is to create an invisible box that covers the line and to highlight it but maybe it’s too over engeneered so maybe there’s another way to do it.
@Evgeni_Popov
This works well when I have a full line but it does not seems to work with dashedLines
Since useVertexAlpha is not a parameter inside dashedLines constructor i changed it after the mesh creation but it doesn’t work, there’s probably a step that I miss.
Code-lines 26, 30, 34, 38, 47… all the linesMesh are pushed into an array called lines.
Line 49… I establish the glow layer, and line 52… I use a handy glowLayer custom-function feature called customEmissiveColorSelector. I think it runs every render-frame… and it can be used to determine which lines-mesh get which glow-colors (and thus, MAYBE it can determine which lines-mesh get NO glow-color [color set to null?], or maybe which get glowColor matching background color).
Note: Lines 68-70 are in-active in that custom func… unless you create/push one more lines-mesh.
Another note: Line 77 turns-on showBoundingBox for linesMesh #1. It also glows white, its default color, and forms the white box around linesMesh #1 (screen center). Notice there is no WHITE conditional in the customEmissiveColorSelector function. THIS glowLayer tries to glow-ify everything in the scene… unless you tell it NOT to.
I think we can prove that it runs every frame… by disabling/activating line 90. That will “rotate-shift” the lines array every 1/10 second.
GlowLayers are similar to highlightLayers… as far as alpha-blending/transparencies (what Evgeni and you are speaking-about). Get them too near-to half-transparent things, and they become unpredictable, depth-sorting-wise. I’m no expert. I just wanted to show you glowLayer’s customEmissiveColorSelector function… in case it was useful for you. Party on!
Comment about next post… EP, thx for checking dashed-lines… I should have done that so you didn’t have-to. Sorry. Well done.