How can we apply Mask filter to a layer. Official documentation shows this:
node.cache();
node.filters([Kinetic.Filters.Mask]);
node.threshold(0.1);
But it is not working.
layer.cache();
layer.threshold(260);
layer.filters([Kinetic.Filters.Mask]);
layer.draw();