Upon running geometry.computeVertexNormals()
in a THREE.BoxGeometry
, the resulting vectors seem to be incorrect after calculating the vertex normals. Is this an error or expected behavior?
For reference, consider this example:
geometry = new THREE.BoxGeometry(50, 50, 50);
geometry.computeVertexNormals();
material = new THREE.MeshNormalMaterial();
While everything appears correct initially, upon rotating the X axis, you'll notice that the vectors are pointing in different directions.
mesh.rotation.x = 90 * Math.PI / 180;
One would expect the vector to point directly from the center of the three existing vectors before merging the geometry. Shouldn't it look something like this:
https://i.sstatic.net/MvryY.png
If not, could someone provide an explanation as to why this discrepancy occurs?
Thank you in advance.