mattjennings / svelte-pixi

Create PixiJS apps with Svelte
https://svelte-pixi.com
MIT License
119 stars 15 forks source link

Add documentation for using masks #24

Open llPekoll opened 2 years ago

llPekoll commented 2 years ago

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

mattjennings commented 2 years ago

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

llPekoll commented 2 years ago

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