I’m working on a html canvas. I’m curious for particles, a character, or static object on the canvas.
In which case would the performance be better if I load in an image (e.g. as a playable character, square) or draw the character like:
ctx.beginPath();
ctx.lineWidth = “6”;
ctx.strokeStyle = “red”;
ctx.rect(5, 5, 290, 140);
ctx.stroke();
When is it faster (or not) to load in images/pictures or to create something on a canvas yourself? I’m curious about the performance aspect. Both moving/transforming or a static object.