copy method

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

Implementation

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

  fragmentShader = source.fragmentShader;
  vertexShader = source.vertexShader;

  uniforms = cloneUniforms(source.uniforms);

  defines = json.decode(json.encode(source.defines));

  wireframe = source.wireframe;
  wireframeLinewidth = source.wireframeLinewidth;

  fog = source.fog;

  lights = source.lights;
  clipping = source.clipping;

  extensions = json.decode(json.encode(source.extensions));

  glslVersion = source.glslVersion;

  return this;
}