I'm working on my first HTML5 mobile game and I'm using a pixel art style for the images.
I don't know if I'm doing this right... initially I was going to create the pixel art images in a much large size, so that I could resize them later according to the device's screen. But now I saw this method where I can draw the pixel art using actual pixels and resize them in the browser.
I did a little research and found that in order to stretch pixel art images without losing their quality, I would need to draw them into a html canvas and disable the image smoothing. I managed to build an image loader in JavaScript for all my images, and loaded them all into a canvas, resized them... no problem.
But now, how am I supposed to work with those images? They're not elements as far as I understand... I can't assign classes or ids to them.
Am I supposed to create a canvas for each image? Am I doing this right?