mesh.faceNormal
Unit normal of one face, outward for a counter-clockwise face.
Usage
mesh.faceNormal(f: number): Vector3 | nullParameters
fnumberFace index.
Returns
The unit normal; null when f is not a face or the face has no area.
Guarantees
- the result has length 1 (Vector3.length)
- The same result on every machine.
Example
Mesh.box().value.faceNormal(1) // → { x: 0, y: 0, z: 1 }