0.0.6 • Published 8 years ago

gixi v0.0.6

Weekly downloads
20
License
-
Repository
-
Last release
8 years ago

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

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago