This is an excellent book which in only 239 pages gives a major jumpstart to anyone wanting to learn WebGL technology. The number of topics presented here is staggering, yet the concepts are described in adequate detail to make this a truly useful tutorial.
The WebGL specification is available free online for reference, as are documents about the libraries, but the value of this book is the well-explained examples that form the bulk of the content. After you read this book, you should understand the basics of 3D programming and WebGL graphics, animation, interaction, and integration with 2D Web pages.
You can run the examples and develop your own on Linux, Windows, and OS X using free, open source software; see the SYSTEM REQUIREMENTS section below.
The author writes in clear and concise English. The tone is friendly and personable, at times like he is talking to you, but without fluff or filler content. The examples, with source available for download, are simple but powerful, and fun to use.
To introduce WebGL, the author started by taking the very tersely worded and technical description of the language from Khronos, and analyzed it - broke it into its component parts, and described each part in just enough detail to understand it. This analysis method gave me a complete understanding of what WebGL's goals were by putting together the pieces after they were explained.
The same analysis method is also the way in which each example program in the book is explained. It is essentially a code walk-through, with a focus on the new concepts being introduced in the chapter.
STRUCTURE AND CONTENT
Chapter 2 presents three.js, the library used for all other examples in the book after Chapter 1. The we see the Chapter 1 example, drawing a 2D square, but this time using the three.js library. It is obvious that this is a much easier way to program than using raw WebGL, by comparing this code to that of Chapter 1. Next, the example is enhanced to easily add amazing 3D features, turning the square into a cube whose faces are painted with an image, and making it interactive by allowing us to rotate the cube on the screen with a simple UI to control it.
Chapter 4 covers animation, with frame-based and time-based animation, interpolation and tweening, keyframes, articulated and skinned animation, and morphing. A robot with many moving parts is the subject of the examples in this chapter.
Chapter 5 covers interaction in WebGL, discussing hit detection, picking, and projecting; implementing rollovers, clicks, and dragging; and camera interaction and navigating within a scene.
Chapter 6 covers integrating 2D and 3D, combining Dynamic HTML with Web GL. We learn how to create popups, using 2D screen positions to annotate 3D objects, adding a background image to a 3D scene, overlaying 3D visuals on 2D pages, creating a dynamic 2D texture, using video as a texture, rendering dynamically generated 3D text, and integrating dynamic data (in this example, news feeds) into visuals.
Having covered the basic technologies in previous chapters, Chapter 7 gives us a pragmatic approach to using WebGL in production with a variety of topics. We learn how to choose a runtime framework (in case three.js does not suit your requirements), file formats, tools for creating content, detecting WebGL support in any browser, and security issues.
Chapter 8 pulls all of this together with a simple car-race game that uses many of the capabilities described in the previous chapters, plus adding sound to bring the game to life.
The appendices provide WebGL resources, such as the WebGL specification for reference, mailing lists and forums to collaborate with other WebGL programers, tools and toolkits, and blogs and demo sites. An appendix follows to make it easy to find everything in the book.
This is the first book I have owned where I really find the electronic versions to be superior to the printed copy, and I am sold. The book is black and white, but the electronic versions use some color images and colored text. PDF is the most portable, but is simply a color version of the book in the same page-layout form. The Kindle and ePub versions have reflowable content, a great readability improvement over the static page layouts of PDF, and have hyperlinks in the table of contents and index to the topics to which they refer, which is probably the best reason to go electronic. I have used all eBook versions except Daisy on an Android tablet (the Google Nexus 7).
The Kindle version is available on Amazon.com; the ePub, PDF, and Daisy versions are available on OReilly's site. OReilly also offers a combo of the physical book and electronic versions.
All source code for the examples is available onnline. Search for WebGL on Youtube and you will find a video of the author discussing the book.
The author used the free open-source LAMP Stack (Linux, Apache HTTP Server, MySQL, and PHP) to develop the examples. I happen to use Windows for most of my work, and was able to get almost all of the examples to work by simply installing the Apache HTTP Server and PHP. One example, which uses PHP, is not yet working properly, even though I have verified that PHP works with Apache. Although I have not tried it, it should be possible to use OS X just as easily.
You also need a browser that supports WebGL. Many modern browsers support it, the main holdout being Internet Explorer. I use Google Chrome and examples, except for the PHO one, work well.
Five stars ("I Love It" on the Amazon scale), a rating I don't often give. This really is a thorough and well-written book, and I can't find any room for improvement; I think this book serves as a great model for writing programming tutorials.
The author sent me a review copy of the physical and electronic versions of the book in exchange for a review. Further, the author is a former colleague and a personal friend of many years. However, I write reviews exactly as I see them, the same whether I paid for the book or not, and I have made every effort to make this an unbiased review. This is a rare case where I must give a five-star review to a book written by a friend, and I hope you will trust me that I really believe the book deserves it.