Preload filling a shape or object

Hello,

can somebody explain to me how this preloader is done, or point me in the direction where I can learn it. I believe it is done through masking…