copy(texture) {
        if(!texture || texture.type !== "Texture") {
            if(!this.renderer.production) {
                throwWarning(this.type + ": Unable to set the texture from texture:", texture);
            }
            return;
        }

        // copy states
        this._globalParameters = Object.assign({}, texture._globalParameters);
        this._state = Object.assign({}, texture._state);

        // regenerate mips if needed
        this.parameters.generateMipmap = texture.parameters.generateMipmap;
        this._state.generateMipmap = null;

        // copy source
        this._size = texture._size;

        // trigger loaded callback if needed
        if(!this._sourceLoaded && texture._sourceLoaded) {
            this._onSourceLoadedCallback && this._onSourceLoadedCallback();
        }

        this._sourceLoaded = texture._sourceLoaded;

        // trigger uploaded callback if needed
        if(!this._uploaded && texture._uploaded) {
            this._onSourceUploadedCallback && this._onSourceUploadedCallback();
        }

        this._uploaded = texture._uploaded;

        this.sourceType = texture.sourceType;
        this.source = texture.source;
        this._videoFrameCallbackID = texture._videoFrameCallbackID;

        // copy texture
        this._sampler.texture = texture._sampler.texture;

        // keep a track from the original one
        this._copiedFrom = texture;

        // update its texture matrix if needed and we're good to go!
        if(this._parent && this._parent._program && (!this._canDraw || !this._textureMatrix.matrix)) {
            this._setSize();

            this._canDraw = true;
        }

        this._updateTexParameters();

        // force rendering
        this.renderer.needRender();
    }
This copies an already existing Texture object to our texture

     params:
     @texture (Texture): texture to set from
*