Question about mesh visibility based on dot product

The normal vector is a concept in maths that specifies the “direction” of a surface. When you define a plane, you also define the normal of that plane. As meshes are formed of triangles, and triangles can be thought of as a limited plane, each triangle of the mesh also has a normal as well:

I recommend taking some time to read and watch a little more material on normals, since they’re an essential concept for 3D programming:

https://www.gamedeveloper.com/disciplines/vector-maths-for-game-dev-beginners

What model-viewer calls the normal is the “direction” the mesh is facing. You can imagine this more easily with a more complex mesh, such as a character. This mesh will have many different normals for each triangle in that mesh, but we need to choose a single vector to represent what direction the character is facing. With this direction chosen, then the mesh angle to the camera can be calculated.

Another technique that can be done with normals is the “toon shader” illumination effect. It also uses the dot product to calculate between two directions, in this case, vertex normals, and the light direction: Create Your Own Toon Shader with Babylon.js! Part 1 - YouTube