This Gist was automatically created by Carbide, a free online programming environment.
You can view a live, interactive version of this Gist here.(http://alpha.trycarbide.com/anonymous/793755fefd12d70a90ef5d535227b450).
var canvas = document.createElement('canvas'), ///This is a piece of code to draw a smily face | |
ctx = canvas.getContext('2d') | |
function circle(x, y, r){ | |
ctx.beginPath() | |
ctx.arc(x, y, r, 0, 2 * Math.PI) | |
ctx.stroke() | |
} | |
function mouth(theta){ | |
ctx.beginPath() | |
ctx.arc(79, 75, 40, theta, Math.PI - theta) | |
ctx.stroke() | |
} | |
circle(72, 75, 62) | |
circle(49, 63, 12) | |
circle(100, 63, 12) | |
mouth(0.8125) | |
console.log('out') |
This Gist was automatically created by Carbide, a free online programming environment.
You can view a live, interactive version of this Gist here.(http://alpha.trycarbide.com/anonymous/793755fefd12d70a90ef5d535227b450).