瀏覽代碼

Loaders: Remove obsolete callbacks.

Mugen87 6 年之前
父節點
當前提交
dfd8194cae
共有 4 個文件被更改,包括 2 次插入61 次删除
  1. 0 12
      docs/api/en/loaders/Loader.html
  2. 0 12
      docs/api/zh/loaders/Loader.html
  3. 1 30
      src/loaders/Loader.d.ts
  4. 1 7
      src/loaders/Loader.js

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

@@ -24,18 +24,6 @@
 
 		<h2>Properties</h2>
 
-		<h3>[property:Function onLoadStart]</h3>
-		<p>Will be called when load starts.</p>
-		<p>The default is a function with empty body.</p>
-
-		<h3>[property:Function onLoadProgress]</h3>
-		<p>Will be called while load progresses.</p>
-		<p>The default is a function with empty body.</p>
-
-		<h3>[property:Function onLoadComplete]</h3>
-		<p>Will be called when load completes.</p>
-		<p>The default is a function with empty body.</p>
-
 		<h3>[property:string crossOrigin]</h3>
 		<p>
 		The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.

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

@@ -24,18 +24,6 @@
 
 		<h2>属性</h2>
 
-		<h3>[property:Function onLoadStart]</h3>
-		<p>当加载开始时,将被调用。</p>
-		<p>默认实现是一个空函数体。</p>
-
-		<h3>[property:Function onLoadProgress]</h3>
-		<p>当进入加载流程中,将被调用。</p>
-		<p>默认实现是一个空函数体。</p>
-
-		<h3>[property:Function onLoadComplete]</h3>
-		<p>当加载完成时,将被调用。</p>
-		<p>默认实现是一个空函数体。</p>
-
 		<h3>[property:string crossOrigin]</h3>
 		<p>
 			跨域字符串,用于实现跨域,以便从允许CORS从其他域加载url。默认为"anonymous"。

+ 1 - 30
src/loaders/Loader.d.ts

@@ -1,45 +1,16 @@
-import { Material } from './../materials/Material';
 import { LoaderHandler } from './FileLoader';
 
 // Loaders //////////////////////////////////////////////////////////////////////////////////
 
 /**
  * Base class for implementing loaders.
- *
- * Events:
- *		 load
- *				 Dispatched when the image has completed loading
- *				 content — loaded image
- *
- *		 error
- *
- *					Dispatched when the image can't be loaded
- *					message — error message
  */
 export class Loader {
 
 	constructor();
 
 	/**
-	 * Will be called when load starts.
-	 * The default is a function with empty body.
-	 */
-	onLoadStart: () => void;
-
-	/**
-	 * Will be called while load progresses.
-	 * The default is a function with empty body.
-	 */
-	onLoadProgress: () => void;
-
-	/**
-	 * Will be called when load completes.
-	 * The default is a function with empty body.
-	 */
-	onLoadComplete: () => void;
-
-	/**
-	 * default — null.
+	 * default — anonymous.
 	 * If set, assigns the crossOrigin attribute of the image to the value of crossOrigin, prior to starting the load.
 	 */
 	crossOrigin: string;

+ 1 - 7
src/loaders/Loader.js

@@ -39,13 +39,7 @@ Loader.Handlers = {
 
 Object.assign( Loader.prototype, {
 
-	crossOrigin: 'anonymous',
-
-	onLoadStart: function () {},
-
-	onLoadProgress: function () {},
-
-	onLoadComplete: function () {}
+	crossOrigin: 'anonymous'
 
 } );