copy method
Implementation
@override
WebGLMultipleRenderTargets copy(WebGLRenderTarget source) {
dispose();
width = source.width;
height = source.height;
depth = source.depth;
viewport.setValues(0, 0, width.toDouble(), height.toDouble());
scissor.setValues(0, 0, width.toDouble(), height.toDouble());
depthBuffer = source.depthBuffer;
stencilBuffer = source.stencilBuffer;
if (source.depthTexture != null) {
depthTexture = source.depthTexture!.clone();
}
if(texture is GroupTexture){
final children = (texture as GroupTexture).children;
children.length = 0;
final sc = (source.texture as GroupTexture).children;
for (int i = 0, il = sc.length; i < il; i++) {
children[i] = sc[i].clone();
}
}
return this;
}