NGL@0.10.4 Home Manual Reference Source GalleryRepository
import DoubleSidedBuffer from 'ngl/src/buffer/doublesided-buffer.js'
public class | source

DoubleSidedBuffer

Implements:

A double-sided mesh buffer. Takes a buffer and renders the front and the back as seperate objects to avoid some artifacts when rendering transparent meshes. Also allows to render the back of a mesh opaque while the front is transparent.

Example:

var sphereGeometryBuffer = new SphereGeometryBuffer( {
    position: new Float32Array( [ 0, 0, 0 ] ),
    color: new Float32Array( [ 1, 0, 0 ] ),
    radius: new Float32Array( [ 1 ] )
} );
var doubleSidedBuffer = new DoubleSidedBuffer( sphereGeometryBuffer );

Constructor Summary

Public Constructor
public

constructor(buffer: Buffer)

Create a double sided buffer

Public Constructors

public constructor(buffer: Buffer) source

Create a double sided buffer

Params:

NameTypeAttributeDescription
buffer Buffer

the buffer to be rendered double-sided