3 ms·
This is very much less romantic: function drawHeart(ctx, x, y) { x += 100; y += 100; ctx.beginPath(); ctx.moveTo(x, y);
by gulbrandr 13y ago
This is very much less romantic:
function drawHeart(ctx, x, y) {
x += 100;
y += 100;
ctx.beginPath();
ctx.moveTo(x, y);
ctx.quadraticCurveTo(x + 30, y + 60, x + 80, y + 100);
ctx.quadraticCurveTo(x + 130, y + 60, x + 160, y);
ctx.bezierCurveTo (x + 200, y - 75, x + 100, y - 90, x + 80, y - 20);
ctx.bezierCurveTo (x + 60, y - 90, x - 40, y - 75, x, y);
ctx.fill();
ctx.closePath();
}
Good job by the way!