Skip to content

Commit

Permalink
Update r.js
Browse files Browse the repository at this point in the history
  • Loading branch information
tsynik committed Jun 25, 2024
1 parent e7d5838 commit b3484b6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lampa/r.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,11 +625,16 @@
for (var i = 0; i < bufferLength; i++) {
barHeight = dataArray[i];

var r = barHeight + (25 * (i/bufferLength));
var g = 250 * (i/bufferLength);
var b = 50;

ctx.fillStyle = "rgba(" + r + "," + g + "," + b + ", 0.75)";
// var r = barHeight + (25 * (i/bufferLength));
// var g = 250 * (i/bufferLength);
// var b = 50;
// var opacity = 0.75;
var r = 238;
var g = 238;
var b = 238;
var opacity = 25 * (i/bufferLength);

ctx.fillStyle = "rgba(" + r + "," + g + "," + b + "," + opacity + ")";
ctx.fillRect(x, HEIGHT - barHeight, barWidth, barHeight);

x += barWidth + 10;
Expand Down

0 comments on commit b3484b6

Please sign in to comment.