Recently, I learn Away3d 4.0. When I dig into the source of Cube. In the buildGeometry function, the following code.
vertexNormals[vidx] = 0;
vertexTangents[vidx] = 1;
vertices[vidx++] = outer_pos;
vertexNormals[vidx] = 0;
vertexTangents[vidx] = 0;
vertices[vidx++] = -hh + j*dh;
vertexNormals[vidx] = -1;
vertexTangents[vidx] = 0;
vertices[vidx++] = -hd;
I want to know what vertexNormals and vertexTangents are, and how to calculate THEM. Are there any tutorials on them?
Thanks in advance.