copy method

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

Copy the parameters from the passed material into this material.

Implementation

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

  defines = {'MATCAP': ''};

  color.setFrom(source.color);

  matcap = source.matcap;

  map = source.map;

  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;

  flatShading = source.flatShading;

  fog = source.fog;

  return this;
}