clone method

  1. @override
Mesh clone([
  1. bool? recursive = true
])
override

Implementation

@override
Mesh clone([bool? recursive = true]) {
  final materials = <Material>[];

  if (material is Material) {
    materials.add((material as Material).clone());
  } else if (material is Iterable) {
    materials.addAll((material as Iterable).map((e) => (e as Material).clone()));
  }

  return Mesh(geometry!.clone(), materials).copy(this, recursive);
}