How to create a sphere with WebGL

In this post I will describe how you can create sphere with pre3d JavaScript library ( So it will look like: Demo You will need to include these pre3d JavaScript files: <script src="lib/pre3d.js"></script> <script src="lib/pre3d_shape_utils.js"></script> <script src="lib/demo_utils.js"></script> <script src="sphere.js"></script> In addition you will need to place somewhere in the body tag next code: <canvas id="canvas" width="800" height="600"> Sorry, this demo requires a web browser which supports HTML5 canvas! </canvas> It will create canvas placeholder, where we will place our drawings. »