Skip to content

Commit

Permalink
Docs: cleanup Loaders (#23180)
Browse files Browse the repository at this point in the history
* Docs: cleanup Loaders

* Docs: cleanup texture loaders

* Update CubeTextureLoader.html

Co-authored-by: Michael Herzog <[email protected]>
  • Loading branch information
mistic100 and Mugen87 authored Jan 10, 2022
1 parent 188ebb3 commit 5e12def
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 33 deletions.
4 changes: 2 additions & 2 deletions docs/api/en/loaders/AnimationLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ <h3>[method:undefined load]( [param:String url], [param:Function onLoad], [param
[page:String url] — the path or URL to the file. This can also be a
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:AnimationClip animation clips].<br />
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] — Will be called if load errors.<br /><br />
[page:Function onProgress] (optional) — Will be called while load progresses. The argument will be the ProgressEvent instance, which contains .[page:Boolean lengthComputable], .[page:Integer total] and .[page:Integer loaded]. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] (optional) — Will be called if load errors.<br /><br />

Begin loading from url and pass the loaded animation to onLoad.
</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/api/en/loaders/AudioLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ <h3>[method:undefined load]( [param:String url], [param:Function onLoad], [param
[page:String url] — the path or URL to the file. This can also be a
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded text response.<br />
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] — Will be called when load errors.<br />
[page:Function onProgress] (optional) — Will be called while load progresses. The argument will be the ProgressEvent instance, which contains .[page:Boolean lengthComputable], .[page:Integer total] and .[page:Integer loaded]. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] (optional) — Will be called when load errors.<br />
</p>
<p>
Begin loading from url and pass the loaded [page:String AudioBuffer] to onLoad.
Expand Down
4 changes: 2 additions & 2 deletions docs/api/en/loaders/BufferGeometryLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ <h3>[method:undefined load]( [param:String url], [param:Function onLoad], [param
[page:String url] — the path or URL to the file. This can also be a
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].d<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:BufferGeometry].<br />
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] — Will be called when load errors.<br />
[page:Function onProgress] (optional) — Will be called while load progresses. The argument will be the ProgressEvent instance, which contains .[page:Boolean lengthComputable], .[page:Integer total] and .[page:Integer loaded]. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] (optional) — Will be called when load errors.<br />
</p>
<p>
Begin loading from url and call onLoad with the parsed response content.
Expand Down
8 changes: 4 additions & 4 deletions docs/api/en/loaders/CompressedTextureLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ <h3>[method:CompressedTexture load]( [param:String url], [param:Function onLoad]
<p>
[page:String url] — the path or URL to the file. This can also be a
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded texture.<br />
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] — Will be called when load errors.<br />
[page:Function onLoad] (optional) — Will be called when load completes. The argument will be the loaded texture.<br />
[page:Function onProgress] (optional) — Will be called while load progresses. The argument will be the ProgressEvent instance, which contains .[page:Boolean lengthComputable], .[page:Integer total] and .[page:Integer loaded]. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] (optional) — Will be called when load errors.<br />
</p>
<p>
Begin loading from url and pass the loaded texture to onLoad.
Begin loading from url and pass the loaded texture to onLoad. The method also returns a new texture object which can directly be used for material creation.
</p>

<h2>Source</h2>
Expand Down
8 changes: 4 additions & 4 deletions docs/api/en/loaders/CubeTextureLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ <h3>[method:CubeTexture load]( [param:String urls], [param:Function onLoad], [pa
Note that, by convention, cube maps are specified in a coordinate system in which positive-x is to the right
when looking up the positive-z axis -- in other words, using a left-handed coordinate system.
Since three.js uses a right-handed coordinate system, environment maps used in three.js will have pos-x and neg-x swapped.<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Texture texture].<br />
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] — Will be called when load errors.<br />
[page:Function onLoad] (optional) — Will be called when load completes. The argument will be the loaded [page:CubeTexture texture].<br />
[page:Function onProgress] (optional) — This callback function is currently not supported.<br />
[page:Function onError] (optional) — Will be called when load errors.<br />
</p>
<p>
Begin loading from url and pass the loaded [page:CubeTexture texture] to onLoad.
Begin loading from url and pass the loaded [page:CubeTexture texture] to onLoad. The method also returns a new texture object which can directly be used for material creation.
</p>

<h2>Source</h2>
Expand Down
8 changes: 4 additions & 4 deletions docs/api/en/loaders/DataTextureLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ <h3>[method:DataTexture load]( [param:String url], [param:Function onLoad], [par
<p>
[page:String url] — the path or URL to the file. This can also be a
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded texture.<br />
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] — Will be called when load errors.<br />
[page:Function onLoad] (optional) — Will be called when load completes. The argument will be the loaded texture.<br />
[page:Function onProgress] (optional) — Will be called while load progresses.The argument will be the ProgressEvent instance, which contains .[page:Boolean lengthComputable], .[page:Integer total] and .[page:Integer loaded]. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] (optional) — Will be called when load errors.<br />
</p>
<p>
Begin loading from url and pass the loaded texture to onLoad.
Begin loading from url and pass the loaded texture to onLoad. The method also returns a new texture object which can directly be used for material creation.
</p>

<h2>Source</h2>
Expand Down
5 changes: 2 additions & 3 deletions docs/api/en/loaders/FileLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<h1>[name]</h1>

<p class="desc">
A low level class for loading resources with XMLHttpRequest, used internaly by most loaders.
A low level class for loading resources with Fetch, used internaly by most loaders.
It can also be used directly to load any file type that does not have a loader.
</p>

Expand Down Expand Up @@ -79,8 +79,7 @@ <h3>[method:undefined load]( [param:String url], [param:Function onLoad], [param
[page:String url] — the path or URL to the file. This can also be a
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
[page:Function onLoad] (optional) — Will be called when loading completes. The argument will be the loaded response.<br />
[page:Function onProgress] (optional) — Will be called while load progresses. The argument will be the XMLHttpRequest instance,
which contains .[page:Integer total] and .[page:Integer loaded] bytes. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onProgress] (optional) — Will be called while load progresses. The argument will be the ProgressEvent instance, which contains .[page:Boolean lengthComputable], .[page:Integer total] and .[page:Integer loaded]. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] (optional) — Will be called if an error occurs.<br /><br />

Load the URL and pass the response to the onLoad function.
Expand Down
4 changes: 2 additions & 2 deletions docs/api/en/loaders/ImageBitmapLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ <h3>[method:undefined load]( [param:String url], [param:Function onLoad], [param
[page:String url] — the path or URL to the file. This can also be a
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Image image].<br />
[page:Function onProgress] — This callback function is currently not supported.<br />
[page:Function onError] — Will be called when load errors.<br />
[page:Function onProgress] (optional) — This callback function is currently not supported.<br />
[page:Function onError] (optional) — Will be called when load errors.<br />
</p>
<p>
Begin loading from url and return the [page:ImageBitmap image] object that will contain the data.
Expand Down
4 changes: 2 additions & 2 deletions docs/api/en/loaders/ImageLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ <h3>[method:HTMLImageElement load]( [param:String url], [param:Function onLoad],
[page:String url] — the path or URL to the file. This can also be a
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Image image].<br />
[page:Function onProgress] — This callback function is currently not supported.<br />
[page:Function onError] — Will be called when load errors.<br />
[page:Function onProgress] (optional) — This callback function is currently not supported.<br />
[page:Function onError] (optional) — Will be called when load errors.<br />
</p>
<p>
Begin loading from url and return the [page:Image image] object that will contain the data.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/loaders/Loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h3>[method:undefined load]()</h3>
<h3>[method:Promise loadAsync]( [param:String url], [param:Function onProgress] )</h3>
<p>
[page:String url] — A string containing the path/URL of the file to be loaded.<br />
[page:Function onProgress] (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, that contains .[page:Integer total] and .[page:Integer loaded] bytes. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onProgress] (optional) A function to be called while the loading is in progress. The argument will be the ProgressEvent instance, which contains .[page:Boolean lengthComputable], .[page:Integer total] and .[page:Integer loaded]. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
</p>
<p>
This method is equivalent to [page:.load], but returns a [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise Promise].
Expand Down
4 changes: 2 additions & 2 deletions docs/api/en/loaders/MaterialLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ <h3>[method:undefined load]( [param:String url], [param:Function onLoad], [param
[page:String url] — the path or URL to the file. This can also be a
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Material].<br />
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] — Will be called when load errors.<br /><br />
[page:Function onProgress] (optional) — Will be called while load progresses. The argument will be the ProgressEvent instance, which contains .[page:Boolean lengthComputable], .[page:Integer total] and .[page:Integer loaded]. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] (optional) — Will be called when load errors.<br /><br />

Begin loading from url.
</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/api/en/loaders/ObjectLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ <h3>[method:undefined load]( [param:String url], [param:Function onLoad], [param
[page:String url] — the path or URL to the file. This can also be a
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Object3D object].<br />
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] — Will be called when load errors.<br />
[page:Function onProgress] (optional) — Will be called while load progresses. The argument will be the ProgressEvent instance, which contains .[page:Boolean lengthComputable], .[page:Integer total] and .[page:Integer loaded]. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] (optional) — Will be called when load errors.<br />
</p>
<p>
Begin loading from url and call onLoad with the parsed response content.
Expand Down
6 changes: 3 additions & 3 deletions docs/api/en/loaders/TextureLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ <h3>[method:Texture load]( [param:String url], [param:Function onLoad], [param:F
<p>
[page:String url] — the path or URL to the file. This can also be a
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Texture texture].<br />
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes. If the server does not set the Content-Length header; .[page:Integer total] will be 0.<br />
[page:Function onError] — Will be called when load errors.<br /><br />
[page:Function onLoad] (optional) — Will be called when load completes. The argument will be the loaded [page:Texture texture].<br />
[page:Function onProgress] (optional) — This callback function is currently not supported.<br />
[page:Function onError] (optional) — Will be called when load errors.<br /><br />

Begin loading from the given URL and pass the fully loaded [page:Texture texture] to onLoad. The method also returns a new texture object which can directly be used for material creation.
If you do it this way, the texture may pop up in your scene once the respective loading process is finished.
Expand Down

0 comments on commit 5e12def

Please sign in to comment.