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

Method load

demo/src/demos/ShockWaveDemo.js:166–200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164 }
165
166 load() {
167
168 const assets = this.assets;
169 const loadingManager = this.loadingManager;
170 const smaaImageLoader = new SMAAImageLoader(loadingManager);
171
172 const anisotropy = Math.min(this.composer.getRenderer()
173 .capabilities.getMaxAnisotropy(), 8);
174
175 return new Promise((resolve, reject) => {
176
177 if(assets.size === 0) {
178
179 loadingManager.onLoad = () => setTimeout(resolve, 250);
180 loadingManager.onProgress = ProgressManager.updateProgress;
181 loadingManager.onError = url => console.error(`Failed to load ${url}`);
182
183 Sponza.load(assets, loadingManager, anisotropy);
184
185 smaaImageLoader.load(([search, area]) => {
186
187 assets.set("smaa-search", search);
188 assets.set("smaa-area", area);
189
190 });
191
192 } else {
193
194 resolve();
195
196 }
197
198 });
199
200 }
201
202 initialize() {
203

Callers

nothing calls this directly

Calls 3

loadMethod · 0.95
getRendererMethod · 0.80
setMethod · 0.80

Tested by

no test coverage detected