is there a way to mask objects in animator?


for example

lets say i want to animate a shape that moves across from left to right, but i want it all to be contained with in the shape of a button.

is there a way to do that?