提交 db2dcc52 编写于 作者: M Mr.doob

Merge remote-tracking branch 'daron1337/lut_fixed' into dev

......@@ -40,6 +40,11 @@
<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>
......@@ -50,7 +55,40 @@
<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>.setminV( [page:Float minV] ) [page:Lut this]</h3>
<div>
......
......@@ -177,7 +177,7 @@ THREE.Lut.prototype = {
var max = this.map[ j ][ 0 ];
var color = new THREE.Color( 0xffffff );
var minColor = new THREE.Color( 0xffffff ).setHex( this.map[ j - 1][ 1 ] );
var maxColor = new THREE.Color( 0xffffff ).setHex( this.map[ j ][ 1 ] );
color = minColor.lerp( maxColor, ( i - min ) / ( max - min ) );
data[ k * 4 ] = Math.round( color.r * 255 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册