I have a html5 canvas that draws a sound wave. I have set the background as an background image, however, I want this background image to repeat. Can anyone tell me how I would do this and what I need to add into my code: var backgroundImage = new Image(); backgroundImage.src = 'http://www.samskirrow.com/client-kyra/images/main-bg.jpg'; var canvas; var context; function init(c) { canvas = document.getElementById(c); context = canvas.getContext("2d"); soundManager.onready(function() { initSound(clientID, playlistUrl); }); aniloop(); } function aniloop() { requestAnimFrame(aniloop); drawWave(); } function drawWave() { var step = 10; var scale = 60; // clear context.drawImage(backgroundImage, 0, 0); // left wave context.beginPath(); context.moveTo(0, 256); for ( var i = 0; i
You can see this code in action here: http://www.samskirrow.com/client-kyra