copy method

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

Copy the parameters from the passed material into this material.

Implementation

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

  color.setFrom(source.color);

  map = source.map;
  gradientMap = source.gradientMap;

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

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

  emissive?.setFrom(source.emissive!);
  emissiveMap = source.emissiveMap;
  emissiveIntensity = source.emissiveIntensity;

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

  normalMap = source.normalMap;
  normalMapType = source.normalMapType;
  normalScale?.setFrom(source.normalScale!);

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

  alphaMap = source.alphaMap;

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

  fog = source.fog;

  return this;
}