Check out example codes for "how to flip selection in aseprite". It will help you in understanding the concepts better.

Code Example 1

press "Edit > Flip Horizontally" or "Shift + H"

Learn ReactJs, React Native from akashmittal.com