Is it possible to use a shape as a mask?
How would I achieve this for example:
Requirement: Glass of colored liquid where the liquid level rises and falls.
Implementation: (one idea)
-
layer1 - background image (ideally rectangle with pattern fill for liquid)
-
layer2 - polygon mask same as outline as glass (i.e. shape)
-
layer3 - PNG image of glass with background and inside of glass being transparent
-
then layer 1 could move up & down showing top of liquid, but would only appear within the outline of the glass based on the layer 2 mask
Will leave this as the basic shape as mask question. Have moved the “how would you do this” question to: http://forums.coronalabs.com/topic/42020-tipping-glass-of-beer-with-g20-what-would-be-the-best-approach/ , with the title “beer” in it to attract some attension hopefully
So is it possible to have layer2 as a mask for layer1? If not what would be the next best approach?