Image-scramble
Scramble/Unscramble Images
Very useful for protect canvas spritesheets.
Example
Scramble (Server-Side)
Unscramble (Client-Side)
Usage Example
var imgScramble = ;
Options
image
- Path to image source Or Valid Buffer
seed
- Seed to shuffle in same sequence
sliceSize
- size of each slice
dest
- Destination of scrambled image
buffer
- Return image as buffer
Installation
npm install image-scramble
UnsrcambleImg (Client-Side)
Installation
bower install unscramble-img
Usage
// unscrambleImg(src,sliceSize,seed) var canvas = ;
Phaser Example
var bmp = ;var sprite = gameadd;