This is a TypeScript implementation of Sprator (original is C++).
Sprator is a npm package to generate sprites using cellular automaton. Generated sprites is given as Buffer object in Node.js.
This image is from original Sprator repo.
You can install this package via npm.
npm install sprator
Node.js v10 or higher.
This package includes simple server using express. You can use it locally by following command.
npm start
Then the server is on http://localhost:3000
The server responds to GET request with any URL and accepts by following queries.
Random string represents seed of generation.
Default: empty string
Number of dots in an edge. 6 or more (must be even)
Default: 10
Numbrer of pixels in a dot. e.g. If dot=10 and ppd=4, the image pattern size is 40x40, and output image size is 64x64 (includes 12px margin).
Default: 10
Fill color can be used on the Canvas.
You must encode
#
(%23
) on URL.
Default: #228b22
Border color can be used on the Canvas.
Default: #2f4f4f
Background color can be used on the Canvas.
Default: #000000
Sprator is licensed under the MIT license. See the LICENSE for more information.