adding gamma for line drawing

This commit is contained in:
Micho 2013-05-18 18:22:31 +02:00
parent f624c74cf7
commit db53287cdf
1 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,7 @@ function renderCanvas() {
var r = Math.sqrt(dx*dx + dy*dy); var r = Math.sqrt(dx*dx + dy*dy);
if (r > 1) { 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.strokeStyle = 'rgba(0,0,0,'+a+')';
context.lineWidth = client.r*2*radius; context.lineWidth = client.r*2*radius;
context.beginPath(); context.beginPath();