We have improved the structure of the code examples in this chapter. As the complexity of our WebGL applications increases, it is wise to have a good, maintainable, and clear design. We have saved this section until the end of this chapter so that you can use it as a reference when working on the exercises.
Just as in previous exercises, our entry point is the init function, which is called when the page is loaded. We have included several scripts in the head of our document that point to various components to build our 3D application.