@babylonjs/gui 8.54.1 → 8.54.3

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.
@@ -197,9 +197,8 @@ export class ColorPicker extends Control {
197
197
  data[index] = color.r * 255;
198
198
  data[index + 1] = color.g * 255;
199
199
  data[index + 2] = color.b * 255;
200
- let alphaRatio = (dist - innerRadius) / (radius - innerRadius);
201
200
  //apply less alpha to bigger color pickers
202
- let alphaAmount = 0.2;
201
+ let alphaAmount;
203
202
  const maxAlpha = 0.2;
204
203
  const minAlpha = 0.04;
205
204
  const lowerRadius = 50;
@@ -213,7 +212,7 @@ export class ColorPicker extends Control {
213
212
  else {
214
213
  alphaAmount = ((minAlpha - maxAlpha) * (radius - lowerRadius)) / (upperRadius - lowerRadius) + maxAlpha;
215
214
  }
216
- alphaRatio = (dist - innerRadius) / (radius - innerRadius);
215
+ const alphaRatio = (dist - innerRadius) / (radius - innerRadius);
217
216
  if (alphaRatio < alphaAmount) {
218
217
  data[index + 3] = 255 * (alphaRatio / alphaAmount);
219
218
  }