From 5e12def2d553a190d60d85eb0d36cd3b401bf2ba Mon Sep 17 00:00:00 2001 From: Damien Sorel Date: Mon, 10 Jan 2022 22:18:06 +0100 Subject: [PATCH] Docs: cleanup Loaders (#23180) * Docs: cleanup Loaders * Docs: cleanup texture loaders * Update CubeTextureLoader.html Co-authored-by: Michael Herzog --- docs/api/en/loaders/AnimationLoader.html | 4 ++-- docs/api/en/loaders/AudioLoader.html | 4 ++-- docs/api/en/loaders/BufferGeometryLoader.html | 4 ++-- docs/api/en/loaders/CompressedTextureLoader.html | 8 ++++---- docs/api/en/loaders/CubeTextureLoader.html | 8 ++++---- docs/api/en/loaders/DataTextureLoader.html | 8 ++++---- docs/api/en/loaders/FileLoader.html | 5 ++--- docs/api/en/loaders/ImageBitmapLoader.html | 4 ++-- docs/api/en/loaders/ImageLoader.html | 4 ++-- docs/api/en/loaders/Loader.html | 2 +- docs/api/en/loaders/MaterialLoader.html | 4 ++-- docs/api/en/loaders/ObjectLoader.html | 4 ++-- docs/api/en/loaders/TextureLoader.html | 6 +++--- 13 files changed, 32 insertions(+), 33 deletions(-) diff --git a/docs/api/en/loaders/AnimationLoader.html b/docs/api/en/loaders/AnimationLoader.html index f2a95a19ec7867..136006b16518d0 100644 --- a/docs/api/en/loaders/AnimationLoader.html +++ b/docs/api/en/loaders/AnimationLoader.html @@ -64,8 +64,8 @@

[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].
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:AnimationClip animation clips].
- [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.
- [page:Function onError] — Will be called if load errors.

+ [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.
+ [page:Function onError] (optional) — Will be called if load errors.

Begin loading from url and pass the loaded animation to onLoad.

diff --git a/docs/api/en/loaders/AudioLoader.html b/docs/api/en/loaders/AudioLoader.html index a3f97e4c860dab..1a29147d6c7971 100644 --- a/docs/api/en/loaders/AudioLoader.html +++ b/docs/api/en/loaders/AudioLoader.html @@ -81,8 +81,8 @@

[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].
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded text response.
- [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.
- [page:Function onError] — Will be called when load errors.
+ [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.
+ [page:Function onError] (optional) — Will be called when load errors.

Begin loading from url and pass the loaded [page:String AudioBuffer] to onLoad. diff --git a/docs/api/en/loaders/BufferGeometryLoader.html b/docs/api/en/loaders/BufferGeometryLoader.html index f475c23210094e..72aeea2cf27db5 100644 --- a/docs/api/en/loaders/BufferGeometryLoader.html +++ b/docs/api/en/loaders/BufferGeometryLoader.html @@ -73,8 +73,8 @@

[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
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:BufferGeometry].
- [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.
- [page:Function onError] — Will be called when load errors.
+ [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.
+ [page:Function onError] (optional) — Will be called when load errors.

Begin loading from url and call onLoad with the parsed response content. diff --git a/docs/api/en/loaders/CompressedTextureLoader.html b/docs/api/en/loaders/CompressedTextureLoader.html index 978badddda549f..067a8a9081979d 100644 --- a/docs/api/en/loaders/CompressedTextureLoader.html +++ b/docs/api/en/loaders/CompressedTextureLoader.html @@ -44,12 +44,12 @@

[method:CompressedTexture 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].
- [page:Function onLoad] — Will be called when load completes. The argument will be the loaded texture.
- [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.
- [page:Function onError] — Will be called when load errors.
+ [page:Function onLoad] (optional) — Will be called when load completes. The argument will be the loaded texture.
+ [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.
+ [page:Function onError] (optional) — Will be called when load errors.

- 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.

Source

diff --git a/docs/api/en/loaders/CubeTextureLoader.html b/docs/api/en/loaders/CubeTextureLoader.html index 65c64ca15e159e..a4fda6a0798092 100644 --- a/docs/api/en/loaders/CubeTextureLoader.html +++ b/docs/api/en/loaders/CubeTextureLoader.html @@ -63,12 +63,12 @@

[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.
- [page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Texture texture].
- [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.
- [page:Function onError] — Will be called when load errors.
+ [page:Function onLoad] (optional) — Will be called when load completes. The argument will be the loaded [page:CubeTexture texture].
+ [page:Function onProgress] (optional) — This callback function is currently not supported.
+ [page:Function onError] (optional) — Will be called when load errors.

- 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.

Source

diff --git a/docs/api/en/loaders/DataTextureLoader.html b/docs/api/en/loaders/DataTextureLoader.html index 715677a814d7c4..f269f522de80e8 100644 --- a/docs/api/en/loaders/DataTextureLoader.html +++ b/docs/api/en/loaders/DataTextureLoader.html @@ -44,12 +44,12 @@

[method:DataTexture load]( [param:String url], [param:Function onLoad], [par

[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].
- [page:Function onLoad] — Will be called when load completes. The argument will be the loaded texture.
- [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.
- [page:Function onError] — Will be called when load errors.
+ [page:Function onLoad] (optional) — Will be called when load completes. The argument will be the loaded texture.
+ [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.
+ [page:Function onError] (optional) — Will be called when load errors.

- 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.

Source

diff --git a/docs/api/en/loaders/FileLoader.html b/docs/api/en/loaders/FileLoader.html index 2eb00d3d433d73..a76992b81bf0e4 100644 --- a/docs/api/en/loaders/FileLoader.html +++ b/docs/api/en/loaders/FileLoader.html @@ -12,7 +12,7 @@

[name]

- 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.

@@ -79,8 +79,7 @@

[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].
[page:Function onLoad] (optional) — Will be called when loading completes. The argument will be the loaded response.
- [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.
+ [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.
[page:Function onError] (optional) — Will be called if an error occurs.

Load the URL and pass the response to the onLoad function. diff --git a/docs/api/en/loaders/ImageBitmapLoader.html b/docs/api/en/loaders/ImageBitmapLoader.html index 580eb771d53459..6d18109c9e06d6 100644 --- a/docs/api/en/loaders/ImageBitmapLoader.html +++ b/docs/api/en/loaders/ImageBitmapLoader.html @@ -83,8 +83,8 @@

[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].
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Image image].
- [page:Function onProgress] — This callback function is currently not supported.
- [page:Function onError] — Will be called when load errors.
+ [page:Function onProgress] (optional) — This callback function is currently not supported.
+ [page:Function onError] (optional) — Will be called when load errors.

Begin loading from url and return the [page:ImageBitmap image] object that will contain the data. diff --git a/docs/api/en/loaders/ImageLoader.html b/docs/api/en/loaders/ImageLoader.html index 24a7def254d091..6eb1b1306e9f41 100644 --- a/docs/api/en/loaders/ImageLoader.html +++ b/docs/api/en/loaders/ImageLoader.html @@ -78,8 +78,8 @@

[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].
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Image image].
- [page:Function onProgress] — This callback function is currently not supported.
- [page:Function onError] — Will be called when load errors.
+ [page:Function onProgress] (optional) — This callback function is currently not supported.
+ [page:Function onError] (optional) — Will be called when load errors.

Begin loading from url and return the [page:Image image] object that will contain the data. diff --git a/docs/api/en/loaders/Loader.html b/docs/api/en/loaders/Loader.html index 7fb38e41f50b1f..a1f1dc45204fd5 100644 --- a/docs/api/en/loaders/Loader.html +++ b/docs/api/en/loaders/Loader.html @@ -70,7 +70,7 @@

[method:undefined load]()

[method:Promise loadAsync]( [param:String url], [param:Function onProgress] )

[page:String url] — A string containing the path/URL of the file to be loaded.
- [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.
+ [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.

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]. diff --git a/docs/api/en/loaders/MaterialLoader.html b/docs/api/en/loaders/MaterialLoader.html index 22eff3945bdd31..687be36c61cfb7 100644 --- a/docs/api/en/loaders/MaterialLoader.html +++ b/docs/api/en/loaders/MaterialLoader.html @@ -67,8 +67,8 @@

[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].
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Material].
- [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.
- [page:Function onError] — Will be called when load errors.

+ [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.
+ [page:Function onError] (optional) — Will be called when load errors.

Begin loading from url.

diff --git a/docs/api/en/loaders/ObjectLoader.html b/docs/api/en/loaders/ObjectLoader.html index 32f8b2269f6513..b2a1dd6b207aa2 100644 --- a/docs/api/en/loaders/ObjectLoader.html +++ b/docs/api/en/loaders/ObjectLoader.html @@ -77,8 +77,8 @@

[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].
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Object3D object].
- [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.
- [page:Function onError] — Will be called when load errors.
+ [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.
+ [page:Function onError] (optional) — Will be called when load errors.

Begin loading from url and call onLoad with the parsed response content. diff --git a/docs/api/en/loaders/TextureLoader.html b/docs/api/en/loaders/TextureLoader.html index a6863840b79bfd..3bd6c74c0a0917 100644 --- a/docs/api/en/loaders/TextureLoader.html +++ b/docs/api/en/loaders/TextureLoader.html @@ -84,9 +84,9 @@

[method:Texture load]( [param:String url], [param:Function onLoad], [param:F

[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].
- [page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Texture texture].
- [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.
- [page:Function onError] — Will be called when load errors.

+ [page:Function onLoad] (optional) — Will be called when load completes. The argument will be the loaded [page:Texture texture].
+ [page:Function onProgress] (optional) — This callback function is currently not supported.
+ [page:Function onError] (optional) — Will be called when load errors.

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.