This was a challenge I had to try to figure out for work. The problem was that when we used Catmull-Rom splines to create splines for some straight line curves, we ended up with little loops and self-intersections. I found articles describing techniques that prevented this, but no place that had actually posted an implementation of it.
The simple Moon example started with an example post I found on the web. I have tweaked it in order to allow the moon to be controlled from a touch device, and enabled it to work in earlier versions of Internet Explorer. It is inelegant largely because it doesn't use a WebGL library like three.js in order to make working with WebGL easier. It demonstrates the raw vertex and index buffer creation and other aspects necessary to render 3D objects on your browser.
The Gnomic Earth example started as a rotating cube with a single texture. I thought it would be cool to have a cubic earth, so I found the cube facets projected in the Gnomic projection on the web, admittedly somewhat blurry, and added them as the textures for the cube faces, and modified the code to show the different textures on each face. I think with it's current rotation pattern you won't see all six sides, but it still looks cool.