1.0.3 • Published 6 years ago

awesome-sprite v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

Awesome Sprite

Install

npm install --save awesome-sprite

Usage

import AwesomeSprite from 'awesome-sprite';
const aSprite = new AwesomeSprite(width, height, blockSize, container);
  • width: width of the screen (default = 64)
  • height: height of the screen (default = 32)
  • blockSize: size of the pixel;
  • container: JS element where the screen is going to be printed.
aSprite.initialize(); // initialize and prints the sprite screen insinde the container element
aSprite.writeFB(xCoord, yCoord, bytesArray); // writes a sprite in a given coordinate aSprite.writeFB(1, 2, [0b11001100, 0b10101010]);
aSprite.clearFB(); // clears the screen
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago