Node constructor

Node({
  1. String name = '',
  2. Matrix4? localTransform,
  3. Mesh? mesh,
})

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));
  }
}