# Selectively show/hide portions of lines in BufferGeometry line example

**URL:** <https://discourse.threejs.org/t/selectively-show-hide-portions-of-lines-in-buffergeometry-line-example/19198>\
**Category:** Questions\
**Tags:** buffergeometry, geometry\
**Created:** [September 28, 2020, 4:46pm UTC](https://discourse.threejs.org/t/selectively-show-hide-portions-of-lines-in-buffergeometry-line-example/19198 "2020-09-28T16:46:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![deklanw](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/deklanw/32/9141_2.png) [@deklanw](https://discourse.threejs.org/u/deklanw)\
**Post date:** [September 28, 2020, 4:46pm UTC](https://discourse.threejs.org/t/selectively-show-hide-portions-of-lines-in-buffergeometry-line-example/19198/1 "2020-09-28T16:46:00Z")

</div>

Referring to this official example:

> **[three.js webgl - buffergeometry - lines](https://threejs.org/examples/webgl_buffergeometry_lines.html)**

> <https://github.com/mrdoob/three.js/blob/abedf8c0adbe8b29c6d5d2540388f00941bbb06d/examples/webgl_buffergeometry_lines.html>

Suppose I had like 50,000 such lines in logical sets of around 10. Most of the time I would like to show all of them, but sometimes I’d like to show one set of 10 and hide the other 49,990, and then go back to showing all, etc.

Is there a way to do this?

Any help appreciated!

---

<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:** [September 28, 2020, 7:43pm UTC](https://discourse.threejs.org/t/selectively-show-hide-portions-of-lines-in-buffergeometry-line-example/19198/2 "2020-09-28T19:43:40Z")

</div>

Hi!  
Have a look at this method of buffer geometry: [https://threejs.org/docs/index.html#api/en/core/BufferGeometry.setDrawRange](https://threejs.org/docs/index.html#api/en/core/BufferGeometry.setDrawRange)

---

<div class="post-metadata">

**Author:** ![deklanw](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/deklanw/32/9141_2.png) [@deklanw](https://discourse.threejs.org/u/deklanw)\
**Post date:** [September 28, 2020, 10:18pm UTC](https://discourse.threejs.org/t/selectively-show-hide-portions-of-lines-in-buffergeometry-line-example/19198/3 "2020-09-28T22:18:00Z")

</div>

This requires the sets to be contiguous in the array, right? That can’t be done, in this case, if so
