Jump to content

Trying to use pixi-filters without a bundler


SantosR
 Share

Recommended Posts

I have this small lab project that I've been managing to work locally without using a bundler. My index.html is importing pixi from CDN but the type definitions are coming from node_modules (I added "pixi.js" to "types" in my tsconfig, so I get static typing).
 

It was all looking good till I tried adding pixi-filters into the equation. I'm also adding it to my html through CDN and installing it via NPM, and added "pixi-filters" to my tsconfig. It seems to work in part, but for some reason the types do not match the code. For example in the type definition for "AdvancedBloomFilter" has no namespace, but in the actual code it is PIXI.filters.AdvancedBloomFilter ?.

Is it possible to get a working setup without having to use a bundler? 

Thanks in advance. 

Link to comment
Share on other sites

TS and bundlers together are a problem.

This plugin loves people who use bundlers and requires extra steps for guys who prefer vanilla.

Plugins that I'm maintaining (like pixi-layers) love vanilla users and require extra steps for bundlerers.

If you want to know anything about those extra steps, search and ask in pixi-filters issues :)

Is it possible to get a working setup without having to use a bundler? 

Yes, copy the code in your own project. "frag" files are problem on their own but you can just embed them as strings.

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...