NGL@0.10.4 Home Manual Reference Source GalleryRepository
import ArrowBuffer from 'ngl/src/buffer/arrow-buffer.js'
public class | source

ArrowBuffer

Implements:

Arrow buffer. Draws arrows made from a cylinder and a cone.

Example:

var arrowBuffer = new ArrowBuffer( {
    position1: new Float32Array( [ 0, 0, 0 ] ),
    position2: new Float32Array( [ 10, 1, 1 ] ),
    color: new Float32Array( [ 1, 0, 0 ] ),
    radius: new Float32Array( [ 1 ] )
} );

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

Set buffer parameters

Public Constructors

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

Params:

NameTypeAttributeDescription
data Object

buffer data

data.position1 Float32Array

from positions

data.position2 Float32Array

to positions

data.color Float32Array

colors

data.radius Float32Array

radii

data.picking Picker
  • optional

picking ids

params BufferParameters
  • optional

parameters object

Public Methods

public setParameters(params: BufferParameters): undefined source

Set buffer parameters

Params:

NameTypeAttributeDescription
params BufferParameters

buffer parameters object

Return:

undefined