Giter Club home page Giter Club logo

filters's Introduction

PixiJS Filters

Node.js CI npm version

Compatibility

Depending on your version of PixiJS, you'll need to figure out which major version of PixiJS Filters to use.

PixiJS PixiJS Filters
v5.x v3.x
v6.x v4.x
v7.x v5.x
v8.x v6.x

Installation

Installation is available using NPM:

npm install pixi-filters

Alternatively, you can use a CDN such as JSDelivr:

<script src="https://cdn.jsdelivr.net/npm/pixi-filters@latest/dist/browser/pixi-filters.min.js"></script>

If all else failes, you can manually download the bundled file from the releases section and include it in your project.

Demo

View the PixiJS Filters Demo to interactively play with filters to see how they work.

Filters

Filter Preview
AdjustmentFilter
pixi-filters/adjustment
View demo
adjustment
AdvancedBloomFilter
pixi-filters/advanced-bloom
View demo
advanced-bloom
AsciiFilter
pixi-filters/ascii
View demo
ascii
BackdropBlurFilter
pixi-filters/backdrop-blur
View demo
backdrop-blur
BevelFilter
pixi-filters/bevel
View demo
bevel
BloomFilter
pixi-filters/bloom
View demo
bloom
BulgePinchFilter
pixi-filters/bulge-pinch
View demo
bulge-pinch
ColorGradientFilter
pixi-filters/color-gradient
View demo
color-gradient
ColorMapFilter
pixi-filters/color-map
View demo
color-map
ColorOverlayFilter
pixi-filters/color-overlay
View demo
color-overlay
ColorReplaceFilter
pixi-filters/color-replace
View demo
color-replace
ConvolutionFilter
pixi-filters/convolution
View demo
convolution
CrossHatchFilter
pixi-filters/cross-hatch
View demo
cross-hatch
CRTFilter
pixi-filters/crt
View demo
crt
DotFilter
pixi-filters/dot
View demo
dot
DropShadowFilter
pixi-filters/drop-shadow
View demo
drop-shadow
EmbossFilter
pixi-filters/emboss
View demo
emboss
GlitchFilter
pixi-filters/glitch
View demo
glitch
GlowFilter
pixi-filters/glow
View demo
glow
GodrayFilter
pixi-filters/godray
View demo
godray
GrayscaleFilter
pixi-filters/grayscale
View demo
grayscale
HslAdjustmentFilter
pixi-filters/hsl-adjustment
View demo
hsl-adjustment
KawaseBlurFilter
pixi-filters/kawase-blur
View demo
kawase-blur
MotionBlurFilter
pixi-filters/motion-blur
View demo
motion-blur
MultiColorReplaceFilter
pixi-filters/multi-color-replace
View demo
multi-color-replace
OldFilmFilter
pixi-filters/old-film
View demo
old-film
OutlineFilter
pixi-filters/outline
View demo
outline
PixelateFilter
pixi-filters/pixelate
View demo
pixelate
RadialBlurFilter
pixi-filters/radial-blur
View demo
radial-blur
ReflectionFilter
pixi-filters/reflection
View demo
reflection
RGBSplitFilter
pixi-filters/rgb-split
View demo
rgb split
ShockwaveFilter
pixi-filters/shockwave
View demo
shockwave
SimpleLightmapFilter
pixi-filters/simple-lightmap
View demo
simple-lightmap
TiltShiftFilter
pixi-filters/tilt-shift
View demo
tilt-shift
TwistFilter
pixi-filters/twist
View demo
twist
ZoomBlurFilter
pixi-filters/zoom-blur
View demo
zoom-blur

Built-In Filters

PixiJS has a handful of core filters that are built-in to the PixiJS library.

Filter Preview
AlphaFilter
View demo
alpha
BlurFilter
View demo
blur
ColorMatrixFilter (contrast)
View demo
color-matrix-contrast
ColorMatrixFilter (desaturate)
View demo
color-matrix-desaturate
ColorMatrixFilter (kodachrome)
View demo
color-matrix-kodachrome
ColorMatrixFilter (lsd)
View demo
color-matrix-lsd
ColorMatrixFilter (negative)
View demo
color-matrix-negative
ColorMatrixFilter (polaroid)
View demo
color-matrix-polaroid
ColorMatrixFilter (predator)
View demo
color-matrix-predator
ColorMatrixFilter (saturate)
View demo
color-matrix-saturate
ColorMatrixFilter (sepia)
View demo
color-matrix-sepia
DisplacementFilter
View demo
displacement
NoiseFilter
View demo
noise

Building

Install all dependencies by simply running the following.

npm install

Build all filters, demo and screenshots by running the following:

npm run build

Watch all filters and demo (auto-rebuild upon src changes):

npm run watch

Documentation

API documention can be found here.

filters's People

Contributors

a-c-sreedhar-reddy avatar akiomik avatar aknep avatar bbazukun123 avatar bigtimebuddy avatar dependabot[bot] avatar dev7355608 avatar dtysky avatar exponenta avatar finscn avatar georgealways avatar goodboydigital avatar ivanpopelyshev avatar krtr avatar laino avatar mauriciomassaia avatar miltoncandelero avatar minetoblend avatar movax13h avatar mudcube avatar mwni avatar nathanvogel avatar nchase avatar nikkop avatar shukantpal avatar st3v0 avatar vikpe avatar viniciusbitt avatar yonom avatar zfmarkham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filters's Issues

Run Shockwave Filter just once?

I've tried setting the shockwave value to null using a settimeout and removing the filter, but that doesn't seem to work right. I want the shockwave applied just once to my bg sprite when the user clicks on it - not in a looping fashion like the sample Is there a way to do this that is performance friendly? Overall the filter is super cool but seems like it would be costly.

Fails to build on old node version

I'm almost certain this is because of the old node I'm running (and which the company mandates... grrrrrr) - but there's an error when it tries to run the linting part. Could the script either fail to run if it detects an older node version, and / or provide pre-built bin files for those who may be in a similar situation please? Cheers

C:\Projects\WebGL\pixi-filters>npm run lint

> [email protected] lint C:\Projects\WebGL\pixi-filters
> eslint src/**/*.js

C:\Projects\WebGL\pixi-filters\node_modules\eslint\node_modules\strip-bom\index.js:2
module.exports = x => {
                   ^^
SyntaxError: Unexpected token =>
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (C:\Projects\WebGL\pixi-filters\node_modules\eslint\lib\config\config-file.js:23:16)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "lint"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] lint: `eslint src/**/*.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] lint script 'eslint src/**/*.js'.
npm ERR! This is most likely a problem with the pixi-filters package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     eslint src/**/*.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls pixi-filters
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Projects\WebGL\pixi-filters\npm-debug.log

C:\Projects\WebGL\pixi-filters>

[SUGGEST]Manage shader's source with ES6 standard method.

@bigtimebuddy I refactor my custom Filter and use common export string & import string & template string like this :

import commonHead from '../_shared/common-head.frag.js';
import loadDiffuse from '../_shared/load-diffuse.frag.js';
import loadNormal from '../_shared/load-normal.frag.js';
import computeNormal from '../_shared/compute-normal.frag.js';

export default `

${commonHead}

void main(void)
{

${loadDiffuse}
${loadNormal}

    uViewSize;

    // simplified lambert shading that makes assumptions for ambient color

    // compute Distance
    float D = 1.0;

${computeNormal}

    vec3 L = vec3(1.0, 1.0, 1.0);

    // pre-multiply light color with intensity
    // then perform "N dot L" to determine our diffuse
    vec3 diffuse = uLightColor * max(dot(N, L), 0.0);

    vec3 finalColor = diffuseColor.rgb * diffuse;

    gl_FragColor = vec4(finalColor, diffuseColor.a);
}

`;

then use

import vertex from './ambient.vert.js';
import fragment from './ambient.frag.js';

in Filter js file.

I think this way is standard and more common . It's better than using glslify(pixi 4.0) or readFileSync(pixi 4.5) or rollup's rule(pixi-filters).

Add a Threshold Filter

Hello!

As per pixijs/pixijs#2297 it would be nice to have a threshold filter with a configurable threshold point. This has applications in a few other effects (bloom-like effects, faux-metaball effects, image processing).

Thank you!

[SUGGEST] Add `list of files modified` to Wiki

When I create a new filter , I need to modify some files.
But I often forget someone.

So, suggest add a clear list of the files need to modified.

	modified:   filters/all/src/index.js
	modified:   filters/all/package.json
	modified:   filters/all/types.d.ts
	modified:   filters/all/README.md
	modified:   examples/index.html
	modified:   tools/screenshots/config.json
	modified:   README.md

DropShadowFilter

Hi!

Would it be possible to have DropShadowFIlter in pixi v4? If its simply copying files from v3 with a little change I would be happy to help.

Cheers,
P.

ColorMatrixFilter broken in Chrome

Firefox version: 49.0.2
Chrome version: Version 54.0.2840.87 m

If you go to this page in both Firefox and Chrome and compare you can see the the ColorMatrixFilter has no effect.

https://pixijs.github.io/examples/#/filters/filter.js

I will include an image comparing the two where it is apparent where Firefox is on the left and Chrome is on the right. I am using this filter heavily in my application so I would b very appreciative if it was fixed, thank you.

colorizefilter_firefox_vs_chrome

[REQUEST] The Demo uses separate filters-files when `build:dev`

The Demo is not only for demo , it's also a very good test case.
I think many developers would use it for testing when the filter is under develop.
But the new Demo is hard to test and dev.

When add or modify the filters-files , users have to run npm run build again.

I think uses separate filters-files is a better choice.

Thank you.

npm install doesn't have any js files

When I install via npm like so:

npm install pixi-filters

I don't get any js files. Just the following:

.npmignore
package.json
README.md

Am I missing a step here?

`npm run build` can't run.

I've install all node_modules .
but there're some errors:

rocky@Rocky-MBP pixi-filters [* master]$ npm run build

> @ prebuild /Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters
> npm run lint


> @ lint /Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters
> eslint scripts **/src **/rollup.config.js --fix


> @ build /Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters
> lerna run build

lerna info version 2.4.0
lerna ERR! build Errored while running script in '@pixi/filter-ascii'
lerna ERR! execute callback with error
lerna ERR! Error: Command failed: npm run build
lerna ERR! [!] Error: Cannot find module '@tools/build'
lerna ERR! Error: Cannot find module '@tools/build'
lerna ERR!     at Function.Module._resolveFilename (module.js:469:15)
lerna ERR!     at Function.Module._load (module.js:417:25)
lerna ERR!     at Module.require (module.js:497:17)
lerna ERR!     at require (internal/module.js:20:19)
lerna ERR!     at Object.<anonymous> (/Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/filters/ascii/rollup.config.js:5:29)
lerna ERR!     at Module._compile (module.js:570:32)
lerna ERR!     at Object.require.extensions..js (/Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/node_modules/rollup/bin/rollup:2675:8)
lerna ERR!     at Module.load (module.js:487:32)
lerna ERR!     at tryModuleLoad (module.js:446:12)
lerna ERR!     at Function.Module._load (module.js:438:3)
lerna ERR! 
lerna ERR! 
lerna ERR! npm ERR! Darwin 17.0.0
lerna ERR! npm ERR! argv "/Users/rocky/.nvm/versions/node/v6.10.3/bin/node" "/Users/rocky/.nvm/versions/node/v6.10.3/bin/npm" "run" "build:umd"
lerna ERR! npm ERR! node v6.10.3
lerna ERR! npm ERR! npm  v3.10.10
lerna ERR! npm ERR! code ELIFECYCLE
lerna ERR! npm ERR! @pixi/[email protected] build:umd: `rollup -c -f umd && rollup -cp -f umd`
lerna ERR! npm ERR! Exit status 1
lerna ERR! npm ERR! 
lerna ERR! npm ERR! Failed at the @pixi/[email protected] build:umd script 'rollup -c -f umd && rollup -cp -f umd'.
lerna ERR! npm ERR! Make sure you have the latest version of node.js and npm installed.
lerna ERR! npm ERR! If you do, this is most likely a problem with the @pixi/filter-ascii package,
lerna ERR! npm ERR! not with npm itself.
lerna ERR! npm ERR! Tell the author that this fails on your system:
lerna ERR! npm ERR!     rollup -c -f umd && rollup -cp -f umd
lerna ERR! npm ERR! You can get information on how to open an issue for this project with:
lerna ERR! npm ERR!     npm bugs @pixi/filter-ascii
lerna ERR! npm ERR! Or if that isn't available, you can get their info via:
lerna ERR! npm ERR!     npm owner ls @pixi/filter-ascii
lerna ERR! npm ERR! There is likely additional logging output above.
lerna ERR! npm WARN Local package.json exists, but node_modules missing, did you mean to install?
lerna ERR! 
lerna ERR! npm ERR! Please include the following file with any support request:
lerna ERR! npm ERR!     /Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/filters/ascii/npm-debug.log
lerna ERR! 
lerna ERR! npm ERR! Darwin 17.0.0
lerna ERR! npm ERR! argv "/Users/rocky/.nvm/versions/node/v6.10.3/bin/node" "/Users/rocky/.nvm/versions/node/v6.10.3/bin/npm" "run" "build"
lerna ERR! npm ERR! node v6.10.3
lerna ERR! npm ERR! npm  v3.10.10
lerna ERR! npm ERR! code ELIFECYCLE
lerna ERR! npm ERR! @pixi/[email protected] build: `npm run build:umd && npm run build:es`
lerna ERR! npm ERR! Exit status 1
lerna ERR! npm ERR! 
lerna ERR! npm ERR! Failed at the @pixi/[email protected] build script 'npm run build:umd && npm run build:es'.
lerna ERR! npm ERR! Make sure you have the latest version of node.js and npm installed.
lerna ERR! npm ERR! If you do, this is most likely a problem with the @pixi/filter-ascii package,
lerna ERR! npm ERR! not with npm itself.
lerna ERR! npm ERR! Tell the author that this fails on your system:
lerna ERR! npm ERR!     npm run build:umd && npm run build:es
lerna ERR! npm ERR! You can get information on how to open an issue for this project with:
lerna ERR! npm ERR!     npm bugs @pixi/filter-ascii
lerna ERR! npm ERR! Or if that isn't available, you can get their info via:
lerna ERR! npm ERR!     npm owner ls @pixi/filter-ascii
lerna ERR! npm ERR! There is likely additional logging output above.
lerna ERR! npm WARN Local package.json exists, but node_modules missing, did you mean to install?
lerna ERR! 
lerna ERR! npm ERR! Please include the following file with any support request:
lerna ERR! npm ERR!     /Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/filters/ascii/npm-debug.log
lerna ERR! 
lerna ERR! > @pixi/[email protected] build /Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/filters/ascii
lerna ERR! > npm run build:umd && npm run build:es
lerna ERR! 
lerna ERR! 
lerna ERR! > @pixi/[email protected] build:umd /Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/filters/ascii
lerna ERR! > rollup -c -f umd && rollup -cp -f umd
lerna ERR! 
lerna ERR! 
lerna ERR!     at Promise.all.then.arr (/Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/node_modules/execa/index.js:236:11)
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.
lerna ERR! build Errored while running script in '@pixi/filter-color-replace'
lerna ERR! build Errored while running script in '@pixi/filter-bloom'
lerna ERR! build Errored while running script in '@pixi/filter-bulge-pinch'
(node:19430) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 12): Error: Command failed: npm run build
[!] Error: Cannot find module '@tools/build'
Error: Cannot find module '@tools/build'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/filters/ascii/rollup.config.js:5:29)
    at Module._compile (module.js:570:32)
    at Object.require.extensions..js (/Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/node_modules/rollup/bin/rollup:2675:8)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)


npm ERR! Darwin 17.0.0
npm ERR! argv "/Users/rocky/.nvm/versions/node/v6.10.3/bin/node" "/Users/rocky/.nvm/versions/node/v6.10.3/bin/npm" "run" "build:umd"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @pixi/[email protected] build:umd: `rollup -c -f umd && rollup -cp -f umd`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @pixi/[email protected] build:umd script 'rollup -c -f umd && rollup -cp -f umd'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @pixi/filter-ascii package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     rollup -c -f umd && rollup -cp -f umd
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs @pixi/filter-ascii
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls @pixi/filter-ascii
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/filters/ascii/npm-debug.log

npm ERR! Darwin 17.0.0
npm ERR! argv "/Users/rocky/.nvm/versions/node/v6.10.3/bin/node" "/Users/rocky/.nvm/versions/node/v6.10.3/bin/npm" "run" "build"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @pixi/[email protected] build: `npm run build:umd && npm run build:es`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @pixi/[email protected] build script 'npm run build:umd && npm run build:es'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @pixi/filter-ascii package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build:umd && npm run build:es
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs @pixi/filter-ascii
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls @pixi/filter-ascii
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/filters/ascii/npm-debug.log

> @pixi/[email protected] build /Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/filters/ascii
> npm run build:umd && npm run build:es


> @pixi/[email protected] build:umd /Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/filters/ascii
> rollup -c -f umd && rollup -cp -f umd



npm ERR! Darwin 17.0.0
npm ERR! argv "/Users/rocky/.nvm/versions/node/v6.10.3/bin/node" "/Users/rocky/.nvm/versions/node/v6.10.3/bin/npm" "run" "build"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @ build: `lerna run build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ build script 'lerna run build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     lerna run build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/rocky/DEV/@git-fav/_pixijs.com/pixi-filters/npm-debug.log
rocky@Rocky-MBP pixi-filters [* master]$ 


Talk about `ShockwaveFilter`

My game need shockwave effect , so I have been doing research on it recently.

I think the shockwave need these features(params) :

  • center ( already in current ShockwaveFilter, but not in pixel coord)
  • time ( already in current ShockwaveFilter)
  • speed
  • duration
  • amplitude ( already in current ShockwaveFilter, params.x )
  • refraction ( already in current ShockwaveFilter, params.y )
  • wavelength ( already in current ShockwaveFilter, params.z, but not in pixel coord )
    Q: params.z = half of wavelength ???
  • lighter

the speed & duration are very important for shockwave effect in a real game.

And the shockwave needs attenuation effect ( bad English) . I mean that the amplitude should be smaller and smaller with time.

the lighter is used for enhancing the effect. In some cases (e.g. a pond in a dark forest) , if no lighter , player will see the shockwave effect difficulty.


So I want to create a new ShockwaveFilter, then an old question:

Should I create a new AdvancedShockwaveFilter or create a new shockwave filter ?

Could you give me some advices please , thank you ?

[REQUEST] Need more arguments of BloomFilter.

The BloomFilter based on Blur Filter. There are 4 arguments in Blur Filter strength, quality, resolution, kernelSize

But only strength(named blur in BloomFilter) should be set .
I hope BloomFilter could supply all Blur Filter's arguments as optional .

They could help user to control the detail of bloom effect .


BTW , I hope strength and blur could become one name (bad english..., but I think you could understand me)

[SUGGEST] Make the ColorReplace Filter support multi colors.

In the real game , replace multi colors is very useful.
e.g. it could be used for making multi characters with one template image + some color palettes.

this is a template image:
image

this is a color palette, in game, the bottom colors in the template image will be replaced with top colors :
image

another color palette, could create another character:
image

normal map GodrayFilter

Hi , first , thank you guys for GodrayFilter and AdvancedBloomFilter , your are awsome !!!
is there a chance that it can work with normal map.
idea to make fake dynamic lighting or special effects on sprites. like Emboss Effect.
if yes, do you have an example, its is simple to do?

i would like use this normal map generator
https://www.codeandweb.com/spriteilluminator
GitHub Logo
thanks

Switch Pixi reference in examples to use HTTPS

Change http://s3-eu-west-1.amazonaws.com/pixi.js/dev/pixi.min.js to https://s3-eu-west-1.amazonaws.com/pixi.js/dev/pixi.min.js.

This would prevent issues in situations where the github.io link is HTTPS rather than HTTP and throws a Mixed Content exception.

Pixi.Filter is undefined

Hello! Your README approach doesn't seem to work or there's a version conflict or something.

  <script src="/node_modules/pixi.js/bin/pixi.js"></script>
  <script src="/node_modules/pixi-filters/bin/pixi-filters.js"></script>

In PIXI.Filter.prototype -> Uncaught TypeError: Cannot read property 'prototype' of undefined
PIXI.VERSION 3.0.10
pixi-filters 1.0.0

The arguments of Filter should not be uv coord.

Example :
the center of ShockwaveFilter used uv coord, the x/y is [0.0 , 1.0].

When user want to use it , have to do some transform.

I know the transform is easy , but uv is the low layer in renderer, it should be black-box for the game coder.

And in real case , e.g. : a stone drop into a water .
The logic of game should be :

// water is a Sprite object.

var filter = new Shockwave(store.position);
water.filters = [filter];

It's easy and clear.

if Shockwave.center use uv coord.

the code maybe like this :

// water is a Sprite object.

var center = new PIXI.Point(0,0);
center.x = store.position.x / app.renderer.width;
center.y = store.position.y / app.renderer.height;
var filter = new Shockwave();

In fact , use app.renderer.width & app.renderer.height is wrong.
it's need use filterArea. but user can't get the filterArea easily.

So I think the filter should use screen/viewport/pixel coord, and filter do transform internal .

Deprecate Bower Support

Bower support has been dropped in favor of using npm/yarn in PixiJS. Should drop support for it here and undo the complex publish process.

Cannot find module 'glslify'

I want to use pixi-filters like this :

const PIXI = require('pixi.js'),
    filters = require('pixi-filters')

But when my browserify task is running, i get this error :
capture d ecran 2017-04-10 a 12 16 44

All my packages are up to date and correctly installed, but this one seems to have a problem with glslify.

How can I solve the problem ?

Replace Browserify Build with Rollup

Replace Browserify builds with Rollup builds. Makes it much easier to generate clean build files without the internal module overhead in Browserify. Should help reduce the overhead of building and build for es environments (pkg.module)

Importing pixi-filters doesn't seem to do anything

I'm trying to get the filters to work, but am failing to do so.

I've imported both pixi.js and pixi-filters to no avail:

import 'pixi.js';
import 'pixi-filters';

// ...

const outlineFilterRed = new PIXI.filters.GlowFilter(15, 2, 1, 0xff9999, 0.5);

Produces the following error:

Property 'GlowFilter' does not exist on type 'typeof filters'.

Package Versions:
pixi.js: 4.5.5
pisi-filters: 2.0.0

Could you please point out what am I doing wrong?

P.S
This issue on stackoverflow: https://stackoverflow.com/questions/46014961/how-to-get-pixi-filters-working

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.