0.0.1 • Published 6 years ago

imgpixels v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

imgpixels

A small library to make pixels like square from an image into number of img tags

DEMO

Info

Use small width and height, with larger squares, as tags are created based on the sizes, larger square size, lesser img tags and will maintain proper performance

Install

  npm: npm install imgpixels --save
  git: just manually download imgpixels.min.js

Usage

  npm: import ImgPixels from 'imgpixels'
  script: just add imgpixels.min.js to the body

Call

  new ImgPixels(options).makePixels()

Options

OptionDefaultComment
widthMul18Width of the image, it should be multiplication of the square width
heightMul25Height of the image, it should be multiplication of the square width
src' 'Source of the image
sqrWidth30Pixel square width
parentContainerId"dataImage"A container is needed to be set, ID to be provied in the options"
functionemptyCall back function for settings animations or other stuffs

License

MIT