I have imported both pixi
and pixi-filters
like so:
import 'pixi.js';
import 'pixi-filters';
However, after running the code:
const outlineFilterRed = new PIXI.filters.GlowFilter(15, 2, 1, 0xff9999, 0.5);
Following error is thrown:
Property 'GlowFilter' does not exist on type 'typeof filters'.
What am I doing wrong?
P.S
I'm following this example: https://pixijs.github.io/examples/#/filters/outline-filter.js
Seems like every filter needs to be imported individually, like it's written in the GlowFilter's README.md on Github.
Install:
npm install @pixi/filter-glow
Import:
import { GlowFilter } from '@pixi/filter-glow';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With