Can't use dashed lines with LineMaterial

Hi, I was able to add linewidth to my EdgesGeometry using LineMaterial instead of LineBasicMaterial.

But when I try to implement LineMaterial attributes for dashed lines, it makes no difference.

My code:

const size = 32;
const widthSegments = 1;
const heightSegments = 1;
const depthSegments = 1;
this.geometry = new THREE.BoxGeometry(
  size,
  size,
  size,
  widthSegments,
  heightSegments,
  depthSegments
);

const thresholdAngle = 15;
const edgesGeometry = THREE.EdgesGeometry(geometry, thresholdAngle);

const lineGeometry = new LineSegmentsGeometry().setPositions(
    edgesGeometry.attributes.position.array
);

const lineMaterial = new LineMaterial({
    color: 0x000000,
    linewidth: 5,
   //dashed:true, It makes no diff
   //dashSize: 3, idem 
   //gapSize: 3 idem
});

lineMaterial.resolution.set(window.innerWidth, window.innerHeight);

const shape = new LineSegments2(lineGeometry, lineMaterial);
scene.add(shape)

Hi!
For fat lines, you have to set it with defines of material:

1 Like

Thanks @prisoner849 !

For fat lines, it show a difference now but just as a gap in the corners. I can’t still see the dashed like for example using LineDashedMaterial.

Captura de Pantalla 2021-04-19 a la(s) 13.44.13