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

Docs: Add missing load onProgress behaviour. #22990

Merged
merged 1 commit into from
Dec 13, 2021

Conversation

dweremeichik
Copy link
Contributor

Related issue: #15584

Description

Load's onProgress function has an undocumented behaviour. If a server does not set the Content-Length header, the onProgress function sets total to 0. This change documents that behaviour. It also corrects an outdated onProgress description for MaterialLoader.

@dweremeichik
Copy link
Contributor Author

I am not sure if CubeTextureLoader has incorrect documentation for onProgress as ImageLoader has the following for onProgress "[page:Function onProgress] — This callback function is currently not supported."

@mrdoob
Copy link
Owner

mrdoob commented Dec 9, 2021

Nit: I would say "If the server " instead of "If your server".

@mrdoob mrdoob added this to the r136 milestone Dec 9, 2021
@dweremeichik
Copy link
Contributor Author

I was torn on that myself; I will edit the patch

Load's onProgress function has an undocumented behaviour. If a server
does not set the Content-Length header, the onProgress function sets
total to 0. This change documents that behaviour.
@Mugen87 Mugen87 changed the title Add missing load onProgress behaviour Docs: Add missing load onProgress behaviour. Dec 10, 2021
@Mugen87 Mugen87 merged commit bccb629 into mrdoob:dev Dec 13, 2021
gero3 pushed a commit to gero3/three.js that referenced this pull request Dec 13, 2021
Load's onProgress function has an undocumented behaviour. If a server
does not set the Content-Length header, the onProgress function sets
total to 0. This change documents that behaviour.
@mrdoob
Copy link
Owner

mrdoob commented Dec 23, 2021

Thanks!

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.

3 participants