Skip to content

danielgjackson/sprite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sprite Generator

This is an 8-bit pixel art style sprite generator, suitable for avatars.

This is an entirely JavaScript implementation based on the techniques used by Lj V. Miranda for the Python/Seagull/Matplotlib-based: Sprites-as-a-Service. As such, this version may be easily run client- or server-side.

See also:

Usage

Import the module:

import Sprite from './sprite.mjs'

Generate a .bmp image data for a sprite:

// Generate .bmp data for a sprite
const spriteData = Sprite.generate(seed).magnify(12).asBitmapData();

Generate a data: URI for a sprite:

// Generate a data: uri for a sprite
const spriteUri = Sprite.generate(seed).asDataUri();

When magnifying pixel art, use the CSS:

img {
  image-rendering: pixelated;
}

About

JavaScript 8-bit pixel sprite generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published