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

# MeshLine

A special mesh containing geometry for drawing lines. Intended to use with the MeshLineMaterial material. Capable of creating geometry from Array/Float32Array data, for BufferGeometry use MeshLineIndexed instead.

## Constructor

### MeshLine()

The constructor takes no parameters.

## Properties

### # .geometry : BufferGeometry

The line's geometry to pass into the Mesh constructor. Created after calling the setGeometry method.

## Methods

### # .setGeometry(geometry : Array | Float32Array, widthCallback : Function)

Build the line's geometry from the given Array/Float32Array data. `widthCallback` can be used to control the width at each point along the line. Its parameter `p` varies from `0` to `1` along the line:

`line.setGeometry(geometry, function(p) { return p; });`

## Source

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