If you can arrange the HTML elements properly, there may be no need for Javascript.
An easy approach is to ensure that you have multiple copies of the content you want to scroll through, with half of them covering the largest screen size you wish to support.
The default width of 1150 may be too narrow for some screens, so this code snippet involves using 4 copies, shifting them left by 50%, and then back to their original position to create a seamless scrolling effect, allowing CSS (and hopefully the device's GPU) to handle the animation smoothly.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: aliceblue;
overflow: hidden;
}
...
<div id="container">
<div class="block1">
<div class="wrapper" style="/*background: cyan;*/">
<div class="images">
<div class="image1"></div>
<div class="image2"></div>
<div class="image3"></div>
</div>
...
</div>
...
</div>
...
</div>