update(renderer = null, silent = false)
    {
        this.width = this.source.naturalWidth || this.source.videoWidth || this.source.width;
        this.height = this.source.naturalHeight || this.source.videoHeight || this.source.height;

        this.isPowerOfTwo = bitTwiddle.isPow2(this.width) && bitTwiddle.isPow2(this.height);

        if (renderer)
        {
            this._update(renderer.uid);
        }
        else
        {
            Object.keys(this._glTextures).forEach((k) => this._update(k));
        }

        if (this.source.currentTime && !this.source.paused && !this.source.ended)
        {
            this._onSourcePlay();
        }

        if (!silent)
        {
            this.onUpdate.dispatch();
        }

        return this;
    }
/**
     * Updates the texture properties based on the source.
     *
     * @param {Renderer} renderer - The renderer to update on. If not passed, all are updated.
     * @param {boolean} silent - Should we skip dispatching the update event?
     * @return {TextureSource} Returns itself.
     */
Updates the texture properties based on the source.
@param {Renderer} renderer - The renderer to update on. If not passed, all are updated.
@param {boolean} silent - Should we skip dispatching the update event.
@return {TextureSource} Returns itself.
Updates the texture properties based on the source . @param { Renderer } renderer - The renderer to update on . If not passed all are updated . @param { boolean } silent - Should we skip dispatching the update event . @return { TextureSource } Returns itself .
update(renderer = null, silent = false)
    {
        this.width = this.source.naturalWidth || this.source.videoWidth || this.source.width;
        this.height = this.source.naturalHeight || this.source.videoHeight || this.source.height;
        this.isPowerOfTwo = bitTwiddle.isPow2(this.width) && bitTwiddle.isPow2(this.height);
        if (renderer)
        {
            this._update(renderer.uid);
        }
        else
        {
            Object.keys(this._glTextures).forEach((k) => this._update(k));
        }
        if (this.source.currentTime && !this.source.paused && !this.source.ended)
        {
            this._onSourcePlay();
        }
        if (!silent)
        {
            this.onUpdate.dispatch();
        }
        return this;
    }
update ( renderer = null , silent = false ) { this . width = this . source . naturalWidth || this . source . videoWidth || this . source . width ; this . height = this . source . naturalHeight || this . source . videoHeight || this . source . height ; this . isPowerOfTwo = bitTwiddle . isPow2 ( this . width ) && bitTwiddle . isPow2 ( this . height ) ; if ( renderer ) { this . _update ( renderer . uid ) ; } else { Object . keys ( this . _glTextures ) . forEach ( ( k ) => this . _update ( k ) ) ; } if ( this . source . currentTime && ! this . source . paused && ! this . source . ended ) { this . _onSourcePlay ( ) ; } if ( ! silent ) { this . onUpdate . dispatch ( ) ; } return this ; }
Updates the texture properties based on the source.
Updates the texture properties based on the source .