Hearts
Download (cdnjs)
// Import jQuery and core jCanvas library firstimport $ from 'jquery';import 'jcanvas';
// UMD importimport 'jcanvas/dist/umd/jcanvas-hearts.min.js';
// ESM importimport 'jcanvas/dist/esm/jcanvas-hearts.min.js';
This plugin is a more complete version of the custom drawHeart()
method in the documentation, which supports layer events and transformations.
$('canvas').drawHeart({ layer: true, draggable: true, name: 'heart', fillStyle: '#f6c', x: 160, y: 100, size: 140, rotate: 30});