This is rather outdated, now that WebGL exists and is supported in quite a few modern browsers, including Chrome and Firefox.
I would fix this myself and send a pull request, however, I feel this needs much more in-depth updating than I can provide (knowing exactly nothing about WebGL)
https://github.com/diveintomark/diveintohtml5/blob/master/canvas.html#L96
This is rather outdated, now that WebGL exists and is supported in quite a few modern browsers, including Chrome and Firefox.
I would fix this myself and send a pull request, however, I feel this needs much more in-depth updating than I can provide (knowing exactly nothing about WebGL)