表示颜色表的查找表,用于从一个数据值的范围中确定颜色值。
const lut = new Lut( 'rainbow', 512 );
const color = lut.getColor( 0.5 );
colormap - Sets a colormap from predefined colormaps. Available colormaps are: *rainbow*, *cooltowarm*, *blackbody*, *grayscale*. Default is *rainbow*.
count - Sets the number of colors used to represent the data array. Default is *32*.
The lookup table for the selected color map represented as an array of [page:Color]s.
The currently selected color map. Default is the *rainbow* color map.
The minimum value to be represented with the lookup table. Default is *0*.
The maximum value to be represented with the lookup table. Default is *1*.
The number of colors of the current selected color map. Default is *32*.
color — Lut to copy.
Copies the given lut.
name — The name of the color map.
arrayOfColors — An array of color values. Each value is an array holding a threshold and the actual color value as a hexadecimal number.
Adds a color map to this [name] instance.
Creates a canvas in order to visualize the lookup table as a texture.
value -- the data value to be displayed as a color.
Returns an instance of [page:Color] for the given data value.
colormap — The name of the color map.
count — The number of colors. Default is *32*.
Configure the lookup table for the given color map and number of colors.
minV — The minimum value to be represented with the lookup table
Sets this Lut with the minimum value to be represented.
maxV — The maximum value to be represented with the lookup table.
Sets this Lut with the maximum value to be represented.
Updates the canvas with the [name]'s data.
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/Lut.js examples/jsm/math/Lut.js]