copy method

  1. @override
MeshStandardMaterial copy(
  1. Material source
)
override

Implementation

@override
MeshStandardMaterial copy(Material source) {
  super.copy(source);

  defines = {'STANDARD': ''};

  color = source.color.clone();
  roughness = source.roughness;
  metalness = source.metalness;

  map = source.map;

  lightMap = source.lightMap;
  lightMapIntensity = source.lightMapIntensity;

  aoMap = source.aoMap;
  aoMapIntensity = source.aoMapIntensity;

  emissive = source.emissive?.clone();
  emissiveMap = source.emissiveMap;
  emissiveIntensity = source.emissiveIntensity;

  bumpMap = source.bumpMap;
  bumpScale = source.bumpScale;

  normalMap = source.normalMap;
  normalMapType = source.normalMapType;
  normalScale = source.normalScale?.clone();

  displacementMap = source.displacementMap;
  displacementScale = source.displacementScale;
  displacementBias = source.displacementBias;

  roughnessMap = source.roughnessMap;

  metalnessMap = source.metalnessMap;

  alphaMap = source.alphaMap;

  envMap = source.envMap;
  envMapIntensity = source.envMapIntensity;

  wireframe = source.wireframe;
  wireframeLinewidth = source.wireframeLinewidth;
  wireframeLinecap = source.wireframeLinecap;
  wireframeLinejoin = source.wireframeLinejoin;

  flatShading = source.flatShading;

  fog = source.fog;

  return this;
}