@dicebear/avatars-human-sprites
Advanced tools
Comparing version 4.4.1 to 4.5.0
{ | ||
"name": "@dicebear/avatars-human-sprites", | ||
"version": "4.4.1", | ||
"version": "4.5.0", | ||
"description": "Pixel art human sprite collection for DiceBear Avatars", | ||
@@ -34,4 +34,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@dicebear/avatars-female-sprites": "^4.4.1", | ||
"@dicebear/avatars-male-sprites": "^4.4.1" | ||
"@dicebear/avatars-female-sprites": "^4.5.0", | ||
"@dicebear/avatars-male-sprites": "^4.5.0" | ||
}, | ||
@@ -42,3 +42,3 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@dicebear/avatars": "^4.4.1" | ||
"@dicebear/avatars": "^4.5.0" | ||
}, | ||
@@ -52,3 +52,3 @@ "files": [ | ||
}, | ||
"gitHead": "4ab5c14eccea0dd919eb543feecf6ed9d3563740" | ||
"gitHead": "707740b414e0407b660a35976d9ceaa9d3d09854" | ||
} |
@@ -1,71 +0,23 @@ | ||
![DiceBear Avatars - Human Sprite Collection](https://raw.githubusercontent.com/DiceBear/avatars/v4/packages/avatars-human-sprites/banner.svg?sanitize=true) | ||
<h1 align="center"><img src="https://avatars.dicebear.com/api/human/1.svg" width="124" /> <br />human</h1> | ||
<p align="center"> | ||
<strong>Avatar Style for <a href="https://avatars.dicebear.com/">DiceBear Avatars</a>.</strong><br /> | ||
Designed by <a href="https://github.com/FlorianKoerner">Florian Körner</a>. Heavy inspired by <a href="https://github.com/matveyco/8biticon">8biticon</a>. | ||
</p> | ||
![license](https://img.shields.io/npm/l/@dicebear/avatars-human-sprites.svg?style=flat-square) | ||
[![npm](https://img.shields.io/npm/v/@dicebear/avatars-human-sprites.svg?style=flat-square)](https://www.npmjs.com/package/@dicebear/avatars-human-sprites) | ||
<p align="center"> | ||
<a href="https://github.com/dicebear/avatars/blob/master/LICENSE" target="_blank"> | ||
<img src="https://img.shields.io/github/license/dicebear/avatars.svg?style=flat-square" alt="License"> | ||
</a> | ||
<a href="https://www.npmjs.com/package/@dicebear/avatars-human-sprites" target="_blank-sprites"> | ||
<img src="https://img.shields.io/npm/v/@dicebear/avatars-human-sprites.svg?style=flat-square" alt="Latest Version"> | ||
</a> | ||
<a href="https://github.com/dicebear/avatars/stargazers" target="_blank"> | ||
<img src="https://img.shields.io/github/stars/dicebear/avatars?style=flat-square" alt="Stargazers"> | ||
</a> | ||
</p> | ||
This Sprite Collection combines the Sprite Collections [male](https://www.npmjs.com/package/@dicebear/avatars-male-sprites) and [female](https://www.npmjs.com/package/@dicebear/avatars-female-sprites) and selects the gender randomly. | ||
<p> | ||
<img src="https://avatars.dicebear.com/api/human/1.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/human/2.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/human/3.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/human/4.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/human/5.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/human/6.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/human/7.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/human/8.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/human/9.svg" width="60" /> | ||
<p align="center"> | ||
<a href="https://avatars.dicebear.com/styles/human"> | ||
Read Documentation | ||
</a> | ||
</p> | ||
## Usage | ||
### HTTP-API (recommended) | ||
Our free HTTP-API is the easiest way to use this sprite collection. Just use the following URL as image source. | ||
https://avatars.dicebear.com/api/human/:seed.svg | ||
The value of `:seed` can be anything you like - but **don't** use any sensitive or personal data here! The GET parameter | ||
`options` can be used to pass [options](#options). | ||
#### Examples | ||
| preview | url | | ||
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | ||
| <img src="https://avatars.dicebear.com/api/human/example.svg" width="60" /> | https://avatars.dicebear.com/api/human/example.svg | | ||
| <img src="https://avatars.dicebear.com/api/human/example.svg?options[mood][]=happy" width="60" /> | https://avatars.dicebear.com/api/human/example.svg?options[mood][]=happy | | ||
| <img src="https://avatars.dicebear.com/api/human/example.svg?options[mood][]=sad" width="60" /> | https://avatars.dicebear.com/api/human/example.svg?options[mood][]=sad | | ||
### NPM | ||
Install the Avatars and this sprite collection with the following command. | ||
npm install --save @dicebear/avatars @dicebear/avatars-human-sprites | ||
Now you are ready to create your first Avatar. | ||
```js | ||
import Avatars from '@dicebear/avatars'; | ||
import sprites from '@dicebear/avatars-human-sprites'; | ||
let options = {}; | ||
let avatars = new Avatars(sprites, options); | ||
let svg = avatars.create('custom-seed'); | ||
``` | ||
## Options | ||
| name | alias | type | default | description | | ||
| ---------- | ----- | ---------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| radius | r | number | `0` | Avatar border radius | | ||
| base64 | | bool | `false` | Return avatar as base64 data uri instead of XML <br> **Not supported by the HTTP API** | | ||
| width | w | number | `null` | Fixed width | | ||
| height | h | number | `null` | Fixed height | | ||
| margin | m | number | `0` | Avatar margin in percent<br> **HTTP-API limitation** Max value `25` | | ||
| background | b | string | `null` | Any valid color identifier<br> **HTTP-API limitation** Only hex _(3-digit, 6-digit and 8-digit)_ values are allowed. Use url encoded hash: `%23`. | | ||
| userAgent | | string | `window.navigator.userAgent` | User-Agent for legacy browser fallback<br> **Automatically detected by the HTTP API** | | ||
| mood | | array of strings | `['happy', 'sad', 'surprised']` | Possible values: `sad`, `happy`, `surprised` | | ||
## Further information | ||
You can find the DiceBear Avatars documentation at [avatars.dicebear.com](https://avatars.dicebear.com) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4702
24