From 2ee902e578924a04c6c7982206b2f547b2004d3f Mon Sep 17 00:00:00 2001 From: bach Date: Mon, 12 Jun 2023 15:40:07 +0200 Subject: [PATCH] #2139 #2147 background --- src/components/MapBackground.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/MapBackground.vue b/src/components/MapBackground.vue index d2242ef..90481c7 100644 --- a/src/components/MapBackground.vue +++ b/src/components/MapBackground.vue @@ -103,7 +103,7 @@ export default { }, getRandBGColor (hue) { let h = !hue ? Math.floor(Math.random()*360) : hue + -30 + Math.floor(Math.random()*60); - let s = 40 + Math.floor(Math.random()*20); + let s = 25 + Math.floor(Math.random()*5); let l = 40 + Math.floor(Math.random()*10); let a = `${parseFloat(0.2 + Math.random()*.4).toFixed(3)}`.slice(1); let hsla = `hsla(${h}, ${s}%, ${l}%, ${a})`; @@ -119,10 +119,11 @@ export default { let step = 1; for (let i = 0; i < parseInt(canvasBackgroundTrame.width); i+=step) { for (let j = 0; j < parseInt(canvasBackgroundTrame.height); j+=step) { - if (Math.random() > 0.95) { + if (Math.random() > 0.6) { ctx.beginPath(); - ctx.arc(i, j, 0.5, 0, 2 * Math.PI, false); - ctx.fillStyle = "rgba(200,200,200,0.7)"; + // ctx.arc(i, j, 0.5, 0, 2 * Math.PI, false); + ctx.rect(i, j, 1, 1); + ctx.fillStyle = "rgba(0,0,0,0.1)"; ctx.fill(); } }