NGL@0.10.4 Home Manual Reference Source GalleryRepository
import Buffer from 'ngl/src/buffer/buffer.js'
public interface | source

Buffer

Buffer class. Base class for buffers.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get abstract
public get abstract

Method Summary

Public Methods
public

Free buffer resources

public

Set buffer parameters

public

Set buffer visibility

Public Constructors

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

Params:

NameTypeAttributeDescription
data Object

attribute object

data.position Float32Array

positions

data.color Float32Array

colors

data.index Float32Array

triangle indices

data.picking Picker
  • optional

picking ids

params BufferParameters

parameters object

Public Members

public get abstract fragmentShader source

public get abstract vertexShader source

Public Methods

public dispose(): undefined source

Free buffer resources

Return:

undefined

public setParameters(params: BufferParameters): undefined source

Set buffer parameters

Params:

NameTypeAttributeDescription
params BufferParameters

buffer parameters object

Return:

undefined

public setVisibility(value: Boolean): undefined source

Set buffer visibility

Params:

NameTypeAttributeDescription
value Boolean

visibility value

Return:

undefined