flipping a sprite horizontally

is there any direct way to do it because i have no idea how spritely’s code does it

You could issue a scale(-1,1) command just before drawing it. Or draw it using a mesh and flip the mesh vertices around.

or you could rotate the sprite 180 degrees.

That will flip it both horizontally and vertically