gixi

0.0.6 • Public • Published

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/gixi@0.0.1/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

Readme

Keywords

none

Package Sidebar

Install

npm i gixi

Weekly Downloads

139

Version

0.0.6

License

none

Last publish

Collaborators

  • linuxenko