copy method

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

Copy the parameters from the passed material into this material.

Implementation

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

  if (source is MeshDistanceMaterial) {
    referencePosition.setFrom(source.referencePosition);
    nearDistance = source.nearDistance;
    farDistance = source.farDistance;
  }

  map = source.map;

  alphaMap = source.alphaMap;

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

  return this;
}