- Clone the project
- Go to the project root directory
- Run
npm install
Run npm run start:dev to start the webpack dev server for demostration of the game
Run npm run build-demo to build the demo in dist folder
Run npm run build which will create PicturePuzzle.js file in dist folder.
Create an PicturePuzzle class instance in your javascript file
const puzzle = new PicturePuzzle(htmlDomElement, imageSourceUrl, canvasWidth, dimmension = 3);
// To listen to an event when game is finished
puzzle.onFinished = function(){
// Show finish dialog
};