Is there a way of preventing anything drawn to the canvas to be see开发者_开发知识库n until a certain point? I'd like to be able to draw a number of objects at once, then draw over them with another object and a different composite method, on a loop.
Because the first lot of painting takes so long, the result will only be seen for a fraction of a second before it loops.
The normal method would be to render those objects into an off-screen Canvas
, and then use context.drawImage()
to copy it onto the on-screen one.
精彩评论