jigsaw-canvas

0.2.0 • Public • Published

jigsaw-canvas

A jigsaw puzzle generator for HTMLCanvas

This library is still unstable.

API

generatePuzzle(image, rows, columns) returns an array of rowsXcolumns puzzle pieces based off image.

Demo

Demo

Multiplayer Demo (Local Build)

Install

  1. yarn install

Start client server

  1. Make sure you're at the jigsaw-canvas root directory
  2. npx live-server --host=localhost
  3. Navigate to localhost:<port>/multiplayer-demo/client in the browser. <port> is whatever the live-server is running on, e.g 8080

Start backend server

  1. cd multiplayer-demo/server
  2. npx nodemon server.js

Open another browser with the same url and you should see real time sync when moving pieces.

Readme

Keywords

none

Package Sidebar

Install

npm i jigsaw-canvas

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

24.5 kB

Total Files

12

Last publish

Collaborators

  • ygongdev