Refactor: Reimplemented MaterialAnim as a C++ class