I have started learning Canvas in HTML5 and I have a question.
I want create a movable pattern with repeat. (Something like background-position and background-repeat in CSS.)
How can I do this?
I need this to create an animated background for my project.
Theres a few ways to achieve this the you could use
putImageDatabut you would suffer some performance loss, the best method is to usedrawImage. Also note the 2nd method has the code to make it go either from left to right, or right to left.http://www.somethinghitme.com/projects/bgscroll/scrolldrawimage.html