clone method

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

Implementation

@override
Mesh clone([bool? recursive = true]) {
  if(material is List){
    List mats = [];
    for(int i = 0; i < material.length; i++){
      mats.add(material[i].clone());
    }
    return Mesh(geometry!.clone(), mats).copy(this, recursive);
  }
  else{
    return Mesh(geometry!.clone(), material.clone()).copy(this, recursive);
  }
}