I saw a very good effect that I would like to try to reproduce for my own project, but I try my best to find the best way to achieve it both in terms of performance and without problems.
The effect is a continuous / cyclic content that can be scrolled and panned in any direction infinitely and appears to be completely seamless. This can be seen on the award-winning Android Leap: Second website here: http://leapsecond2015.com/ .
I can come up with a couple of ways to achieve this; one of them clones the body of the content and repeats it once in all directions when loading the page, and when scrolling / tinting adds the cloned content in the direction in which the user is moving.

What I do not understand with this method is a performance that I have not yet used. clone() in any of my projects. Let's say a user scrolls continuously for 5 minutes, just for fun, and clones 10,000 times - what are the disadvantages of cloning a lot of content?
Another method I've seen is to reset the scroll bar back to the beginning when the user has reached the end of the content. I like this demo a bit:
var bgHeight = 1600;
body { height: 1600px; background-image: url(""); background-p
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
Again, I'm struggling to figure out how this will work without problems when I add a horizontal scroll function to it, but it looks great vertically.
I would like to know which of these methods will work better or, if none of them works, consult how Android achieved this on its Leap: Second website or suggest a new method.
I had a decent Google on the subject, but I flooded the "inifinte scrolling" articles and hit a brick wall. I looked at checking elements in Firefox, and I think I came to the conclusion that they do not clone or add, but maybe I was wrong.
source share