svelte-pixi icon indicating copy to clipboard operation
svelte-pixi copied to clipboard

Add documentation for using masks

Open llPekoll opened this issue 2 years ago • 2 comments

Hi, I am looking for the masks, Did I miss it in the doc, or do you want to make the tests first? Best

llPekoll avatar Jul 07 '22 09:07 llPekoll

Masks are supported via the mask prop and work the same way as PixiJS. You just have to get the pixi instance. So you can either make one manually, or get it by doing bind:instance={mask} on, say, a Graphics component, and then passing mask={mask} on another component.

I would write out a full example but I’m on mobile at at the moment, sorry

mattjennings avatar Jul 07 '22 13:07 mattjennings

Thanks! Made it work! I leave the thread open so you can add an example if you want, or just close it

llPekoll avatar Jul 07 '22 15:07 llPekoll