Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get error trying to use CRTFilter #379

Open
trevorwrightdev opened this issue Feb 20, 2023 · 1 comment
Open

Get error trying to use CRTFilter #379

trevorwrightdev opened this issue Feb 20, 2023 · 1 comment

Comments

@trevorwrightdev
Copy link

I get this error when trying to apply the CRTFilter.

Uncaught TypeError: Class constructor vi cannot be invoked without 'new'
    at new n (CRTFilter.ts:72:9)
    at app.js:65:22

I'm using vanilla JS, so I could be applying it wrong. Here is all I am doing:

app.stage.filters = [new PIXI.filters.CRTFilter()]

Can someone tell me how to do this in vanilla JS?

@thurinus
Copy link

thurinus commented Mar 8, 2023

I just ran into this, and got it to work by using the browser distribution:

https://cdn.jsdelivr.net/npm/pixi-filters@latest/dist/browser/pixi-filters.min.js

I assume you used the README's recommendation of

https://cdn.jsdelivr.net/npm/pixi-filters@latest/dist/pixi-filters.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants