palanolho Posted June 16, 2018 Share Posted June 16, 2018 Hi everyone, I'm trying to use the additional pixi filters (https://pixijs.io/pixi-filters/docs/index.html). The documentation only explains how to get it using nmp but since I don't use it (at least at the moment) I was wondering how I could get the pixi-filters.min.js (or pixi-filters.js) to add to my code. I was able to find this reference for the CDNJS "https://cdnjs.cloudflare.com/ajax/libs/pixi-filters/1.0.8/filters.min.js" which seems to load fine, but when I try to use it I get either an "Uncaught ReferenceError: GlowFilter is not defined" or "Uncaught TypeError: PIXI.filters.GlowFilter is not a constructor" error (depending on how I try to define the filter). Tried a difference filter (like emboss) but get the same thing . (example as per https://pixijs.io/pixi-filters/docs/PIXI.filters.GlowFilter.html) var someSprite = new PIXI.Graphics(); someSprite.filters = [ new GlowFilter(15, 2, 1, 0xFF0000, 0.5) // doenst work with "new PIXI.filters.GlowFilter()" either ]; Any hints? Many thanks in advance for any assistance. Quote Link to comment Share on other sites More sharing options...
icp Posted June 16, 2018 Share Posted June 16, 2018 I built them for a project a few days ago. It's the latest minified version with all the filters included. Please note that they use many resources and may slow down your app. pixi-filters.min.js Quote Link to comment Share on other sites More sharing options...
bigtimebuddy Posted June 16, 2018 Share Posted June 16, 2018 Try using jsdelivr: https://cdn.jsdelivr.net/npm/[email protected]/dist/pixi-filters.js or download the latest from GitHub releases: (it seems I forgot to add 2.6.0 and 2.6.1 dist files to release, but will add soon) https://github.com/pixijs/pixi-filters/releases Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.