Shatter.js provides simple image shattering by dividing a given image with a Voronoi diagram.
Get dependencies: $ bower install && npm install
This will install d3.js (required for Voronoi generation) and smash (to build custom d3.js with Voronoi specific functions only).
Build with grunt. $ grunt build
This will create three files in ./build:
- d3voronoi.js: d3 built specifically for voronoi generation
- shatter.js: Includes Shatter and d3voronoi.js
- shatter.min.js: Minified shatter.js.
Workin on it.
Still working on this. See phaser-shatter.html in ./examples