From 7a201664fd4d47711633f95856e8c3d935db9d21 Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:47:34 -0500 Subject: [PATCH] vel renderer tweaks --- mods/a_mod_by_alice.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index 6b8b8f89..35568c78 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -5416,14 +5416,13 @@ color1 and color2 spread through striped paint like dye does with itself. col ctx.fillStyle = "rgb(15,15,15)" } else { var magnitude = Math.sqrt ((vx ** 2) + (vy ** 2)); - magnitude *= (4 ** ((50 + Math.abs(magnitude))/50)) var direction = Math.atan2(pixel.vy ?? 0,pixel.vx ?? 0)*180/Math.PI; - if(direction < 0) { direction = -direction + 180 }; + if(direction < 0) { direction = scale(direction,-180,0,360,180) }; hue = direction; sat = 100; - lig = bound(magnitude,0,100); + lig = bound(scale(magnitude,0,100,10,100),0,100); ctx.fillStyle = "hsl("+hue+","+sat+"%,"+lig+"%)"; }