html canvas draw frame sprites code example Example: setting up a sprite sheet in js context.drawImage(img, sx, sy, swidth, sheight, x, y, width, height)