destroy(options = false)
    {
        const destroySource = typeof options === 'boolean' ? options : options && options.baseTexture;

        if (this._onSourceUpdateBinding) this._onSourceUpdateBinding.detach();
        if (this._onSourceReadyBinding) this._onSourceReadyBinding.detach();

        this._onSourceUpdateBinding = null;
        this._onSourceReadyBinding = null;

        if (destroySource)
        {
            this.source.destroy();
        }

        this.source = null;
        this.trim = null;
        this.orig = null;

        this.onUpdate.detachAll();
        this.onUpdate = null;

        this._frame = null;
        this._uvs = null;
    }
/**
     * Destroys this texture.
     *
     * @param {object|boolean} options - A boolean value will act as if all options are set to that value.
     * @param {boolean} options.destroySource=false - Whether to destroy the texture source as well.
     */
Destroys this texture.
@param {object|boolean} options - A boolean value will act as if all options are set to that value.
@param {boolean} options.destroySource=false - Whether to destroy the texture source as well.
Destroys this texture . @param { object|boolean } options - A boolean value will act as if all options are set to that value . @param { boolean } options . destroySource = false - Whether to destroy the texture source as well .
destroy(options = false)
    {
        const destroySource = typeof options === 'boolean' ? options : options && options.baseTexture;
        if (this._onSourceUpdateBinding) this._onSourceUpdateBinding.detach();
        if (this._onSourceReadyBinding) this._onSourceReadyBinding.detach();
        this._onSourceUpdateBinding = null;
        this._onSourceReadyBinding = null;
        if (destroySource)
        {
            this.source.destroy();
        }
        this.source = null;
        this.trim = null;
        this.orig = null;
        this.onUpdate.detachAll();
        this.onUpdate = null;
        this._frame = null;
        this._uvs = null;
    }
destroy ( options = false ) { const destroySource = typeof options === 'boolean' ? options : options && options . baseTexture ; if ( this . _onSourceUpdateBinding ) this . _onSourceUpdateBinding . detach ( ) ; if ( this . _onSourceReadyBinding ) this . _onSourceReadyBinding . detach ( ) ; this . _onSourceUpdateBinding = null ; this . _onSourceReadyBinding = null ; if ( destroySource ) { this . source . destroy ( ) ; } this . source = null ; this . trim = null ; this . orig = null ; this . onUpdate . detachAll ( ) ; this . onUpdate = null ; this . _frame = null ; this . _uvs = null ; }
Destroys this texture.
Destroys this texture .