mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
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.
This commit is contained in:
Vendored
+10
-9
@@ -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[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user