I build InviteMeOut, an app for invitations and small-business pages that open with an animation: a wax seal that breaks, curtains that part, a towel that wipes dust off a car. The opening is the first thing a guest sees, so it has to be smooth on a three-year-old phone, not just on my laptop.
One of them wasn't. Here's what was wrong and the rules I follow now.
The slow version
The opening for a car-detailing business page wipes a layer of dust off the screen with a towel. The first version did it the "obvious" way:
a full-screen SVG mask that grew as the towel moved,
feGaussianBlur and feTurbulence filters for soft, dusty edges,
the towel itself as a filtered SVG, animated with SMIL,
a scale on the whole layer, and a backdrop-filter: blur() pill floating on top.
In Chrome's phone emulation it ran at about 35 fps. On a real phone it was worse.…