Skip to content

Commit 396cb8e

Browse files
fix: Color.toGamma and Color.toLinear listener error
1 parent 214b8e6 commit 396cb8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/math/src/Color.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ export class Color implements IClone<Color>, ICopy<ColorLike, Color> {
294294
out._r = Color.gammaToLinearSpace(this._r);
295295
out._g = Color.gammaToLinearSpace(this._g);
296296
out._b = Color.gammaToLinearSpace(this._b);
297-
this._onValueChanged && this._onValueChanged();
297+
out._onValueChanged && out._onValueChanged();
298298
return out;
299299
}
300300

@@ -307,7 +307,7 @@ export class Color implements IClone<Color>, ICopy<ColorLike, Color> {
307307
out._r = Color.linearToGammaSpace(this._r);
308308
out._g = Color.linearToGammaSpace(this._g);
309309
out._b = Color.linearToGammaSpace(this._b);
310-
this._onValueChanged && this._onValueChanged();
310+
out._onValueChanged && out._onValueChanged();
311311
return out;
312312
}
313313

0 commit comments

Comments
 (0)