I'm having trouble understanding how normals are computed in Three.js.
Here is the issue I am facing:
I have created a simple plane using the following code:
var plane = new THREE.PlaneGeometry(10, 100, 10, 10);
var material = new THREE.MeshBasicMaterial();
material.setValues({side: THREE.DoubleSide, color: 0xaabbcc});
var mesh = new THREE.Mesh(plane, material);
mesh.rotateY(Math.PI / 2);
scene.add(mesh);
When I check the normal of this plane, it shows up as (0, 0, 1). However, since the plane is parallel to the z-axis, this value seems incorrect.
I attempted to calculate the normals by adding the following code:
mesh.geometry.computeFaceNormals();
mesh.geometry.computeVertexNormals();
Despite this, I am still getting the same inaccurate result.
Did I overlook something?
How can I retrieve accurate normal values from Three.js?
Thank you.