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

HyperballStickBuffer

Implements:

Hyperball stick buffer. Depending on the value ExtensionFragDepth and params.disableImpostor the constructor returns either a CylinderGeometryBuffer or a HyperballStickImpostorBuffer

Example:

var hyperballStickBuffer = new HyperballStickBuffer( {
    position1: new Float32Array( [ 0, 0, 0 ] ),
    position2: new Float32Array( [ 2, 2, 2 ] ),
    color: new Float32Array( [ 1, 0, 0 ] ),
    color2: new Float32Array( [ 0, 1, 0 ] ),
    radius1: new Float32Array( [ 1 ] ),
    radius2: new Float32Array( [ 2 ] )
} );

Constructor Summary

Public Constructor
public

Public Constructors

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

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

data.radius1 Float32Array

from radii

data.radius2 Float32Array

to radii

data.picking Float32Array

picking ids

params BufferParameters

parameter object