Skip to content

Latest commit

 

History

History
95 lines (69 loc) · 1.95 KB

README.md

File metadata and controls

95 lines (69 loc) · 1.95 KB

PIXI Filters

Build Status

Include optional filters that work with Pixi.js v4.

Filters include:

  • AsciiFilter pixi-filters/bin/ascii
  • BloomFilter pixi-filters/bin/bloom
  • ConvolutionFilter pixi-filters/bin/convolution
  • CrossHatchFilter pixi-filters/bin/crosshatch
  • DotFilter pixi-filters/bin/dot
  • EmbossFilter pixi-filters/bin/emboss
  • PixelateFilter pixi-filters/bin/pixelate
  • RGBSplitFilter pixi-filters/bin/rgb
  • ShockwaveFilter pixi-filters/bin/shockwave
  • TiltShiftFilter pixi-filters/bin/tiltshift
  • TwistFilter pixi-filters/bin/twist

Examples

Click here for filter demos.

Installation

Using NPM:

npm install pixi-filters

Use Bower:

bower install pixi-filters

Usage

Browser

<script src="pixi.js/bin/pixi.js"></script>
<script src="pixi-filters/bin/filters.js"></script>
var filter = new PIXI.filters.AsciiFilter();

Individual Filter

<script src="pixi.js/bin/pixi.js"></script>
<script src="pixi-filters/bin/dot.js"></script>
var filter = new PIXI.filters.DotFilter();

NodeJS

// Include library by requiring pixi-filters module
var filters = require('pixi-filters');
var filter = new filters.DotFilter();

// Alternatively, using PIXI.filters global object
require('pixi-filters');
var filter = new PIXI.filters.DotFilter();

Individual Filter

// Using a single filter
var AsciiFilter = require('pixi-filters/bin/ascii');
var filter = new AsciiFilter();

Rebuilding

Make sure you run NPM install to get the build dependencies.

npm install

Run the build command to build all filters.

npm run build

Documentation

API documention can be found here.