Skip to content
This repository has been archived by the owner on Nov 12, 2020. It is now read-only.

x64onl/jquery-pixelate.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery-pixelate.js

Extensible jQuery plugin for pixelating images.

Getting Started

Include jQuery and pixelate.js:

<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="assets/js/pixelate.js"></script>

Apply the pixelate() function to selected elements like so:

$(window).on("load", function() {
    $('.pixelate').pixelate();
});

Options

  • focus takes a value from 0 to 1 where the pixel density becomes larger as focus approaches 0. Default value: 0.5.
  • canvasID takes a string which designates the ID to be applied to the generated canvas element. Default value: pixelateCanvas.

Overrides

Options can be overridden like so:

$(window).on("load", function() {
    $('.pixelate').pixelate({
        'focus': 0.75,
        'canvasID': "newCanvasID"
    });
});

Credit

Groundwork by jmduke.

License

MIT License

About

An extensible jQuery plugin for pixelating images.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published