SVG masks or some alternative?

Hi. The last technique works well but is there any way to do basically the same thing but run animation behind that mask? Right now the background is limited to the “masks” solid colour.