Random Pixel Avatar/Image Generator With jQuery and Canvas - gixi

Random Pixel Avatar/Image Generator With jQuery and Canvas - gixi
File Size: 12.8 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

gixi is a small JavaScript library for jQuery that utilizes Canvas 2D API to draw random pixel images / avatars as you seen on Github.com. It also can be implemented as a standalone JavaScript plugin without any dependencies.

How to use it:

1. First you need to include the jQuery gixi plugin after jQuery JavaScript library like this:

<script src="//code.jquery.com/jquery-2.2.1.min.js"></script>
<script src="dist/gixi-min.js"></script>

2. Create an empty container for the pixel image / avatar.

<div class="gixi"></div>

3. Just call the function on the container element and you're done.

$('.gixi').gixi();

4. Implement as a JavaScript plugin.

<div class="gixies">
  <img id="gixie" alt="gixie" width="300" height="300" />
</div>
var element = document.getElementById('gixie');
var imageData = new GIXI(300).getImage();

element.setAttribute('src', imageData);

Change log:

2016-03-13

  • web and node module

This awesome jQuery plugin is developed by linuxenko. For more Advanced Usages, please check the demo page or visit the official website.