-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3MFLoader needs async handling of JSZip #11583
Comments
We rely on sync parsing though... We use this pattern: var loader = new THREE.3MFLoader();
var model = loader.parse( data ); |
It's in the parse function: The See https://github.com/Stuk/jszip/blob/master/lib/index.js
|
😕 |
yeah sorry .... libs change more and more to async handling .. |
Seems like we'll have to stay with an old version or switch to a library that allows synchronous. |
@mrdoob Do you still prefer sync JSZip? Yeah, sync method is easy to use and if we switch to async we break compatibility of .parse(). But I think less blocking the main thread by offloading this type of heavy processing like decoding/encoding is getting popular and being a common technique so it may be a good time to rethink of the async option. |
Just to clarify: Because it's async it does not mean the code is executed in a worker. The code is still executed in the main thread. Apart from that, what would be the benefits of an upgrade? Does it fix a bug? Or performance issue? I does not seem so. As long as there is no compelling reason, I would not perform a change which does result in migration effort for the user. |
And this should be the benefit because of less main thread blocking.
I'm not sure if I understand correctly, but do you mean the majority of JSZip 3 code still runs in main thread? |
Ah, wait. "Worker" in thir thread doesn't mean WebWorker but something their own class, which runs just asynchronously but not in WebWorkers ...? |
Description of the problem
3MF Loader relies on
JSZip(data)
constructor, but newer versions of JSZip use loadAsync.Three.js version
[x] r86
Browser
[x] All of them
OS
Hardware Requirements (graphics card, VR Device, ...)
The text was updated successfully, but these errors were encountered: