ThreeJS Cookbook Review
Among the too many things I’ve done recently, I was a tech reviewer for a new WebGL book from Packt author Jos Dirksen called the Three.js Cookbook.
WebGL is an amazing technology. You can build 3D graphics and animation that run blindingly fast on desktop and mobile. Even iPhones support it now. There’s just one downside: WebGL is complicated.
WebGL is basically OpenGL ES 2 for the web. If you’ve done any OpenGL work before you know it’s very low level and requires a pretty extensive background in 3D graphics and matrix math. While I prefer JavaScript to C++, straight OpenGL is still pretty hard. That’s why most people use a library, like ThreeJS.
ThreeJS is probably the most popular open source WebGL library, though there are plenty of others. Of course ThreeJS is still fairly complex itself. It's the nature of the beast. If you just want to do one specific thing, like load up a model and light it, learning all of ThreeJS is overkill. That’s when you want the ThreeJS Cookbook.
The Cookbook has over 80 recipes all structured the same way: what you’ll learn, what you’ll need, how to do it, and how it works. Get in and out quickly. Don’t think the fast nature means it’s not comprehensive, though. It covers pretty much everything from lighting and model loading to height maps, point clouds, and event custom shaders. And of course all example code is in a github repo.
I happily recommend it.
Posted February 28th, 2015
Tagged: bookreview opengl html webgl