Tokenmagic icon indicating copy to clipboard operation
Tokenmagic copied to clipboard

Applying effects to a specific PIXI.Sprite

Open Aedif opened this issue 3 years ago • 1 comments

Any chance of adding support for effects to be applied to a passed on PIXI.Sprite as the target instead of a placeable?

I think it'd be fun to mess with the idea of stacking multiple sprites with their own individual effects on top of each other:

https://user-images.githubusercontent.com/7693704/200945294-60edeb0c-f650-476f-8715-fa175a28847e.mp4

The above uses the community filters to apply CRT on 'Frightened', AdvancedBloom on 'Frozen' and Glow on the staff.

However it could be taken much further with Token Magic FX filters.

Aedif avatar Nov 09 '22 21:11 Aedif

Figured out a way to do it, a bit hacky but it works:

https://user-images.githubusercontent.com/7693704/203394100-7ba19f61-91e2-450a-8235-75a44f2d80ab.mp4

It'd be nice if there was an API to directly access TMFX filters. At the moment I'm having to actually look inside TMFX module and import the filters from the individual files.

let fxModule = await import(`../../tokenmagic/fx/filters/${className}.js`);

Aedif avatar Dec 19 '22 14:12 Aedif