1.2.0 • Published 6 years ago

hs-deck-imager v1.2.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Hearthstone Deck Imager

Convert Hearthstone deckstrings into images similar to what would be displayed in Hearthstone.

Installation

Simply run npm install --save hs-deck-imager

The installation includes all necessary fonts, card tiles, and the latest version of cards.collectible.json.

Usage

After importing the module, using imageFromDeckstring will generate an image file given a deckstring and destination file path.

For example,

const DeckImager = require('hs-deck-imager');

const imgPath = 'example.jpg';

let resultPath = DeckImager.imageFromDeckstring(
  'AAECAaIHBLICrwTtBYHCAg20AYwCzQO9BJsFiAekB90Ihgn1uwLrwgLc0QLb4wIA',
  imgPath
);

if(imgPath !== resultPath){
  // an error occurred; handle as you like
}

This will created an image at the given path. For the above command, the following output was generated: Example Deck Output

Acknowledgements

Thanks to HearthSim for the card tiles and json data.

1.2.0

6 years ago

1.1.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago