added a utility for building smoothly looping XOR-masked animations.