NGL@1.0.0-beta.7 Home Manual Reference Source Gallery
import WideLineBuffer from 'ngl/src/buffer/wideline-buffer.js'
public class | source

WideLineBuffer

Extends:

BufferMappedBufferMappedQuadBuffer → WideLineBuffer

Wide Line buffer. Draws lines with a fixed width in pixels.

Example:

var lineBuffer = new WideLineBuffer({
  position1: new Float32Array([ 0, 0, 0 ]),
  position2: new Float32Array([ 1, 1, 1 ]),
  color: new Float32Array([ 1, 0, 0 ]),
  color2: new Float32Array([ 0, 1, 0 ])
});

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get
public
public get
public get

Inherited Summary

From class Buffer
public get
public get
public get abstract
public get
public set
public get
public get
public get
public get
public get abstract
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
private
public
public
public

Free buffer resources

public
public
public
public
public
public
public
public
public
public
public
public
public
public

Sets buffer attributes

public
public

Set buffer parameters

public
public
public

Set buffer visibility

public
public
public
private
From class MappedBuffer
public get
public get
public get abstract
public get abstract
public get abstract
public get abstract
public get abstract
public get abstract
public
public
public
public
public
public
From class MappedQuadBuffer
public get
public get
public get
public get
public get
public get

Public Constructors

public constructor(data: Object, params: BufferParameters) source

Override:

MappedBuffer#constructor

Params:

NameTypeAttributeDescription
data Object

attribute object

data.position1 Float32Array

from positions

data.position2 Float32Array

to positions

data.color Float32Array

from colors

data.color2 Float32Array

to colors

params BufferParameters

parameter object

Public Members

public get fragmentShader source

Override:

Buffer#fragmentShader

public linewidth source

public get parameters source

Override:

Buffer#parameters

public get vertexShader source

Override:

Buffer#vertexShader