copy method

  1. @override
Mesh copy(
  1. Object3D source, [
  2. bool? recursive
])
override

Implementation

@override
Mesh copy(Object3D source, [bool? recursive]) {
  super.copy(source, false);
  if (source is Mesh) {
    if (source.morphTargetInfluences != null) {
      morphTargetInfluences = source.morphTargetInfluences!.sublist(0);
    }
    if (source.morphTargetDictionary != null) {
      morphTargetDictionary =
          json.decode(json.encode(source.morphTargetDictionary));
    }
    material = source.material;
    geometry = source.geometry;
  }
  return this;
}