About Cache

Hello. I need to use GPU in one of my applications. When I use it, I need to cache the shapes. But there is a mask here. Can the mask be cached?

Just tried and it did not seem to work. Tried with a Circle() and a Shape() as the mask and as soon as I set gpu:true it does not mask. An AlphaMask works:

const mask = new Container(500,500).center();
new Circle().center(mask);
new Rectangle(500,500,red).effect(new AlphaEffect(mask)).center()

I find it easier to make a Container the same size as the object you are masking and put the masking object inside that. Then they line up.

2 Likes

Thank you very much.

1 Like