How to create jigsaw puzzle from an image using javascript(拼图引擎)

翁鸿远
2023-12-01

How to create jigsaw puzzle from an image using javascript



here are several pieces to this puzzle. :)

The first piece is SVG and its Canvas. That's what you'll need to draw, because otherwise you can't make a curved piece out of a picture. Only rectangles are possible with standard HTML/CSS.

The second piece is an algorithm for generating jigsaw pieces from the picture. Google should help you with that if you can't figure one out by yourself (though it doesn't seem very complicated).

The rest should be straightforward.

Added: A quick Google search gave just such a jigsaw engine in the first result. Check out the source of that.



See also:


http://howto.nicubunu.ro/gimp_jigsaw_puzzle/

http://stackoverflow.com/questions/2755389/how-to-create-jigsaw-image-puzzle-using-c

 类似资料: