<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<script src="../../list.js"></script>
		<script src="../../page.js"></script>
		<link type="text/css" rel="stylesheet" href="../../page.css" />
	</head>
	<body>
		<h1>[name]</h1>

		<div class="desc">
		Represents a lookup table for colormaps. It is used to determine the color values from a range of data values.
		</div>


		<h2>Example</h2>
		<code>var lut = new THREE.Lut( "rainbow", 512 );</code>
		<code>var data = [0, 10.1, 4.2, 3.4, 63, 28];</code>
		<code>lut.setMax(63);</code>
		<code>color = lut.getColor(10);</code>

		<h2>Constructor</h2>


		<h3>[name]( colormap, numberOfColors )</h3>
                <div>
                colormap - optional argument that sets a colormap from predefined colormaps. Available colormaps are : "rainbow", "cooltowarm", "blackbody".
                numberOfColors - optional argument that sets the number of colors used to represent the data array.
		</div>

		<h2>Properties</h2>

		<h3>[property:Float minV]</h3>
		<div>
		The minimum value to be represented with the lookup table. Default is 0.
		</div>

		<h3>[property:Float maxV]</h3>
		<div>
		The maximum value to be represented with the lookup table. Default is 1.
		</div>
		
		<h3>.[legend]</h3>
		<div>
		The legend of the lookup table.
		</div>

		<h2>Methods</h2>

		<h3>[method:null copy]( [page:Lut lut] ) [page:Lut this]</h3>
		<div>
		color — Lut to copy.
		</div>
		<div>
		Copies given lut.
		</div>
		
		<h3>.setLegendOn [parameters]</h3>
		<div>
		parameters - { layout: value, position: { x: value, y: value, z: value }, dimensions: { width: value, height: value } }
		layout — Horizontal or vertical layout. Default is vertical.<br />
		position — The position x,y,z of the legend.<br />
		dimensions — The dimensions (width and height) of the legend.<br />
		</div>
		<div>
		Sets this Lut with the legend on.
		</div>
		
		<h3>.setLegendOff</h3>
		<div>
		</div>
		<div>
		Sets this Lut with the legend off.
		</div>
    
    <h3>.setLegendLabels [parameters, callback]</h3>
		<div>
		parameters - { fontsize: value, fontface: value, title: value, um: value, ticks: value, decimal: value, notation: value }
		fontsize — Font size to be used for labels.<br />
		fontface — Font type to be used for labels.<br />
		title — The title of the legend.<br />
		um — The unit of measurements of the legend.<br />
		ticks — The number of ticks to be displayed.<br />
		decimal — The number of decimals to be used for legend values.<br />
		notation — Legend notation: standard (default) or scientific.<br />
		callback — An optional callback to be used to format the legend labels.<br />
		</div>
		<div>
		Sets the labels of the legend of this Lut.
		</div>

		<h3>[method:Lut setminV]( [page:Float minV] )</h3>
		<div>
		minV — The minimum value to be represented with the lookup table.<br />
		</div>
		<div>
		Sets this Lut with the minimum value to be represented.
		</div>

		<h3>[method:Lut setmaxV]( [page:Float maxV] )</h3>
		<div>
		maxV — The maximum value to be represented with the lookup table.<br />
		</div>
		<div>
		Sets this Lut with the maximum value to be represented.
		</div>

		<h3>[method:Lut changeNumberOfColors]( [page:Float numberOfColors] )</h3>
		<div>
		numberOfColors — The number of colors to be used to represent the data array.<br />
		</div>
		<div>
		Sets this Lut with the number of colors to be used.
                </div>

		<h3>[method:Lut changeColorMap]( [page:Float colorMap] )</h3>
		<div>
		colorMap — The name of the color map to be used to represent the data array.<br />
		</div>
		<div>
		Sets this Lut with the colormap to be used.
		</div>

		<h3>[method:Lut addColorMap]( colorMapName, arrayOfColors )</h3>
		<div>
		Insert a new color map into the set of available color maps.
		</div>

		<h3>[method:Lut getColor]( value ) [page:Lut this]</h3>
		<div>
		value -- the data value to be displayed as a color.
		</div>
		<div>
		Returns a Three.Color.
		</div>

		<h2>Source</h2>

		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/[path].js examples/js/math/[path].js]
	</body>
</html>