瀏覽代碼

document loadAsync only on base Loader class

Lewy Blue 5 年之前
父節點
當前提交
d75003f10f
共有 2 個文件被更改,包括 12 次插入12 次删除
  1. 12 0
      docs/api/en/loaders/Loader.html
  2. 0 12
      docs/examples/en/loaders/GLTFLoader.html

+ 12 - 0
docs/api/en/loaders/Loader.html

@@ -57,6 +57,18 @@
 			This method needs to be implement by all concrete loaders. It holds the logic for loading the asset from the backend.
 			This method needs to be implement by all concrete loaders. It holds the logic for loading the asset from the backend.
 		</p>
 		</p>
 
 
+		<h3>[method:Promise loadAsync]( [param:String url], [param:Function onProgress] )</h3>
+		<p>
+		[page:String url] — A string containing the path/URL of the <em>.gltf</em> or <em>.glb</em> file.<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.<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].
+		</p>
+		<p>
+		[page:Function onLoad] is handled by [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve Promise.resolve] and [page:Function onError] is handled by [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/reject Promise.reject].
+		</p>
+
 		<h3>[method:void parse]()</h3>
 		<h3>[method:void parse]()</h3>
 		<p>
 		<p>
 			This method needs to be implement by all concrete loaders. It holds the logic for parsing the asset into three.js entities.
 			This method needs to be implement by all concrete loaders. It holds the logic for parsing the asset into three.js entities.

+ 0 - 12
docs/examples/en/loaders/GLTFLoader.html

@@ -182,18 +182,6 @@
 		Begin loading from url and call the callback function with the parsed response content.
 		Begin loading from url and call the callback function with the parsed response content.
 		</p>
 		</p>
 
 
-		<h3>[method:Promise loadAsync]( [param:String url], [param:Function onProgress] )</h3>
-		<p>
-		[page:String url] — A string containing the path/URL of the <em>.gltf</em> or <em>.glb</em> file.<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.<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].
-		</p>
-		<p>
-		[page:Function onLoad] is handled by [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve Promise.resolve] and [page:Function onError] is handled by [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/reject Promise.reject].
-		</p>
-
 		<h3>[method:null setDRACOLoader]( [param:DRACOLoader dracoLoader] )</h3>
 		<h3>[method:null setDRACOLoader]( [param:DRACOLoader dracoLoader] )</h3>
 		<p>
 		<p>
 		[page:DRACOLoader dracoLoader] — Instance of THREE.DRACOLoader, to be used for decoding assets compressed with the KHR_draco_mesh_compression extension.
 		[page:DRACOLoader dracoLoader] — Instance of THREE.DRACOLoader, to be used for decoding assets compressed with the KHR_draco_mesh_compression extension.