Node constructor
Creates a node with an optional name, localTransform, and mesh.
When omitted, localTransform defaults to the identity matrix and the
node has no associated geometry. A non-null mesh is attached as a
MeshComponent.
Implementation
Node({this.name = '', Matrix4? localTransform, Mesh? mesh})
: _localTransform = localTransform ?? Matrix4.identity() {
if (mesh != null) {
addComponent(MeshComponent(mesh));
}
}