why after a successful assembly of the puzzle, the puzzle moves out of the scope? #56
Replies: 1 comment
-
I'm sorry, but I found what was mistake |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, after successfully completing the puzzle and initializing it, the puzzle itself is shifted some distance from the edge of the canvas, why is this happening?
`const image = new Image();
image.src = 'path/to/image.jpg';
image.onload = () => {
const background = new headbreaker.Canvas("puzzle", {
width: 800,
height: 600,
pieceSize: {
x: 200,
y: 200,
},
proximity: 20,
borderFill: 0,
strokeWidth: 0.5,
lineSoftness: 0.5,
image: image,
maxPiecesCount: { x: 4, y: 3 },
painter: new headbreaker.painters.Konva(),
preventOffstageDrag: true,
fixed: true,
outline: new headbreaker.outline.Rounded(),
});
};`
Beta Was this translation helpful? Give feedback.
All reactions