Not all meshes come with normals.
For example, the provided SphereMesh has no normals.
Similarly, some GLTF files come without normals.
Note that this still allows the user to specify their own normals. For example, the CuboidMesh uses face normals by default.
However, if the user sets useFaceNormals to false, the vertex normals are computed instead.
All objects need normals for lighting purposes. The choice of using face or vertex normal is up to the user, as that will have different consequences.
Description
Add normals to surfaces when not specified.
Not all meshes come with normals. For example, the provided
SphereMesh
has no normals. Similarly, some GLTF files come without normals. Note that this still allows the user to specify their own normals. For example, theCuboidMesh
uses face normals by default. However, if the user setsuseFaceNormals
to false, the vertex normals are computed instead.All objects need normals for lighting purposes. The choice of using face or vertex normal is up to the user, as that will have different consequences.
Checklist
docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?