From d5f7aee604c850b32713b24fbbf360a93174a9bd Mon Sep 17 00:00:00 2001 From: Alec McEachran Date: Wed, 24 Oct 2018 18:14:34 +0100 Subject: [PATCH] Update three-core.d.ts to correct Color definition lerpHSL is missing from the definition, but is [defined](https://github.com/mrdoob/three.js/blob/master/src/math/Color.js). The definition can also be improved by using 'self' to express that these functions are fluent, returning this rather than a new instance of Color. --- types/three/three-core.d.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/types/three/three-core.d.ts b/types/three/three-core.d.ts index 3ab89ea5a9..03cddb9e3b 100755 --- a/types/three/three-core.d.ts +++ b/types/three/three-core.d.ts @@ -3378,17 +3378,18 @@ export class Color { */ getStyle(): string; - offsetHSL(h: number, s: number, l: number): Color; + offsetHSL(h: number, s: number, l: number): self; - add(color: Color): Color; - addColors(color1: Color, color2: Color): Color; - addScalar(s: number): Color; - sub(color: Color): Color; - multiply(color: Color): Color; - multiplyScalar(s: number): Color; - lerp(color: Color, alpha: number): Color; + add(color: Color): self; + addColors(color1: Color, color2: Color): self; + addScalar(s: number): self; + sub(color: Color): self; + multiply(color: Color): self; + multiplyScalar(s: number): self; + lerp(color: Color, alpha: number): self; + lerpHSL(color: Color, alpha: number): self; equals(color: Color): boolean; - fromArray(rgb: number[], offset?: number): Color; + fromArray(rgb: number[], offset?: number): self; toArray(array?: number[], offset?: number): number[]; }