NGL@1.0.0-beta.7 Home Manual Reference Source Gallery
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
public get
public
public
public
public
public
public
public
public
public get
public
public
public get abstract
public
public
public
public
public set
public get
public
public
public
public get
public get
public
public
public
public
public
public
public get
public get
public
public get abstract
public
public
public
public
public
public
public
public
Private Members
private

Method Summary

Public Methods
public
public
public

Free buffer resources

public
public
public
public
public
public
public
public
public
public
public
public
public
public

Sets buffer attributes

public
public

Set buffer parameters

public
public
public

Set buffer visibility

public
public
public
Private Methods
private

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 [name] source

public get attributeSize source

public background source

public clipCenter source

public clipNear source

public clipRadius source

public depthWrite source

public diffuse source

public disablePicking source

public dullInterior source

public get dynamic source

public flatShaded source

public forceTransparent source

public get abstract fragmentShader source

public geometry source

public group source

public indexVersion source

public material source

public set matrix source

public get matrix source

public metalness source

public opacity source

public opaqueBack source

public get parameters source

public get pickable source

public picking source

public pickingGroup source

public pickingMaterial source

public pickingUniforms source

public roughness source

public side source

public get size source

public get transparent source

public uniforms source

public get abstract vertexShader source

public visible source

public wireframe source

public wireframeGeometry source

public wireframeGroup source

public wireframeIndex source

public wireframeIndexCount source

public wireframeIndexVersion source

public wireframeMaterial source

Private Members

private _positionDataSize source

Public Methods

public addAttributes() source

public addUniforms() source

public dispose(): undefined source

Free buffer resources

Return:

undefined

public getDefines() source

public getFragmentShader() source

public getMesh() source

public getParameters() source

public getPickingMesh() source

public getRenderOrder() source

public getShader() source

public getVertexShader() source

public getWireframeMesh() source

public initIndex() source

public makeMaterial() source

public makeWireframeGeometry() source

public makeWireframeIndex() source

public setAttributes(data: Object) source

Sets buffer attributes

Params:

NameTypeAttributeDescription
data Object

An object where the keys are the attribute names and the values are the attribute data.

Example:

var buffer = new Buffer();
buffer.setAttributes({ attrName: attrData });

public setMatrix() source

public setParameters(params: BufferParameters): undefined source

Set buffer parameters

Params:

NameTypeAttributeDescription
params BufferParameters

buffer parameters object

Return:

undefined

public setProperties() source

public setUniforms() source

public setVisibility(value: Boolean): undefined source

Set buffer visibility

Params:

NameTypeAttributeDescription
value Boolean

visibility value

Return:

undefined

public updateRenderOrder() source

public updateShader() source

public updateWireframeIndex() source

Private Methods

private _getMesh() source