A special material for drawing lines. Intended to use with MeshLine and MeshLineIndexed meshes.



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.


See the base Material class for common properties.

.alphaMap : Texture

A texture that controls the opacity along the line (requires useAlphaMap set to true).

.alphaTest : Number

A threshold alpha value to perform discard (from 0 to 1).

.color : Color

Line color.

.isMeshLineMaterial : Boolean

Used to check whether this or derived classes are mesh line materials. Default is true. You should not change this, as it's used internally for optimization.

.lineWidth : Number

Line width (if sizeAttenuation is true, it's world units; else is screen pixels).

.map : Texture

A texture that controls the color along the line (requires useMap set to true).

.opacity : Number

Line alpha value (from 0 to 1).

.repeat : Vector2

A vector for scaling map and alphaMap UV coordinates.

.resolution : Vector2

A vector specifying the canvas size.

.sizeAttenuation : Number

Make line width constant (if 0) or not (if 1).

.useAlphaMap : Number

Use the alphaMap texture.

.useMap : Number

Use the map texture.

.visibility : Number

Control partial visibility along the line (from 0 to 1) by changing its alpha value.


See the base RawShaderMaterial class for common methods.