WebGL Notes

gl.TRIANGLE_STRIP

Use this as opposed to gl.TRIANGLES to improve performance.

Strips are faster because you only need to send one vertex to define the next triangle, and I believe the hardware is also optimized at handling that kind of data.

const [minSize, maxSize] = gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE)

Vertex Shaders

A vertex shader receives a set of triangle vertices (since we are only using gl.TRIANGLE_STRIP), and computes gl_Position, the final position of a single vertex.

gl.DYNAMIC_DRAW vs. gl.STATIC_DRAW

If the buffer data never changes, use STATIC_DRAW, otherwise use DYNAMIC_DRAW.

projectionMatrix

Global uniform of a projectionMatrix.