3 ms·
This is a fun thing to do. A couple years ago on Valentine's Day I learned a little Canvas to make this for my wife: http://oinksoft.com/valentines-day/ http://
by oinksoft 13y ago
This is a fun thing to do. A couple years ago on Valentine's Day I learned a little Canvas to make this for my wife: http://oinksoft.com/valentines-day/ http://oinksoft.com/valentines-day/
- angersock 13y agoThat's really sweet. :3
- gulbrandr 13y agoThis 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!