MCPcopy Create free account
hub / github.com/pmndrs/postprocessing / loadAsync

Method loadAsync

src/loaders/LUT3dlLoader.js:64–82  ·  view source on GitHub ↗

* Loads a LUT. * * @param {String} url - The URL of the 3dl-file. * @param {Function} [onProgress] - A progress callback that receives the XMLHttpRequest instance. * @return {Promise } A promise that returns the lookup texture.

(url, onProgress = () => {})

Source from the content-addressed store, hash-verified

62 */
63
64 loadAsync(url, onProgress = () => {}) {
65
66 const externalManager = this.manager;
67 const internalManager = new LoadingManager();
68
69 return new Promise((resolve, reject) => {
70
71 internalManager.onError = (url) => {
72
73 externalManager.itemError(url);
74 reject(`Failed to load ${url}`);
75
76 };
77
78 this.load(url, resolve, onProgress);
79
80 });
81
82 }
83
84 /**
85 * Parses the given data.

Callers

nothing calls this directly

Calls 1

loadMethod · 0.95

Tested by

no test coverage detected