@galacean/engine-math 1.4.14 → 1.5.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +27 -16
- package/dist/main.js.map +1 -1
- package/dist/module.js +27 -16
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
- package/types/Color.d.ts +16 -10
package/package.json
CHANGED
package/types/Color.d.ts
CHANGED
|
@@ -5,17 +5,17 @@ import { ICopy } from "./ICopy";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class Color implements IClone<Color>, ICopy<ColorLike, Color> {
|
|
7
7
|
/**
|
|
8
|
-
* Modify a value from the
|
|
9
|
-
* @param value - The value in
|
|
8
|
+
* Modify a value from the sRGB space to the linear space.
|
|
9
|
+
* @param value - The value in sRGB space
|
|
10
10
|
* @returns The value in linear space
|
|
11
11
|
*/
|
|
12
|
-
static
|
|
12
|
+
static sRGBToLinearSpace(value: number): number;
|
|
13
13
|
/**
|
|
14
|
-
* Modify a value from the linear space to the
|
|
14
|
+
* Modify a value from the linear space to the sRGB space.
|
|
15
15
|
* @param value - The value in linear space
|
|
16
|
-
* @returns The value in
|
|
16
|
+
* @returns The value in sRGB space
|
|
17
17
|
*/
|
|
18
|
-
static
|
|
18
|
+
static linearToSRGBSpace(value: number): number;
|
|
19
19
|
/**
|
|
20
20
|
* Determines whether the specified colors are equals.
|
|
21
21
|
* @param left - The first color to compare
|
|
@@ -140,11 +140,11 @@ export declare class Color implements IClone<Color>, ICopy<ColorLike, Color> {
|
|
|
140
140
|
*/
|
|
141
141
|
toLinear(out: Color): Color;
|
|
142
142
|
/**
|
|
143
|
-
* Modify components (r, g, b) of this color from linear space to
|
|
144
|
-
* @param out - The color in
|
|
145
|
-
* @returns The color in
|
|
143
|
+
* Modify components (r, g, b) of this color from linear space to sRGB space.
|
|
144
|
+
* @param out - The color in sRGB space
|
|
145
|
+
* @returns The color in sRGB space
|
|
146
146
|
*/
|
|
147
|
-
|
|
147
|
+
toSRGB(out: Color): Color;
|
|
148
148
|
/**
|
|
149
149
|
* Gets the brightness.
|
|
150
150
|
* @returns The Hue-Saturation-Brightness (HSB) saturation for this
|
|
@@ -155,6 +155,12 @@ export declare class Color implements IClone<Color>, ICopy<ColorLike, Color> {
|
|
|
155
155
|
* @return A JSON representation of this color
|
|
156
156
|
*/
|
|
157
157
|
toJSON(): ColorLike;
|
|
158
|
+
/** @deprecated Please use `sRGBToLinearSpace` instead. */
|
|
159
|
+
static gammaToLinearSpace(value: number): number;
|
|
160
|
+
/** @deprecated Please use `linearToSRGBSpace` instead. */
|
|
161
|
+
static linearToGammaSpace(value: number): number;
|
|
162
|
+
/** @deprecated Please use `toSRGB` instead. */
|
|
163
|
+
toGamma(out: Color): Color;
|
|
158
164
|
}
|
|
159
165
|
interface ColorLike {
|
|
160
166
|
/** {@inheritDoc Color._r} */
|