detect the animation sub-rectangle for each tile