GithubHelp home page GithubHelp logo

pixi-extra-filters's Introduction

IMPORTANT: This project is no longer maintained. All community filters have been combined with the core pixi-filters and are not longer maintained here. Pull requests should be made to pixi-filters.

pixi-extra-filters

Some extra filters for pixi that aren't in the core plugin.

Usage

Browserify

If you use browserify you can use pixi-extra-filters like this:

var PIXI = require('pixi.js'),
    extraFilters = require('pixi-extra-filters');

var sprite = new PIXI.Sprite(someTexture);
sprite.filters = [new extraFilters.GlowFilter(15, 2, 1, 0xFF0000, 0.5)];

Prebuilt Files

If you are just including the built files, pixi-extra-filters extends the PIXI.filters namespace with its filters:

var sprite = new PIXI.Sprite(someTexture);
sprite.filters = [new PIXI.filters.GlowFilter(15, 2, 1, 0xFF0000, 0.5)];

Building

You will need to have node setup on your machine.

Then you can install dependencies and build:

npm i && npm run build

That will output the built distributables to ./dist.

pixi-extra-filters's People

Contributors

bigtimebuddy avatar develra avatar englercj avatar goodboydigital avatar ivanpopelyshev avatar oza94 avatar thegamerzesport 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

Watchers

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

pixi-extra-filters's Issues

SimpleLightmapFilter

Hello,

I've just created a simple lightmap filter for my needs. Here is a codepen and here is the tutorial I used.

This is sufficient for simple needs, it takes in arguments :

  • The lightmap texture
  • The ambient color
  • The screen resolution

Here is a demo of the filter in action from the codepen above :

Filter demo

I think this can be a good addition to pixi-extras-filters. I can provide everything from the code to the doc. But may be this is not relevant? Let me know.

PIXI.filters vs PIXI.Filter

Hi,

PIXI.Filter is not defined in Pixi v3 or v4, but the lib tries to extend the PIXI.Filter

GlowFilter.prototype = Object.create(PIXI.Filter.prototype);

Publish to npm

Hello!

Can you please publish this package on npm? Thanks!

glslify is not defined

Hello,

I've just tried to use GlowFilter, but I got this error:

pixi-extra-filters.min.js:1 Uncaught ReferenceError: glslify is not defined

I only included pixi-extra-filters.min.js , please advice which file to include also.
Thanks

OutlineFilter: this.uniforms.pixelWidth.value === null

I've just tried to use this and I noticed the this.uniforms.pixelWidth.value === null
at the point of time it is trying to mutate the value property.

Locally I have set the object up with a dummy value so it can at least process and it seems to be working fine.

Impacted Lines 69 and 78

Sample Filter Images ?

Would it be helpful for me to make a folder with sample pictures of each filter? I can do this for the vanilla pix filtersi as well.

Crashing the GPU: GlowFilter

Hey,

So the GlowFilter seems to be crashing webGL, the CPU zips up to 100% (which normally isnt enough to hang the laptop) but it isnt until webGL actually craps out that the lappy is usable again.

var stage = new PIXI.Container()
var sprite = new PIXI.Sprite.fromImage( 'apple2.png' )
sprite.position.set( 0, 0 )

stage.addChild( sprite )

var glow = new PIXI.filters.GlowFilter( WIDTH, HEIGHT, 15, 2, 1, 0xFFFFFF, .5 )
stage.filters = [ glow ]

setInterval( () => {
  renderer.render( stage )
}, 1000 / 60 )

MacBook Pro Retina mid 2014
Mac OSX 10.11.1
GeForce GT 750M 2048MB or Intel Iris Pro 1536MB
Chrome Version 47.0.2526.73 (64-bit)

Only log is WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost but I think thats after I've tabbed out of Chrome.

Chrome gpu data:

Graphics Feature Status
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Rasterization: Software only. Hardware acceleration disabled
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
WebGL: Hardware accelerated

Publish new build

Hello,

Can you please update the build and version on npm, since pr #11 is not on npm I throw deprecation warnings in the console. I initially wanted to wait v4 and the new filters repo but I plan to open a demo soon

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.