Class: lookupTable2D

geo.webgl. lookupTable2D

new geo.webgl.lookupTable2D(arg){geo.webgl.lookupTable2D}

Create a new instance of class webgl_lookupTable2D.

Name Type Description
arg object

Options object.

Name Type Description
maxWidth number optional

Maximum width to use for the texture. If the number of colors set is less than this, the texture is 1D. If greater, it will be a rectangle of maxWidth x whatever height is necessary.

colorTable Array.<number> optional

Initial color table for the texture. This is of the form RGBARGBA... where each value is an integer on the scale [0,255].

Returns:
Type Description
geo.webgl.lookupTable2D

Extends

  • vgl.texture

Methods

colorTable(val){Array.<number>|this}

Get/set color table.

Name Type Description
val Array.<number> optional

An array of RGBARGBA... integers on a scale of [0, 255]. undefined to get the current value.

Returns:
Type Description
Array.<number> | this

maxWidth(){number}

Get maxWidth value.

Returns:
Type Description
number The maxWidth of the texture used.

setup(renderState)

Create lookup table, initialize parameters, and bind data to it.

Name Type Description
renderState vgl.renderState

An object that contains the context used for drawing.