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

CylinderBuffer

Implements:

Cylinder buffer. Depending on the value ExtensionFragDepth and params.disableImpostor the constructor returns either a CylinderGeometryBuffer or a CylinderImpostorBuffer

Example:

var cylinderBuffer = new CylinderBuffer( {
    position1: new Float32Array( [ 0, 0, 0 ] ),
    position2: new Float32Array( [ 1, 1, 1 ] ),
    color: new Float32Array( [ 1, 0, 0 ] ),
    color2: new Float32Array( [ 0, 1, 0 ] ),
    radius: new Float32Array( [ 1 ] )
} );

Constructor Summary

Public Constructor
public

Public Constructors

public constructor(data: Object, params: BufferParameters): CylinderGeometryBuffer | CylinderImpostorBuffer source

Params:

NameTypeAttributeDescription
data Object

buffer data

data.position1 Float32Array

from positions

data.position2 Float32Array

to positions

data.color Float32Array

from colors

data.color2 Float32Array
  • optional

to colors

data.radius Float32Array

radii

data.picking Picker
  • optional

picking ids

params BufferParameters
  • optional

parameters object

Return:

CylinderGeometryBuffer | CylinderImpostorBuffer

the buffer object