THREE.LineBasicMaterial has a longstanding limitation: linewidth is ignored on most platforms and lines always render at 1px, because most browser WebGL implementations don’t support thick lines. The Line2 / LineGeometry / LineMaterial trio in three/addons/lines/ works around this — under the hood it doesn’t draw a thin line at all, it expands each segment into a flat, camera-facing quad (a billboard). That’s what produces genuinely thick lines.
Because of that trick, LineMaterial needs a resolution uniform (the viewport’s pixel size) to expand those quads to the correct thickness — so mat.resolution.set(innerWidth, innerHeight) must be called again on every resize. With worldUnits: false (the default), linewidth is fixed in CSS pixels; set it true and it becomes a 3D-space unit, so lines get visually thinner as the camera moves away.
The demo layers six Lissajous curves (x = sin(aθ), y = sin(bθ + phase)) with different a/b values, cycling color across them. geometry.setPositions(flatArray) and setColors(flatArray) load vertices and per-vertex colors in one shot, and vertexColors: true interpolates that color; line.computeLineDistances() precomputes the cumulative-distance data a dashed-line material would need.
When to use
Data art, generative brand patterns, or any diagram or trajectory in 3D space that needs a true line thickness.