I can add the outline effect to a mesh object , but it not works on a line, why?
OutlinePass
does not support points and lines because its implementation is only compatible with triangles. Related GitHub issue:
opened 03:18PM - 28 Sep 20 UTC
closed 02:21PM - 05 Oct 20 UTC
Bug
Examples
**Describe the bug**
When having at least one object in the outline pass sele… ctedObjects array and a scene that also has a points object, the outline pass gets rendered in the middle of the points. This does not happen in desktop chrome in windows nor could I reproduce it in a new iPad or iPhone. It does happen in all of the Android Chromes that I have tested and also on an iMac (tested by @Mugen87 ).
**To Reproduce**
Steps to reproduce the behavior:
1. Create a simple object and add it to the scene
2. Create a points cloud and add it to the scene
3. Add effect composer, render pass, and outline pass
4. Add the simple object to the outline selectedObjects array
5. Make the particles move a little to make the bug appear more clearly
6. Render the scene with the composer
***Live example***
* [jsfiddle-latest-release](https://jsfiddle.net/Norppa/04t6rjoh/3/show)
**Expected behavior**
I would expect the outline pass artefact not to show up on points on any of the platforms and browsers.
**Screenshots**

**Platform:**
- Device: mobile and desktop (iMac)
- OS: Android (could not reproduce this on iOS)
- Browser: Chrome (not Windows desktop)
- Three.js version: r120 (latest at this point)
So if I want to add the selected status of lines, are there any alternative methods ?
Have you considered to implement the highlight by using vertex colors?
You need to work with line segments though. If so, you can change the vertex colors of the specific start and end vertices of the selected line segment.