Skip to content

Commit

Permalink
Update changelog, readme and bump to 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bsudekum committed Sep 3, 2015
1 parent 498bf78 commit 9d98ae2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# 3.0.0

- Changes the `generateLayout` function to be asynchronous.

# 2.2.1

- No longer throws an error if `generateImage()` is supplied with empty list.

# 2.0.0

In the second major version, spritezero makes a big pivot: instead of
- In the second major version, spritezero makes a big pivot: instead of
positioning and compositing raster sprites, it receives and composites vector
sprites composed of SVG data.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@ rather than on disk. Also, since version 2.0, spritezero generates sprites
based on SVG graphics alone, therefore making it possible to support @2x
and higher-dpi sprites from the same source.

### `generateLayout(imgs, format)`
### `generateLayout(imgs, ratio, format, callback)`

Pack a list of images with width and height into a sprite layout.
Uses bin-pack.

### Parameters

| parameter | type | description |
| --------- | ----------------- | ------------------------------------------------------------- |
| `imgs` | Array\.\<Object\> | array of `{ svg: Buffer, id: String }` |
| parameter | type | description |
| ---------- | ----------------- | ------------------------------------------------------------- |
| `imgs` | Array\.\<Object\> | array of `{ svg: Buffer, id: String }` |
| `scale` | number | pixel scale. default is 1, retina is 2 |
| `format` | boolean | format this layout for mapbox gl |
| `format` | boolean | format this layout for mapbox gl |
| `callback` | function | returns two arguments, `err` and `layout` |



Expand Down Expand Up @@ -54,5 +55,3 @@ $ npm install spritezero
```sh
$ npm test
```


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spritezero",
"version": "2.2.1",
"version": "3.0.0",
"description": "small opinionated sprites",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 9d98ae2

Please sign in to comment.