jigsaw-canvas
v0.2.0
Published
A jigsaw piece generator for use with canvas
Downloads
4
Readme
jigsaw-canvas
A jigsaw puzzle generator for HTMLCanvas
This library is still unstable.
API
generatePuzzle(image, rows, columns)
returns an array of rows
Xcolumns
puzzle pieces based off image
.
Demo
Multiplayer Demo (Local Build)
Install
yarn install
Start client server
- 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
Start backend server
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.