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

OctahedronBuffer

Extends:

BufferMeshBufferGeometryBuffer → OctahedronBuffer

Octahedron buffer. Draws octahedrons.

Example:

var octahedronBuffer = new OctahedronBuffer({
  position: new Float32Array([ 0, 3, 0, -2, 0, 0 ]),
  color: new Float32Array([ 1, 0, 1, 0, 1, 0 ]),
  size: new Float32Array([ 2, 1.5 ]),
  heightAxis: new Float32Array([ 0, 1, 1, 0, 2, 0 ]),
  depthAxis: new Float32Array([ 1, 0, 1, 0, 0, 2 ])
})

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get
Private Members
private
private
private

Method Summary

Public Methods
public
public

Inherited Summary

From class Buffer
public get
public get
public get abstract
public get
public set
public get
public get
public get
public get
public get abstract
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
private
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
From class MeshBuffer
public get
public get
From class GeometryBuffer
public get
public
public
public
public
public
public
public
public
public
public
public
public
public
public

Public Constructors

public constructor() source

Override:

GeometryBuffer#constructor

Public Members

public get updateNormals source

Override:

GeometryBuffer#updateNormals

Private Members

private _depthAxis source

private _heightAxis source

private _size source

Public Methods

public applyPositionTransform() source

Override:

GeometryBuffer#applyPositionTransform

public setAttributes() source

Sets buffer attributes

Override:

GeometryBuffer#setAttributes