The following books are useful for one reason or another:
The standard API for interacting with graphics hardware is a set of libraries called OpenGL, along with a special language called GLSL that is used for the programmable portions of the GPU. (And of course, Microsoft has its own incompatible version of the same things, known as DirectX and HLSL.)
One good place to start might be with a short set of notes that I put together a while ago when I first had to learn JS. It's in the form of an interactive web page in which you can try out and edit the code examples directly in the browser. See https://stevekautz.com/cs336f22/js_notes/
JS is a fascinating language, and I find I can amuse myself for hours trying to figure out how it works. It is huge entertainment value for anyone interested in programming languages.
python3 -m http.server 2222(here 2222 is the port number you'll point your browser to).
If you are running Python 2, the equivalent library is:
python -m SimpleHTTPServer 2222
As we start using and understanding OpenGL we'll start incorporating parts of a higher-level library called Three.js into our work. Normally all you need in order to use Three.js is the file three.min.js, the "minified" version of the library, but I strongly recommend you also have a local copy of the non-minified version, three.js. There is documentation, but you'll quickly find you need to sometimes look at the source code to figure out what's going on, and it is much, much easier to navigate the full version. You can get both versions here. (You probably don't need the entire tarball from the download link on the main page.)
Article by Eric Haines gives a detailed overview of the modern graphics pipeline
Reference card for WebGL and GLSL
Html man pages for OpenGL ES 2.0
(Functions do the same things as WegGL so the function descriptions are accurate, but the parameter types for the JS versions are sometimes different, so check the reference card above for the exact function signature.)
Eric Haines' Udacity course on graphics using three.js
(You can download and read the "book" chapters - basically the lecture scripts here. I've read most of these and the presentations are really good, though too much of the OpenGL details and mathematics are hidden to consider this a "textbook". The chapters on transformations and matrices are likely to be especially useful.)
The Real-Time Rendering site (has lots of references and recommended books)
Derivation of projection matrix
Phong reflection model
JS Module pattern and IIFEs
Some nice demos of Perlin noise used for displacement mapping, the fireball also has an associated tutorial about how it was done.
"A trip through the graphics pipeline", lots of hardware-oriented detail