Skip to content

Instantly share code, notes, and snippets.

@loktar00
Created June 7, 2012 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loktar00/2885774 to your computer and use it in GitHub Desktop.
Save loktar00/2885774 to your computer and use it in GitHub Desktop.
metaball part 2
var grad = tempCtx.createRadialGradient(point.x, point.y, 1, point.x, point.y, point.size);
tempCtx.beginPath();
grad.addColorStop(0, 'rgba(' + colors.r +',' + colors.g + ',' + colors.b + ',1)');
grad.addColorStop(1, 'rgba(' + colors.r +',' + colors.g + ',' + colors.b + ',0)');
tempCtx.fillStyle = grad;
tempCtx.arc(point.x, point.y, point.size, 0, Math.PI*2);
tempCtx.fill();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment