Unknown Kadath


Posts Tagged “drawimage”

Slicing Spritemaps and Parallax Scrolling on the HTML5 Canvas

Posted on July 16th, 2010 by James Litten

In this example we will look at slicing images with the drawImage() method of a 2d canvas context. We’ll use two images that are larger than the canvas to create a parallax scrolling effect that is common in 2d games and also another image as a spritemap consisting of three sprites to show how to [...]