A jigsaw puzzle generator for HTMLCanvas
This library is still unstable.
generatePuzzle(image, rows, columns)
returns an array of rows
Xcolumns
puzzle pieces based off image
.
yarn install
- Make sure you're at the
jigsaw-canvas
root directory npx live-server --host=localhost
- Navigate to
localhost:<port>/multiplayer-demo/client
in the browser.<port>
is whatever thelive-server
is running on, e.g8080
cd multiplayer-demo/server
npx nodemon server.js
Open another browser with the same url and you should see real time sync when moving pieces.