sprator
8bit sprite generator invented by torin
Last updated 4 months ago by teramotodaiki .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install sprator 
SYNC missed versions from official npm registry.

Sprator

npm latest version semantic-release

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.

Installation

You can install this package via npm.

npm install sprator

Requirement

Node.js v10 or higher.

Sprator Server

Deploy

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.

Query

Example

e.g. http://localhost:3000?seed=1d14f&dot=8&ppd=8&fill=palegreen&border=forestgreen&background=rgba(128,128,128,0.8)

https://sprator.herokuapp.com/?seed=1d14c&dot=8&ppd=8&fill=palegreen&border=darkolivegreen&background=rgba(225,225,225,0.8)

seed

Random string represents seed of generation.

Default: empty string

dot

Number of dots in an edge. 6 or more (must be even)

Default: 10

ppd

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

Fill color can be used on the Canvas.

You must encode # (%23) on URL.

Default: #228b22

border

Border color can be used on the Canvas.

Default: #2f4f4f

background

Background color can be used on the Canvas.

Default: #000000

Usage

以前作ったアイコン生成ソフトをリメイクした - 屋根裏

License

Sprator is licensed under the MIT license. See the LICENSE for more information.

Current Tags

  • 0.1.8                                ...           latest (4 months ago)

5 Versions

  • 0.1.8                                ...           4 months ago
  • 0.1.7                                ...           6 months ago
  • 0.1.6                                ...           6 months ago
  • 0.1.5                                ...           6 months ago
  • 0.0.1                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |