var core = require('../../core'); /** * This applies a sepia effect to your Display Objects. * * @class * @extends AbstractFilter * @namespace PIXI.filters */ function SepiaFilter() { core.AbstractFilter.call(this, // vertex shader null, // fragment shader require('fs').readFileSync(__dirname + '/sepia.frag', 'utf8'), // custom uniforms { sepia: { type: '1f', value: 1 } } ); } SepiaFilter.prototype = Object.create(core.AbstractFilter.prototype); SepiaFilter.prototype.constructor = SepiaFilter; module.exports = SepiaFilter; Object.defineProperties(SepiaFilter.prototype, { /** * The strength of the sepia. `1` will apply the full sepia effect, and * `0` will make the object its normal color. * * @member {number} * @memberof SepiaFilter# */ sepia: { get: function () { return this.uniforms.sepia.value; }, set: function (value) { this.uniforms.sepia.value = value; } } });