表示颜色表的查找表,用于从一个数据值的范围中确定颜色值。
const lut = new Lut( 'rainbow', 512 );
const color = lut.getColor( 0.5 );
colormap - (可选)从预定义的颜色表中设置一个颜色表。可选值有:"rainbow"、 "cooltowarm"、 "blackbody"。 numberOfColors - (可选)设置用于表示数据数组的颜色数量。
查找表所表示的最小值,默认为0。
查找表所表示的最小值,默认为1。
查找表的图例。
color — 要拷贝的 Lut。
拷贝给定的 Lut。
parameters - { layout: value, position: { x: value, y: value, z: value }, dimensions: { width: value, height: value } }
layout — Horizontal or vertical layout. Default is vertical.
position — The position x,y,z of the legend.
dimensions — The dimensions (width and height) of the legend.
Sets this Lut with the legend on.
Sets this Lut with the legend off.
parameters - { fontsize: value, fontface: value, title: value, um: value, ticks: value, decimal: value, notation: value }
fontsize — Font size to be used for labels.
fontface — Font type to be used for labels.
title — The title of the legend.
um — The unit of measurements of the legend.
ticks — The number of ticks to be displayed.
decimal — The number of decimals to be used for legend values.
notation — Legend notation: standard (default) or scientific.
callback — An optional callback to be used to format the legend labels.
Sets the labels of the legend of this Lut.
minV — 查找表所表示的最小值。
将查找表要表示的最小值设为该值。
maxV — 查找表所表示的最小值。
将查找表要表示的最大值设为该值。
numberOfColors — 用于表示数据数组的颜色数量。
设置查找表中要使用的颜色的数量。
colorMap — 用于表示数据数组的颜色表名称。
设置查找表的颜色表为传入的颜色表。
插入一个新的颜色表到可用颜色表中。
value -- 作为颜色展示的数据值。
返回一个[page:Color]。
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/Lut.js examples/jsm/math/Lut.js]