groove-x/pura

loadImage timing issues

belm0 opened this issue · 0 comments

belm0 commented

code like this which draws from a callback is no good, since the state of the canvas context will be different

f'else image.addEventListener("load",function(){{ctx.drawImage(image,{x},{y}{size_args});}});'

the symptom will be that the image draw is not honoring the current transforms

workaround is to ensure that image is loaded one frame ahead of use