|
@@ -80,13 +80,13 @@ THREE.Lut.prototype = {
|
|
|
|
|
|
changeColorMap: function ( colormap ) {
|
|
|
|
|
|
- this.mapname = colormap;
|
|
|
+ this.mapname = colormap;
|
|
|
|
|
|
return new THREE.Lut( this.mapname, this.n );
|
|
|
|
|
|
},
|
|
|
|
|
|
- copy: function ( lut ) {
|
|
|
+ copy: function ( lut ) {
|
|
|
|
|
|
this.lut = lut.lut;
|
|
|
this.mapname = lut.mapname;
|
|
@@ -99,9 +99,9 @@ THREE.Lut.prototype = {
|
|
|
|
|
|
getColor: function ( alpha ) {
|
|
|
|
|
|
- alpha = ( alpha - this.minV ) / ( this.maxV - this.minV );
|
|
|
+ alpha = ( alpha - this.minV ) / ( this.maxV - this.minV );
|
|
|
|
|
|
- var colorPosition = Math.round( alpha * this.n );
|
|
|
+ var colorPosition = Math.round( alpha * this.n );
|
|
|
|
|
|
colorPosition == this.n ? colorPosition -= 1 : colorPosition;
|
|
|
|
|
@@ -111,8 +111,5 @@ THREE.Lut.prototype = {
|
|
|
|
|
|
};
|
|
|
|
|
|
-THREE.ColorMapKeywords = {
|
|
|
- "rainbow": [ [ 0.0, '0x0000FF' ], [ 0.2, '0x00FFFF' ], [ 0.5, '0x00FF00' ], [ 0.8, '0xFFFF00'], [1.0, '0xFF0000' ] ],
|
|
|
- "cooltowarm": [ [ 0.0, '0x3C4EC2' ], [ 0.2, '0x9BBCFF' ], [ 0.5, '0xDCDCDC' ], [ 0.8, '0xF6A385'], [1.0, '0xB40426' ] ],
|
|
|
- "blackbody" : [ [ 0.0, '0x000000' ], [ 0.2, '0x780000' ], [ 0.5, '0xE63200' ], [ 0.8, '0xFFFF00'], [1.0, '0xFFFFFF' ] ]
|
|
|
-}
|
|
|
+THREE.ColorMapKeywords = {"rainbow": [ [ 0.0, '0x0000FF' ], [ 0.2, '0x00FFFF' ], [ 0.5, '0x00FF00' ], [ 0.8, '0xFFFF00'], [1.0, '0xFF0000' ] ], "cooltowarm": [ [ 0.0, '0x3C4EC2' ], [ 0.2, '0x9BBCFF' ], [ 0.5, '0xDCDCDC' ], [ 0.8, '0xF6A385'], [1.0, '0xB40426' ] ], "blackbody" : [ [ 0.0, '0x000000' ], [ 0.2, '0x780000' ], [ 0.5, '0xE63200' ], [ 0.8, '0xFFFF00'], [1.0, '0xFFFFFF' ] ]
|
|
|
+}
|