I’ve had some unfortunate experiences with canvas masking just not being as good as I would expect it. For example, I think it supports only one shape, so we might have code that tries to ignore subsequent draw commands (since the extra commands break the mask entirely). I think a square or a circle works, but I haven’t tried a triangle
ok, finally had some time to try this myself,
Indeed with shape masks, this works correctly!
But what’s the difference between masking with a “shape” mask or a “Sprite” mask that utilizes the graphic object?
Is it that hard to fix to work as expected?
Simple shape masking on html5 doesn’t work for me. I also get the inverted result. However, webgl and linux target works as expected. I haven’t tested others, but I’m sure they work.