Jump to content

How to get the additional pixi-filters (without npm)


palanolho
 Share

Recommended Posts

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.

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...