Setting up a simple timed loop and drawing images over the top of each other will work.
You’ll need to draw the image twice in a frame for the seam will be.
When the image is completely scrolled you need to reset the position to 0.
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0;
padding: 0;
}
</style>
<title>Canvas image</title>
</head>
<body>
<canvas id="myCanvas" width="450" height="329"></canvas>
<script>
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
var image = new Image();
image.onload = function() {
var x = 0;
var width = image.width;
var min = 0-width;
var step = 1;
var loop = function() {
context.drawImage(image, x, 0);
context.drawImage(image, x + width, 0);
x -= step;
if (x < min) {
x = 0;
}
};
setInterval(loop, 1000 / 60);
};
image.src = 'norman-the-french-bulldog.jpg';
</script>
</body>
</html>