From db53287cdf3339f8f4cac34923cca9546eae8fda Mon Sep 17 00:00:00 2001 From: Micho Date: Sat, 18 May 2013 18:22:31 +0200 Subject: [PATCH] adding gamma for line drawing --- clients/anim/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/anim/main.js b/clients/anim/main.js index 8a329c8..2327743 100644 --- a/clients/anim/main.js +++ b/clients/anim/main.js @@ -56,7 +56,7 @@ function init() { var r = Math.round(Math.sqrt(x*x + y*y)*100); var a = Math.atan2(y,x); - circlePoints.push({x:x,y:y,r:r,a:a}); + circlePoints.push({x:x, y:y, r:r, a:a}); } } @@ -175,7 +175,7 @@ function renderCanvas() { var r = Math.sqrt(dx*dx + dy*dy); if (r > 1) { - var a = Math.min(5/r, 1); + var a = Math.min(Math.pow(1/r, 0.5), 1); context.strokeStyle = 'rgba(0,0,0,'+a+')'; context.lineWidth = client.r*2*radius; context.beginPath();