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

SphereBuffer

Implements:

Sphere buffer. Depending on the value ExtensionFragDepth and params.disableImpostor the constructor returns either a SphereGeometryBuffer or a SphereImpostorBuffer

Example:

var sphereBuffer = new SphereBuffer( {
    position: new Float32Array( [ 0, 0, 0 ] ),
    color: new Float32Array( [ 1, 0, 0 ] ),
    radius: new Float32Array( [ 1 ] )
} );

Constructor Summary

Public Constructor
public

Public Constructors

public constructor(data: Object, params: BufferParameters): SphereGeometryBuffer | SphereImpostorBuffer source

Params:

NameTypeAttributeDescription
data Object

buffer data

data.position Float32Array

positions

data.color Float32Array

colors

data.radius Float32Array

radii

data.picking Picker
  • optional

picking ids

params BufferParameters

parameters object

Return:

SphereGeometryBuffer | SphereImpostorBuffer

the buffer object