Socket
Socket
Sign inDemoInstall

@egman1/pixi-picture

Package Overview
Dependencies
60
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @egman1/pixi-picture

PixiJS advanced filter renderer, implements advanced blending modes


Version published
Weekly downloads
3
Maintainers
1
Created
Weekly downloads
 

Readme

Source

pixi-picture

Blend-modes emulated through filters

Allows to use blendModes that are not available in pure webgl implementation, such as PIXI.BLEND_MODES.OVERLAY.

Please, don't add children to sprite if you use those blendModes.

Use PIXI.picture.Sprite instead of PIXI.Sprite.

Overlay example

Logic: if sprite has special blendMode, push corresponding filter PIXI.picture.getBlendFilter(blendMode), if area is too small (<1px), dont draw at all.

If you want to use this with any components - just look in the source of Sprite how its done.

Assigning a filter to component directly container.filters = [PIXI.picture.getBlendFilter(blendMode)] should work too.

To be fixed: At the moment this implementation is a bit worse than v4, it uses extra pass for filter.

Heavenly filter feature

Enables backdropSampler uniform in filters, works only if you render stage to renderTexture or you have a filter somewhere in parents.

Sample DisplacementFilter takes everything from container and applies it as a displacement texture on backdrop.

Displacement example

Pixelate example

Compatibility

Compatible with PixiJS 5.3.2 and up. No guarantee for earlier versions!

For PixiJS v4.1 and prior see pixi-v4.1 branch

For PixiJS v4.7 and prior see pixi-v4.2 branch

For PixiJS v4.9 and prior see v4.x branch , npm 1.3.2

How to build

npm install
npm run build

FAQs

Last updated on 30 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc