未验证 提交 534d38a3 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15532 from aardgoose/loader-docs

Documentation: Clean up loaders
......@@ -48,7 +48,7 @@
<h2>Methods</h2>
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<h3>[method:CompressedTexture load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<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 />
......
......@@ -70,7 +70,7 @@ scene.background = new THREE.CubeTextureLoader()
<h2>Methods</h2>
<h3>[method:null load]( [param:String urls], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<h3>[method:CubeTexture load]( [param:String urls], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<p>
[page:String urls] — array of 6 urls to images, one for each side of the CubeTexture.
The urls should be specified in the following order: pos-x, neg-x, pos-y, neg-y, pos-z, neg-z.
......@@ -83,7 +83,7 @@ scene.background = new THREE.CubeTextureLoader()
[page:Function onError] — Will be called when load errors.<br />
</p>
<p>
Begin loading from url and pass the loaded [page:Texture texture] to onLoad.
Begin loading from url and pass the loaded [page:CubeTexture texture] to onLoad.
</p>
<h3>[method:null setCrossOrigin]( [param:String value] )</h3>
......
......@@ -44,7 +44,7 @@
<h2>Methods</h2>
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<h3>[method:DataTexture load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<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 />
......
......@@ -76,7 +76,7 @@
<h3>[property:String path]</h3>
<p>The base path from which files will be loaded. See [page:.setPath]. Default is *undefined*.</p>
<h3>[property:object requestHeader]</h3>
<h3>[property:Object requestHeader]</h3>
<p>The [link:https://developer.mozilla.org/en-US/docs/Glossary/Request_header request header] used in HTTP request. See [page:.setRequestHeader]. Default is *undefined*.</p>
<h3>[property:String responseType]</h3>
......@@ -91,7 +91,7 @@
<h2>Methods</h2>
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<h3>[method:XMLHttpRequest load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<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 />
......@@ -115,7 +115,7 @@
you are loading many models from the same directory.
</p>
<h3>[method:FileLoader setRequestHeader]( [param:object requestHeader] )</h3>
<h3>[method:FileLoader setRequestHeader]( [param:Object requestHeader] )</h3>
<p>
[page:object requestHeader] - key: The name of the header whose value is to be set. value: The value to set as the body of the header.<br /><br />
......@@ -125,7 +125,7 @@
<h3>[method:FileLoader setResponseType]( [param:String responseType] )</h3>
<p>
Change the response type. Valid values are:<br />
[page:String text] or empty string (default) - returns the data as [page:String string].<br />
[page:String text] or empty string (default) - returns the data as [page:String String].<br />
[page:String arraybuffer] - loads the data into a [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer ArrayBuffer] and returns that.<br />
[page:String blob] - returns the data as a [link:https://developer.mozilla.org/en/docs/Web/API/Blob Blob].<br />
[page:String document] - parses the file using the [link:https://developer.mozilla.org/en-US/docs/Web/API/DOMParser DOMParser].<br />
......
......@@ -73,7 +73,7 @@
<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 onLoad] — Will be called when load completes. The argument will be the loaded [page:Font font].<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.<br />
[page:Function onError] — Will be called when load errors.<br /><br />
......
......@@ -82,7 +82,7 @@
<h2>Methods</h2>
<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<h3>[method:HTMLImageElement load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<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 />
......
......@@ -74,7 +74,7 @@
[page:Function onProgress] — Will be called while load progresses. The argument will be the progress event.<br />
[page:Function onError] — Will be called when load errors.<br /><br />
Begin loading from url and return the [page:Material] object that will contain the data.
Begin loading from url.
</p>
<h3>[method:Material parse]( [param:Object json] )</h3>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册