-
You can do this by transforming the context with
myContext.scale(-1,1)
before drawing your image, however -
This is going to slow down your game. It’s a better idea to have a separate, reversed sprite.
More Related Contents:
- Using HTML5/Canvas/JavaScript to take in-browser screenshots
- Capture HTML Canvas as gif/jpg/png/pdf?
- Resizing an image in an HTML5 canvas
- Get pixel color from canvas, on mousemove
- Why does canvas.toDataURL() throw a security exception?
- Zoom Canvas to Mouse Cursor
- Simulation background-size: cover in canvas
- Zoom in on a point (using scale and translate)
- how to save canvas as png image?
- Does HTML5/Canvas Support Double Buffering?
- HTML5 Canvas to PNG File
- Uploading ‘canvas’ image data to the server
- html 5 canvas LineTo() line color issues
- HTML5 Canvas camera/viewport – how to actually do it?
- What is the current state of the art in HTML canvas JavaScript libraries and frameworks? [closed]
- How to resize html canvas element?
- How do I rotate a single object on an html 5 canvas?
- Detect if user clicks inside a circle
- addEventListener for keydown on Canvas
- Javascript function to Rotate a base 64 image by X degrees and return new base64
- How to save canvas animation as gif or webm?
- canvas.toDataURL() Security Error The operation is insecure
- HTML5 Canvas Circle Text
- clearing circular regions from HTML5 Canvas
- Is there an equivalent of canvas’s toDataURL method for SVG? [closed]
- Snap edges of objects to each other and prevent overlap
- HTML5 Canvas translate(0.5,0.5) not fixing line blurryness
- HTML Canvas Full Screen
- javascript: upload image file and draw it into a canvas
- Extracting single frames from an animated GIF to canvas