let vangogh = new Image();
vangogh.src = 'static/vangogh.jpg';
const background = new headbreaker.Canvas('background-canvas', {
pieceSize: 100, proximity: 20,
borderFill: 10, strokeWidth: 2,
lineSoftness: 0.12, image: vangogh,
// optional, but it must be set in order to activate image scaling
maxPiecesCount: {x: 5, y: 5}
background.adjustImagesToPuzzleHeight();
metadata: { id: 'a', targetPosition: { x: 100, y: 100 } },
metadata: { id: 'b', targetPosition: { x: 200, y: 100 } },
metadata: { id: 'y', targetPosition: { x: 500, y: 500 },
currentPosition: { x: 570, y: 560 } }