Material

LineBasicMaterial

A material for drawing wireframe-style geometries.

Examples

WebGL / buffergeometry / drawcalls
WebGL / buffergeometry / lines
WebGL / buffergeometry / lines / indexed
WebGL / decals
WebGL / geometry / nurbs
WebGL / geometry / shapes
WebGL / geometry / spline / editor
WebGL / interactive / buffergeometry
WebGL / interactive / voxelpainter
WebGL / lines / colors
WebGL / lines / dashed
WebGL / lines / sphere
WebGL / lines / splines
WebGL / materials
WebGL / phyics / rope

var material = new v3d.LineBasicMaterial({ color: 0xffffff, linewidth: 1, linecap: 'round', //ignored by WebGLRenderer linejoin: 'round' //ignored by WebGLRenderer });

Constructor

LineBasicMaterial(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.

The exception is the property color, which can be passed in as a hexadecimal string and is 0xffffff (white) by default. Color.set(color) is called internally.

Properties

See the base Material class for common properties.

.color : Color

Color of the material, by default set to white (0xffffff).

.isLineBasicMaterial : Boolean

Used to check whether this or derived classes are line basic materials. Default is true.

You should not change this, as it used internally for optimisation.

.lights : Boolean

Whether the material is affected by lights. Default is false.

.linewidth : Float

Controls line thickness. Default is 1.

Due to limitations of the OpenGL Core Profile with the WebGL renderer on most platforms linewidth will always be 1 regardless of the set value.

.linecap : String

Define appearance of line ends. Possible values are 'butt', 'round' and 'square'. Default is 'round'.

This corresponds to the 2D Canvas lineCap property and it is ignored by the WebGL renderer.

.linejoin : String

Define appearance of line joints. Possible values are 'round', 'bevel' and 'miter'. Default is 'round'.

This corresponds to the 2D Canvas lineJoin property and it is ignored by the WebGL renderer.

Methods

See the base Material class for common methods.

Source

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