Animations and switches are hard-coded in doom, but Boom introduced an ANIMATED and SWITCHES lump which is one way of defining them. Hexen introduced an ANIMDEFS lump which zdoom inherited and I believe expanded upon. It's nicer but still a bespoke text format.
Possible approach: combine all the frames of a texture into one, and use a shader to animate the frames. Doom's animated textures are hardcoded but a definition file could be made to support it.
Animations and switches are hard-coded in doom, but Boom introduced an ANIMATED and SWITCHES lump which is one way of defining them. Hexen introduced an ANIMDEFS lump which zdoom inherited and I believe expanded upon. It's nicer but still a bespoke text format.