private void animateUV(int gridX, int gridY, int frames) {
    int frame = 0 ;
    float U, V ;
    final float oldUV[] = framesUV[0] ;
    final float newUV[][] = new float[frames][oldUV.length] ;
    loop: for (int y = 0 ; y < gridY ; y++) for (int x = 0 ; x < gridX ; x++) {
      for (int t = 0 ; t < oldUV.length ;) {
        U = texture.maxU() * (oldUV[t] + x) * 1f / gridX ;
        newUV[frame][t++] = U ;
        V = texture.maxV() * (oldUV[t] + y) * 1f / gridY ;
        newUV[frame][t++] = V ;
      }
      if (++frame == frames) break loop ;
    }
    framesUV = newUV ;
  }