linuxenko / gixi

HTML5 canvas based GitHub identicons like pixel/avatar images generator library. Available as jquery plugin, commonjs or es6 library or even directly work with it from vanillaJS.

Home Page:http://www.linuxenko.pro/showcase/gixi/jquery-example.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 using npm

npm install gixi

Installation using bower

bower install gixi

Using CDN

<script src="https://unpkg.com/gixi@0.0.1/dist/gixi-min.js"></script>

Or download this one 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 into your dom element
   */

  var element = document.getElementById('gixie');

  element.setAttribute('src', imageData);

Browserify, Webpack

var GIXI = require('gixi');

License

MIT

Copyright (c) 2014 Svetlana Linuxenko

About

HTML5 canvas based GitHub identicons like pixel/avatar images generator library. Available as jquery plugin, commonjs or es6 library or even directly work with it from vanillaJS.

http://www.linuxenko.pro/showcase/gixi/jquery-example.html

License:MIT License


Languages

Language:JavaScript 100.0%