black dots

This commit is contained in:
Micho 2013-05-18 17:54:25 +02:00
parent 0b7e0008ca
commit 6461ede5ec
1 changed files with 3 additions and 3 deletions

View File

@ -166,7 +166,7 @@ function updatePosition() {
function renderCanvas() { function renderCanvas() {
context.clearRect(0, 0, width, height); context.clearRect(0, 0, width, height);
context.fillStyle = '#F00'; context.fillStyle = '#000';
clients.forEach(function (client) { clients.forEach(function (client) {
if (client.r > 1e-2) { if (client.r > 1e-2) {
@ -175,8 +175,8 @@ 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(10/r, 1); var a = Math.min(5/r, 1);
context.strokeStyle = 'rgba(255,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();
context.moveTo(client.xo, client.yo); context.moveTo(client.xo, client.yo);