var

instance

=

new

Pixelator

({

target

:

document

.

querySelector

(

'img'

),

width

:

600

,

height

:

338

,

size

:

30

// You can also change this using the `setSize()` method

});

// You can call pixelate as often as you like, for each frame in a video

// or perhaps while changing the pixel size for some sweet effects.

instance

.

pixelate

();

// The canvas with all that awesome pixelation is stored in instance.el.

$

(

document

.

body

).

append

(

instance

.

el

);