Skip to content

Commit

Permalink
Fix background animation size on 4k screens and decrease base opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
schlagmichdoch committed Feb 17, 2025
1 parent 8354926 commit b8a973f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions public/scripts/ui-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ class BackgroundCanvas {
initAnimation() {
this.baseColorNormal = '168 168 168';
this.baseColorShareMode = '168 168 255';
this.baseOpacityNormal = 0.4;
this.baseOpacityNormal = 0.3;
this.baseOpacityShareMode = 0.8;
this.speed = 0.5;
this.fps = 40;
this.fps = 60;

// if browser supports OffscreenCanvas
// -> put canvas drawing into serviceworker to unblock main thread
Expand Down Expand Up @@ -427,7 +427,7 @@ class BackgroundCanvas {
c.height = h;
x0 = w / 2;
y0 = h - offset;
dw = Math.round(Math.min(Math.max(w, h), 800) / 10);
dw = Math.round(Math.min(Math.max(0.6 * w, h)) / 10);

drawFrame(currentFrame);
}
Expand Down
2 changes: 1 addition & 1 deletion public/scripts/worker/canvas-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function initCanvas(footerOffsetHeight, clientWidth, clientHeight) {
c.height = h;
x0 = w / 2;
y0 = h - offset;
dw = Math.round(Math.min(Math.max(w, h), 800) / 10);
dw = Math.round(Math.min(Math.max(0.6 * w, h)) / 10);

drawFrame(currentFrame);
}
Expand Down

0 comments on commit b8a973f

Please sign in to comment.