Workaround for color blending which produces shadows due to the way it emulates multiply blendig on canvas. This will restore the original image to remove shadows in case of setColor calls near 255/255/255
Correctly use requestAnimationFrame for different frame rates, also, the next frame should be requested before executing the logic