@Override
        public long getNextFrame(boolean isCyclic) {
          var f = frame;
          frame++;
          if (isCyclic) {
            frame %= frames;
          }
          return f;
        }
@Override
        public long getNextFrame(boolean isCyclic)