I’m still pondering how one would best emulate the tipping glass of beer with Corona Graphics 2.0.
Requirement: Glass of beer where you can programmatically control the level of the beer in the glass, and can also control the angle of the top line of the beer (to emulate if the glass is tipped over). So assume:
- there is say a background scene
- the glass is an image (with transparency inside the glass)
- the beer in the glass will be based on an image (say with froth on top)
Question - Where I’m getting stuck is how to have a dynamic masking approach so that as your move the level of the beer image (with froth on th top) downwards, how to mask anything on the image out that is noting within the glass? i.e. you can’t really move the mask down of the glass, as consider the shape of the glass, skinny at the bottom, and wider at the top. So the mask really needs to stay linked to the glass image…but in Corona the mask is applied against the image you want to mask.
Ideas? (probably a simply approach but I’m not seeing it)