There are two things:
- the shader material used by the line mesh does not support the “store effect on sub-mesh” option, so you should pass
false
to the 4ith parameter of theShaderMaterial
constructor - the
LineMesh
class expects the color to be aColor4
Here’s the corrected PG: