[page:RawShaderMaterial] →

[name]

A special material for drawing lines. Intended to use with [page:MeshLine] and [page:MeshLineIndexed] meshes.

Constructor

[name]([page:Material parameters])

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

Properties

See the base [page:Material] class for common properties.

[property:Texture alphaMap]

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

[property:Number alphaTest]

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

[property:Color color]

Line color.

[property:Boolean isMeshLineMaterial]

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.

[property:Number lineWidth]

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

[property:Texture map]

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

[property:Number opacity]

Line alpha value (from 0 to 1).

[property:Vector2 repeat]

A vector for scaling [page:.map map] and [page:.alphaMap alphaMap] UV coordinates.

[property:Vector2 resolution]

A vector specifying the canvas size.

[property:Number sizeAttenuation]

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

[property:Number useAlphaMap]

Use the [page:.alphaMap alphaMap] texture.

[property:Number useMap]

Use the [page:.map map] texture.

[property:Number visibility]

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

Methods

See the base [page:RawShaderMaterial] class for common methods.