copy method

Implementation

@override
WebGLMultipleRenderTargets copy(WebGLRenderTarget source) {
  dispose();

  width = source.width;
  height = source.height;
  depth = source.depth;

  viewport.set(0, 0, width, height);
  scissor.set(0, 0, width, height);

  depthBuffer = source.depthBuffer;
  stencilBuffer = source.stencilBuffer;
  if ( source.depthTexture != null ) {
    depthTexture = source.depthTexture!.clone();
  }

  texture.length = 0;

  for (var i = 0, il = source.texture.length; i < il; i++) {
    texture[i] = source.texture[i].clone();
  }

  return this;
}