Ideas for seamless side wrapping world

I'm new here and going to make my first project in box2d(web). The game world will be wrapped in X axis, which means I could walk into origin when I keep moving left or right. Now the problem is how could I do this.

I have read the "moving edges and duplicate objects" way, but seeing it's not good for me since there'll be many niggling problems to fix and overall ugly in mathematics. Maybe I'll do it when the following two ideas worse then my thought.

1. Simulate the world in a sphere circumference, just like this way. The problem is it will be extreme slow when the world going large. I should find some good mechanism to switch the gravity refreshing to avoid that.

2. Simulate the world in a cylinder surface, the Y axis of game world referred to the cylinder's height. To approach this, maybe I have not to do spatial curvature things but only replace x displacement with angular displacement in base data and process collision with arc length. I don't know have I modifying the box2dweb core to do this.

Any suggestion about the two ideas? Too hard or which part should be my first step? And hope there're not too much invalid English in this article.

Original thread: https://box2d.org/forum/viewtopic.php?t=8910