Adding typings for THREE.Lut (#34122)

This commit is contained in:
Ethan Kay
2019-03-29 20:59:06 -07:00
committed by Ron Buckton
parent 55ebcedca6
commit a06e9c8470
2 changed files with 32 additions and 0 deletions
+1
View File
@@ -43,6 +43,7 @@ export * from './three-FirstPersonControls';
export * from './three-gltfexporter';
export * from './three-gltfloader';
export * from './three-lensflare';
export * from './three-lut';
export * from './three-mapcontrols';
export * from './three-maskpass';
export * from './three-mtlloader';
+31
View File
@@ -0,0 +1,31 @@
// https://github.com/mrdoob/three.js/blob/master/examples/js/math/Lut.js
import { Color, Mesh, Vector3 } from './three-core';
export type ColorMapKeyword = 'rainbow'|'cooltowarm'|'blackbody'|'grayscale';
export class Lut {
constructor(colormap: ColorMapKeyword, numberofcolors: number);
addColorMap(colormapName: string, arrayOfColors: Array<[number, string]>) : void;
changeColorMap(colormap: ColorMapKeyword): Lut;
changeNumberOfColors(numberofcolors: number): Lut;
copy(lut: Lut): void;
getColor(alpha: number): Color;
setLegendLayout(layout: 'horizontal'|'vertical'): void;
setLegendOff(): void;
setLegendOn(): Mesh;
setLegendPosition(position: Vector3): void;
setMax(max: number): void;
setMin(min: number): void;
}