pixijs-filters

安装量: 818
排名: #4831

安装

npx skills add https://github.com/pixijs/pixijs-skills --skill pixijs-filters

Attach visual effects by assigning one filter (or an array for chaining) to container.filters . Built-in filters cover blur, color matrix, displacement, alpha, and noise; custom filters wrap a GLSL/WGSL fragment shader via Filter.from(...) . Quick Start const sprite = new Sprite ( await Assets . load ( "hero.png" ) ) ; app . stage . addChild ( sprite ) ; const blur = new BlurFilter ( { strength : 4 , quality : 4 } ) ; const colorMatrix = new ColorMatrixFilter ( ) ; colorMatrix . brightness ( 1.2 , false ) ; sprite . filters = [ blur , colorMatrix ] ; const container = new Container ( ) ; container . filters = [ new BlurFilter ( { strength : 2 } ) ] ; container . filterArea = new Rectangle ( 0 , 0 , 800 , 600 ) ; app . stage . addChild ( container ) ;

返回排行榜