Another 3D demo made with Three JS named “Solar system with Newton gravity”:
You can set mass, position and velocity for the sun, earth and moon. and can change the camera position and what object to look at.
Also you can show trajectory of each object and some statistics (collision, distance minimal and maximal).