0

I'm using gridHelper but I need to remove the vertical lines (only need the horizontal ones), is there a way to do it?

This is my current implementation (I'm using r3f)

<gridHelper args={[50, 6, 'black`, `black`]} position={[0,-3,0]} />

Constructor

GridHelper( size : number, divisions : Number, colorCenterLine : Color, colorGrid : Color )

There is no options to enable or disable vertical lines, also following documentation I cant see it.

https://threejs.org/docs/#api/en/helpers/GridHelper

r342346
  • 119
  • 1
  • 15
  • What happens if you change the 6 for a 0 in your array of parameters? Could you add a [mcve] to your question for faster troubleshooting? (easiest way of doing it is [edit]ing your question – blurfus Feb 02 '21 at 17:43
  • I've added the constructor: the 6 is the n. of divisions. I can add an example but its very simple – r342346 Feb 02 '21 at 18:12
  • It seems that grid helper is, as you mentioned, only able to do a grid (not just horizontal lines) - perhaps it is not the correct helper for your requirements? – blurfus Feb 02 '21 at 18:14
  • Maybe you can use a PlaneGeometry with `wireframe = true` and only add horizontal subdivisions with only 1 vertical subdivision. It won’t look exactly the same, but it’ll quickly get you there. – M - Feb 02 '21 at 19:28

0 Answers0