ThreeJs ThreeMF loader is blocking the UI while upzipping the 3MF file.
See original GitHub issueDescription of the problem
ThreeJs ThreeMF loader is blocking the UI while upzipping the 3MF file.
try {
zip = new JSZip( data ); // eslint-disable-line no-undef
} catch ( e ) {
if ( e instanceof ReferenceError ) {
console.error( 'THREE.3MFLoader: jszip missing and file is compressed.' );
return null;
}
}
According the the JSZip documenation I assume it would be better to unzip the container asynchronously not to block the UI.
Three.js version
- [x ] Dev
- r120
- …
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Hardware Requirements (graphics card, VR Device, …)
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
Problem when I try to load a 3MF model - three.js forum
When I try to load a 3D model from a .3mf file format the following error occurs: three.module.js:4698 Uncaught TypeError: Cannot read ...
Read more >Three.js obj model loading freezes the Canvas until load is ...
During the loading phase, the entire canvas freezes. This is a really big problem as I am loading models in on the fly...
Read more >Can't change material of loaded 3MF file as the object has no ...
I've noticed that when loading a 3MF file with the 3MF loader, the resulting group and child meshes do not contain any normal...
Read more >WHY my .3mf file cannot be correctly loaded and show in the ...
I used solidworks to export a .3mf file, but I can't use 3MFLoader to show it in the webpage. The error massage in...
Read more >Textures and 3MFLoader - Bug? - Questions - three.js forum
js, there's a point where it looks through the .3mf file (which is actually a zip file) to load resources from various locations....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After a closer performance analysis of
3MFLoader.parse()
, the actual overhead does indeed not come from the unzip operation.DOMParser.parseFromString()
as well as the processing of the XML document takes way more time than anything else. Inwebgl_loader_3mf_materials
, unzipping takes 2.6 ms whereas the rest ofparse()
takes 1.85 seconds.So similar to
ColladaLoader
, the actual overhead is produced by parsing and processing XML. Hence, marking this issue as a duplicate of #11746.Might be a good candidate for https://github.com/mrdoob/three.js/pull/19650? We could keep JSZip but move it to a worker.