Skip to content

Instantly share code, notes, and snippets.

@mattseymour
Created October 3, 2015 16:28
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 mattseymour/31ea79bd37a8319bb3f9 to your computer and use it in GitHub Desktop.
Save mattseymour/31ea79bd37a8319bb3f9 to your computer and use it in GitHub Desktop.
HTML canvas cloud
canvas = document.getElementById('cloud');
var ctx = cloud.getContext("2d");
ctx.beginPath();
// left
ctx.arc(40,65,40,0,2*Math.PI)
ctx.fillStyle = "rgb(255,255,255)";
ctx.fill();
// center
ctx.arc(110,50,50,0,2*Math.PI)
ctx.fillStyle = "rgb(255,255,255)";
ctx.fill();
// rights
ctx.arc(170,65,40,0,2*Math.PI)
ctx.fillStyle = "rgb(255,255,255)";
ctx.fill();
ctx.fillStyle = "rgba(255, 255, 255)";
ctx.fillRect (45, 35, 120, 70);
ctx.fill();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment