HTML and CSS Reference
Step 4: Add matrix helpers to simplify matrix interaction.
For gd.core.draw() you'd normally have to write some extremely complex logic to
handle matrices for colors and shapes. Instead, you're going to use some prewritten help-
9.16 to your gd.core object. Like webgl_util.js, the following chunk of code comes from
an unknown source, but you'll find that Mozilla's WebGL tutorials, Learning WebGL, and
many other online lessons make use of it.
4 “Matrix multiplication,” Wikipedia, last modified April 8, 2013, http://mng.bz/yo4D .
5 “Translation (geometry),” Wikipedia, last modified Feb. 21, 2013, http://mng.bz/2dbB .