WebGL: Up and Running

Author: Tony Parisi
Publisher: O'Reilly
Pages: 230
ISBN: 978-1449323578
Audience: JavaScript programmers
Rating: 4.5
Reviewer: Mike James


Can you learn WebGL without getting involved in the very basic nuts and bolts like shaders and so on?


The big problem with WebGL is that it is very low level. If you are expecting to get involved with cameras and lights then think again. WebGL expects you to set up shaders, which are fairly complex programs in a C-like dialect to control how surfaces are rendered. This makes getting started with WebGL a slow and technical process.

Many programmers don't want or need to get into the powerful but difficult area of custom shaders - they just want to define and render 3D objects and create scenes that can be animated and used in games, simulations and so on. The problem is how to get them into WebGL?

This book takes the approach of augmenting WebGL with a 3D graphics engine - Three.js. What this means is that you work with 3D graphics in terms of meshes, cameras and lighting and so avoid the whole issue of shaders, which are provided for you by the engine. The only problem with this approach is if you actually want to master the low-level details of WebGL. Even if you do, starting off with a 3D graphics engine and finding out about shaders later on is still a good way into a complex subject.

However, it is important to realize that if you want an approach to WebGL that isn't based on Three.js you need a different book.


This said, the book does start off with an overview of WebGL and a simple program to draw a square. This is almost used as a motivation for adopting a 3D engine, as the next chapter introduces Three.js with a program that does the same thing in 30 lines as opposed to the original 150.

Next we move on to rendering a textured cube, something that usually takes a lot longer to reach taking the unaided route.

Chapter 3 uses a simple simulation example to introduce wider ideas on how to create meshes and textures. It also deals with particle systems and introduces custom shaders, but mostly concentrating on Three.js. From here we move on to animation in Chapter 4, again covering some basic principles, but quickly moving to Tween.js - a library that makes it all easy.

Next, Chapter 5 deals with hit detection and user interaction using Three.js. Chapter 6 is on integrating 2D and 3D graphics. Chapters 7 and 8 bring the book to a close, looking at WebGL in productions settings and creating a game.

This is a very short book and often the code is left to do the explaining.  This is not to say that the author doesn't explain  some basic concepts, but there is too much to get through in any detail in a book this size. You will either have to go and find out about some aspects of 3D or be lucky enough to know theory or practice already. As a result this book is great for programmers who have worked with a 3D system before but less so for the 100% complete beginner. And of course there is no point at all in approaching it unless you are fluent in JavaScript and HTML.

As long as you are happy with using Three.js and can accept a fairly compact and advanced approach to 3D graphics, this is a good introduction to graphics based on WebGL and it should get you to the point where you can create your own game or simulation.


Administering Relational Databases on Microsoft Azure

Author: Prashanth Jayaram et al
Publisher: Independent
Pages: 622
ISBN: 979-8706128029
Print: B08Y4LBTP4
Kindle: B08XZQJHMK
Audience: Azure DBAs
Rating: 2 or 4 (see review for details)
Reviewer: Ian Stirk

This book aims to help you pass the Azure Relational Database exam DP-300, how does it fare?

Modern Fortran

Author: Milan Curcic
Publisher: Manning
Date: November 2020
Pages: 416
ISBN: 978-1617295287
Print: 1617295280
Audience: Fortran programmers
Rating: 5
Reviewer: Mike James
Not your parents' Fortran?

More Reviews

Last Updated ( Tuesday, 09 October 2012 )