WebGLFundamentals API Docs
These docs are an attempt to help explain some of the helper function
used in the articles on webglfundamentals.org.
WebGL is a very low-level API and so using it is very verbose. To draw a simple
lighted cube can easily require 50-100 WebGL calls. Calls to create buffers
and put data in them. Calls to create that data in the first place. Calls to
create GLSL shader programs. Calls read attribute and uniform locations. Calls
to create textures, bind textures to texture units, bind buffers to attributes,
and set uniforms.
At some point this complexity makes it hard to concentrate on the topic at hand
and so helper functions can reduce the number of lines need to
a smaller few.
If you're using WebGL to do 2D or 3D you'll likely need many math helper functions
Finally WebGL requires vertices to operate on. Functions to generate veritces
for common shapes like spheres, cubes, planes, cones, etc can be found here.
These docs are generated with JSDoc3. I find them very confusing to look at
and in some places frustratingly verbose. If you have any experience with JSDoc3 and know how to
make the docs more approachable and useful please submit a pull request
or file an issue with details.