gixi
v0.0.6
Published
Github identicons like images generator
Downloads
645
Readme
GIXI
HTML5 canvas based GitHub identicons like pixel/avatar images generator library. Available as jquery plugin, es6 or vanillaJS.
Using jQuery library demo VanillaJS demo CodePen live demo
Installation
Installation via npm
npm install gixi
Installation via bower
bower install gixi
Using CDN
<script src="https://npmcdn.com/[email protected]/dist/gixi-min.js"></script>
Or download it from current release gixi-min.js 2.96Kb
Usage
Make identicons using jQuery
- Download and install gixi-min.js library
- Use following code to invoke gixification of your dom elements
$('.avatar-element').gixi();
// or using custom colors
var color = "#000";
$('.avatar-element').gixi(color);
Make identicons without jQuery
- Download and install gixi-min.js library
- Use following code to invoke gixification of your dom elements
/*
* Generate gixi image for size of 300
*/
var imageSize = 300;
var imageData = new GIXI(imageSize).getImage();
/*
* Then place it to your dom element
*/
var element = document.getElementById('gixie');
element.setAttribute('src', imageData);
License
Copyright (c) 2016 Svetlana Linuxenko