function RenderTarget(renderer) {
      var _ref12 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          shaderPass = _ref12.shaderPass,
          _ref12$depth = _ref12.depth,
          depth = _ref12$depth === void 0 ? false : _ref12$depth,
          _ref12$clear = _ref12.clear,
          clear = _ref12$clear === void 0 ? true : _ref12$clear,
          maxWidth = _ref12.maxWidth,
          maxHeight = _ref12.maxHeight,
          _ref12$minWidth = _ref12.minWidth,
          minWidth = _ref12$minWidth === void 0 ? 1024 : _ref12$minWidth,
          _ref12$minHeight = _ref12.minHeight,
          minHeight = _ref12$minHeight === void 0 ? 1024 : _ref12$minHeight,
          _ref12$texturesOption = _ref12.texturesOptions,
          texturesOptions = _ref12$texturesOption === void 0 ? {} : _ref12$texturesOption;

      _classCallCheck(this, RenderTarget);

      this.type = "RenderTarget"; // we could pass our curtains object OR our curtains renderer object

      renderer = renderer && renderer.renderer || renderer;

      if (!renderer || renderer.type !== "Renderer") {
        throwError(this.type + ": Renderer not passed as first argument", renderer);
      } else if (!renderer.gl) {
        if (!renderer.production) throwError(this.type + ": Unable to create a " + this.type + " because the Renderer WebGL context is not defined"); // return if no gl context

        return;
      }

      this.renderer = renderer;
      this.gl = this.renderer.gl;
      this.index = this.renderer.renderTargets.length;
      this._shaderPass = shaderPass; // whether to create a render buffer

      this._depth = depth;
      this._shouldClear = clear;
      this._maxSize = {
        width: maxWidth ? Math.min(this.renderer.state.maxTextureSize / 4, maxWidth) : this.renderer.state.maxTextureSize / 4,
        // enough!
        height: maxHeight ? Math.min(this.renderer.state.maxTextureSize / 4, maxHeight) : this.renderer.state.maxTextureSize / 4
      };
      this._minSize = {
        width: minWidth * this.renderer.pixelRatio,
        height: minHeight * this.renderer.pixelRatio
      }; // default textures options depends on the type of Mesh and WebGL context

      texturesOptions = Object.assign({
        // set default sampler to "uRenderTexture" and isFBOTexture to true
        sampler: "uRenderTexture",
        isFBOTexture: true,
        premultiplyAlpha: false,
        anisotropy: 1,
        generateMipmap: false,
        floatingPoint: "none",
        wrapS: this.gl.CLAMP_TO_EDGE,
        wrapT: this.gl.CLAMP_TO_EDGE,
        minFilter: this.gl.LINEAR,
        magFilter: this.gl.LINEAR
      }, texturesOptions);
      this._texturesOptions = texturesOptions;
      this.userData = {};
      this.uuid = generateUUID();
      this.renderer.renderTargets.push(this); // we've added a new object, keep Curtains class in sync with our renderer

      this.renderer.onSceneChange();

      this._initRenderTarget();
    }
Here we create a RenderTarget class object
     params :
   @renderer (Curtains renderer or Renderer class object): our curtains object OR our curtains renderer object
     @shaderPass (ShaderPass class object): shader pass that will use that render target. Default to null
   @depth (bool, optional): whether to create a depth buffer (handle depth inside your render target). Default to false.
   @clear (bool, optional): whether the content of the render target should be cleared before being drawn. Should be set to false to handle ping-pong shading. Default to true.
     @minWidth (float, optional): minimum width of the render target
   @minHeight (float, optional): minimum height of the render target
     @texturesOptions (object, optional): options and parameters to apply to the render target texture. See the Texture class object.
     returns :
   @this: our RenderTarget class object
*