# \[SOLVED\] Line dashed material

**URL:** <https://discourse.threejs.org/t/solved-line-dashed-material/4686>\
**Category:** Questions\
**Tags:** lines\
**Created:** [October 26, 2018, 12:05pm UTC](https://discourse.threejs.org/t/solved-line-dashed-material/4686 "2018-10-26T12:05:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![user123](https://avatars.discourse-cdn.com/v4/letter/u/ed655f/32.png) [@user123](https://discourse.threejs.org/u/user123)\
**Post date:** [October 26, 2018, 12:05pm UTC](https://discourse.threejs.org/t/solved-line-dashed-material/4686/1 "2018-10-26T12:05:19Z")

</div>

im trying to get a dashed line, but failing miserably, [heres a fiddl](https://jsfiddle.net/f2Lommf5/15528/)e, what am i missing?!

interestigly if i look at old posts like this [one](([LineDashedMaterial does not work](https://discourse.threejs.org/t/linedashedmaterial-does-not-work/1640) ) they too are not showing dashed lines when presumably they where?

clearly im being thick, any suggestions would be appriciated.

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [October 26, 2018, 12:35pm UTC](https://discourse.threejs.org/t/solved-line-dashed-material/4686/2 "2018-10-26T12:35:05Z")

</div>

Hi!  
You have to do it this way now:

`line.computeLineDistances();`

Call it on a line object (`THREE.Line()`), not on its geometry.

---

<div class="post-metadata">

**Author:** ![user123](https://avatars.discourse-cdn.com/v4/letter/u/ed655f/32.png) [@user123](https://discourse.threejs.org/u/user123)\
**Post date:** [October 26, 2018, 1:37pm UTC](https://discourse.threejs.org/t/solved-line-dashed-material/4686/3 "2018-10-26T13:37:47Z")

</div>

Great many thanks.

To avoid having to ask things like that again, how would one know this has changed? Where should I have looked to realise this? I would have thought it would be menionted on the linedashmaterial docs

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [October 26, 2018, 1:41pm UTC](https://discourse.threejs.org/t/solved-line-dashed-material/4686/4 "2018-10-26T13:41:09Z")

</div>

You can always rely on the official examples 🙂  
[https://threejs.org/examples/#webgl\_lines\_dashed](https://threejs.org/examples/#webgl_lines_dashed)  
But you’re right, it should be mentioned in the `THREE.LineDashedMaterial()` that the method `.computeLineDistances()` has to be called on `THREE.Line()` (or another related) object.
