Skip to content
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

ObjectLoader: Add async API. #22031

Merged
merged 1 commit into from
Jun 22, 2021
Merged

ObjectLoader: Add async API. #22031

merged 1 commit into from
Jun 22, 2021

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jun 22, 2021

Related issue: see #22026.

Description

This PR adds parseAsync(), loadAsync() and parseImagesAsync() to ObjectLoader. This resolves a hack during the image loading process which also closes #13177.

The previous usage of the loader still works. At some point in the future, we might want to add a deprecation message two load() and parse() and then remove both methods.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jun 22, 2021

This PR also makes #22024 redundant.

@mrdoob mrdoob added this to the r130 milestone Jun 22, 2021
@mrdoob mrdoob merged commit 34d4516 into mrdoob:dev Jun 22, 2021
@mrdoob
Copy link
Owner

mrdoob commented Jun 22, 2021

Thanks!

@joshuaellis joshuaellis mentioned this pull request Jul 5, 2021
5 tasks
@tingspain
Copy link

Hello, I think the new changes broke the example of the lightmap. It stoped working. Now, It gives the following uncaught syntax error:
Uncaught SyntaxError: Unexpected reserved word @ webgl_materials_lightmap.html:59

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jul 15, 2021

It works with Chrome 91.0.4472.114 and Firefox 90 without issues. Maybe you are using an outdated browser?

@tingspain
Copy link

Indeed, I was using Opera 73.0.3856.344 and Safari 14.1.1 (16611.2.7.1.4), and on both of them, the example was not working. I tried with chrome 91.0.4472.114, and it worked perfectly. I updated to Opera 77.0.4054.254, and it works perfectly too.

So... thanks for the hint!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ObjectLoader.js uses "anonymous" LoadingManager in parseImages()
3 participants