parse( buffer, onLoad, onError ) {

		if ( this.workerConfig === null ) {

			throw new Error( 'THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.' );

		}

		// Check for an existing task using this buffer. A transferred buffer cannot be transferred
		// again from this thread.
		if ( _taskCache.has( buffer ) ) {

			const cachedTask = _taskCache.get( buffer );

			return cachedTask.promise.then( onLoad ).catch( onError );

		}

		this._createTexture( buffer )
			.then( ( texture ) => onLoad ? onLoad( texture ) : null )
			.catch( onError );

	}
Parses the given KTX2 data.

@param {ArrayBuffer} buffer - The raw KTX2 data as an array buffer.
@param {function(CompressedTexture)} onLoad - Executed when the loading/parsing process has been finished.
@param {onErrorCallback} onError - Executed when errors occur.
@returns {Promise} A Promise that resolves when the parsing has been finished.