A material for drawing wireframe-style geometries with dashed lines.


WebGL / lines / dashed

var material = new v3d.LineDashedMaterial({ color: 0xffffff, linewidth: 1, scale: 1, dashSize: 3, gapSize: 1, });


LineDashedMaterial(parameters : Object)

parameters - (optional) an object with one or more properties defining the material's appearance. Any property of the material (including any property inherited from Material) can be passed in here.

The exception is the property color, which can be passed i as a hexadecimal string and is 0xffffff (white) by default. Color.set(color) is called internally.


See the base Material class for common properties.

.color : Color

Color of the material, by default set to white (0xffffff).

.dashSize : number

The size of the dash. This is both the gap with the stroke. Default is 3.

.gapSize : number

The size of the gap. Default is 1.

.linewidth : Float

Controls line thickness. Default is 1.

Due to limitations of the OpenGL Core Profile with the WebGL renderer on most platforms linewidth will always be 1 regardless of the set value.

.scale : number

The scale of the dashed part of a line. Default is 1.


See the base Material class for common methods.


For more info on how to obtain the source code of this module see this page.