# Linesegment line position

**URL:** <https://discourse.threejs.org/t/linesegment-line-position/6449>\
**Category:** Questions\
**Tags:** lines\
**Created:** [March 7, 2019, 3:10pm UTC](https://discourse.threejs.org/t/linesegment-line-position/6449 "2019-03-07T15:10:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ghostff](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@Ghostff](https://discourse.threejs.org/u/Ghostff)\
**Post date:** [March 7, 2019, 3:10pm UTC](https://discourse.threejs.org/t/linesegment-line-position/6449/1 "2019-03-07T15:10:18Z")

</div>

Hi, I have a `LineSegments` created with `BufferGeometry` with attributes `color` and `position`. I what to get the Vector3 position of each vertices for label.

Am trying not to make this an xy question but i want to get all the lines in the `LineSegments` and label them.

---

<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:** [March 7, 2019, 3:12pm UTC](https://discourse.threejs.org/t/linesegment-line-position/6449/2 "2019-03-07T15:12:58Z")

</div>

Hi!  
Could you provide more details on what you want to achieve? Explanatory pictures?  
And a live code example, of course.

---

<div class="post-metadata">

**Author:** ![Ghostff](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@Ghostff](https://discourse.threejs.org/u/Ghostff)\
**Post date:** [March 7, 2019, 3:22pm UTC](https://discourse.threejs.org/t/linesegment-line-position/6449/3 "2019-03-07T15:22:40Z")

</div>

Some thing like this.  
 ![](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/threejs/original/2X/f/f0d992a949ee4f7c1d8f622ddb6760f725d31f34.png)  
but will have to rotate the labels to match the lines.

---

<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:** [March 7, 2019, 5:13pm UTC](https://discourse.threejs.org/t/linesegment-line-position/6449/4 "2019-03-07T17:13:09Z")

</div>

Interesting. So what have you tried? 😉

---

<div class="post-metadata">

**Author:** ![Ghostff](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@Ghostff](https://discourse.threejs.org/u/Ghostff)\
**Post date:** [March 7, 2019, 7:21pm UTC](https://discourse.threejs.org/t/linesegment-line-position/6449/5 "2019-03-07T19:21:06Z")

</div>

nothing really, but is it possible to get the position of a vertex?

---

<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:** [March 7, 2019, 7:33pm UTC](https://discourse.threejs.org/t/linesegment-line-position/6449/6 "2019-03-07T19:33:38Z")

</div>

Yes, all positions are stored in a buffer attribute, that is `geometry.attributes.position`, where `geometry` is `THREE.BufferGeometry()`.

---

<div class="post-metadata">

**Author:** ![hofk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hofk/32/44944_2.png) [@hofk](https://discourse.threejs.org/u/hofk)\
**Post date:** [March 7, 2019, 7:56pm UTC](https://discourse.threejs.org/t/linesegment-line-position/6449/7 "2019-03-07T19:56:34Z")

</div>

A very simple example where you can see it:  
[http://discourse.threejs.hofk.de/2018/cell/cell.htm](http://discourse.threejs.hofk.de/2018/cell/cell.htm)

to find; [http://discourse.threejs.hofk.de/2018/index2018.html](http://discourse.threejs.hofk.de/2018/index2018.html) in the collection [Collection of examples from discourse.threejs.org](https://discourse.threejs.org/t/collection-of-examples-from-discourse-threejs-org/4315)
