@dicebear/avatars-jdenticon-sprites
Advanced tools
Comparing version 4.4.1 to 4.5.0
{ | ||
"name": "@dicebear/avatars-jdenticon-sprites", | ||
"version": "4.4.1", | ||
"version": "4.5.0", | ||
"description": "Jdenticon sprite collection for DiceBear Avatars", | ||
@@ -37,3 +37,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@dicebear/avatars": "^4.4.1" | ||
"@dicebear/avatars": "^4.5.0" | ||
}, | ||
@@ -47,3 +47,3 @@ "files": [ | ||
}, | ||
"gitHead": "4ab5c14eccea0dd919eb543feecf6ed9d3563740" | ||
"gitHead": "707740b414e0407b660a35976d9ceaa9d3d09854" | ||
} |
@@ -1,74 +0,23 @@ | ||
![DiceBear Avatars - Jdenticon Sprite Collection](https://raw.githubusercontent.com/DiceBear/avatars/v4/packages/avatars-jdenticon-sprites/banner.svg?sanitize=true) | ||
<h1 align="center"><img src="https://avatars.dicebear.com/api/jdenticon/1.svg" width="124" /> <br />jdenticon</h1> | ||
<p align="center"> | ||
<strong>Avatar Style for <a href="https://avatars.dicebear.com/">DiceBear Avatars</a>.</strong><br /> | ||
<a href="https://github.com/dmester/jdenticon">Jdenticon</a> wrapper for DiceBear Avatars. | ||
</p> | ||
![license](https://img.shields.io/npm/l/@dicebear/avatars-jdenticon-sprites.svg?style=flat-square) | ||
[![npm](https://img.shields.io/npm/v/@dicebear/avatars-jdenticon-sprites.svg?style=flat-square)](https://www.npmjs.com/package/@dicebear/avatars-jdenticon-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-jdenticon-sprites" target="_blank-sprites"> | ||
<img src="https://img.shields.io/npm/v/@dicebear/avatars-jdenticon-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> | ||
[Jdenticon](https://github.com/dmester/jdenticon) wrapper for DiceBear Avatars. | ||
<p> | ||
<img src="https://avatars.dicebear.com/api/jdenticon/1.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/jdenticon/2.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/jdenticon/3.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/jdenticon/4.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/jdenticon/5.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/jdenticon/6.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/jdenticon/7.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/jdenticon/8.svg" width="60" /> | ||
<img src="https://avatars.dicebear.com/api/jdenticon/9.svg" width="60" /> | ||
<p align="center"> | ||
<a href="https://avatars.dicebear.com/styles/jdenticon"> | ||
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/jdenticon/: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/jdenticon/example.svg" width="60" /> | https://avatars.dicebear.com/api/jdenticon/example.svg | | ||
| <img src="https://avatars.dicebear.com/api/jdenticon/example.svg?options[padding]=0.05&options[background]=%23f0f0f0" width="60" /> | https://avatars.dicebear.com/api/jdenticon/example.svg?options[padding]=0.05&options[background]=%23f0f0f0 | | ||
### NPM | ||
Install the Avatars and this sprite collection with the following command. | ||
npm install --save @dicebear/avatars @dicebear/avatars-jdenticon-sprites | ||
Now you are ready to create your first Avatar. | ||
```js | ||
import Avatars from '@dicebear/avatars'; | ||
import sprites from '@dicebear/avatars-jdenticon-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** | | ||
| hues | | array of numbers between 0 and 360 | `null` | Icon hue | | ||
| colorLightness | | array of two numbers between 0 and 1 | `null` | Colored shapes - Lightness | | ||
| grayscaleLightness | | array of two numbers between 0 and 1 | `null` | Grayscale shapes - Lightness | | ||
| colorSaturation | | number between 0 and 1 | `null` | Colored shapes - Saturation | | ||
| grayscaleSaturation | | number between 0 and 1 | `null` | Grayscale shapes - Saturation | | ||
## 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
5063
24