MeshLineMaterial - Verge3D User Manual - Soft8Soft
Description: Learn how to use MeshLineMaterial in your interactive 3D apps made with Verge3D

Material → ShaderMaterial → RawShaderMaterial →

# MeshLineMaterial

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

## Constructor

### MeshLineMaterial(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.

## Properties

See the base RawShaderMaterial class for common properties.

### # .alphaTest : Float

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. Always `true`. You should not change this, as it's used internally for optimization.

### # .lineWidth : Float

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 : Float

Line alpha value (from `0` to `1`).

### # .repeat : Vector2

A vector for scaling map UV coordinates.

### # .resolution : Vector2

A vector specifying the canvas size.

### # .sizeAttenuation : Integer

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

### # .useMap : Boolean

Use the map texture.

### # .visibility : Float

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

## Methods

See the base RawShaderMaterial class for common methods.

## Source

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