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 Material class for common properties.

.alphaMap : Texture

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

.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. Default is 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 and alphaMap UV coordinates.

.resolution : Vector2

A vector specifying the canvas size.

.sizeAttenuation : Integer

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

.useAlphaMap : Integer

Use the alphaMap texture.

.useMap : Integer

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.