提交 dfd8194c 编写于 作者: M Mugen87

Loaders: Remove obsolete callbacks.

上级 6c6a3990
......@@ -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.
......
......@@ -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"。
......
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;
......
......@@ -39,13 +39,7 @@ Loader.Handlers = {
Object.assign( Loader.prototype, {
crossOrigin: 'anonymous',
onLoadStart: function () {},
onLoadProgress: function () {},
onLoadComplete: function () {}
crossOrigin: 'anonymous'
} );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册