35 Flipping properties - JcerelusDev/CanvasGameJs GitHub Wiki
What is the flip property
The flip property is used in case you have a sprite or spritesheet where the character facing only one direction.
Example : Character facing only right Character facing only down
To make the character facing left we need to flip in X axis.
Considering we are using the same player object
Do the following in your left command
player.flipX = true
And Do the following in your right command to reset the flipping.
player.flipX = false
To make the character facing up we need to flip in Y axis.
Considering we are using the same player object
Do the following in your up command
player.flipY = true
And Do the following in your down command to reset the flipping.
player.flipY = false
The code above is an example you should use it depending on your sprite.