From dfd8194cae77749d731252883e21cbe6f9dc95f9 Mon Sep 17 00:00:00 2001 From: Mugen87 Date: Wed, 21 Aug 2019 11:09:28 +0200 Subject: [PATCH] Loaders: Remove obsolete callbacks. --- docs/api/en/loaders/Loader.html | 12 ------------ docs/api/zh/loaders/Loader.html | 12 ------------ src/loaders/Loader.d.ts | 31 +------------------------------ src/loaders/Loader.js | 8 +------- 4 files changed, 2 insertions(+), 61 deletions(-) diff --git a/docs/api/en/loaders/Loader.html b/docs/api/en/loaders/Loader.html index a344b9835c..8deb4a7e06 100644 --- a/docs/api/en/loaders/Loader.html +++ b/docs/api/en/loaders/Loader.html @@ -24,18 +24,6 @@

Properties

-

[property:Function onLoadStart]

-

Will be called when load starts.

-

The default is a function with empty body.

- -

[property:Function onLoadProgress]

-

Will be called while load progresses.

-

The default is a function with empty body.

- -

[property:Function onLoadComplete]

-

Will be called when load completes.

-

The default is a function with empty body.

-

[property:string crossOrigin]

The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS. diff --git a/docs/api/zh/loaders/Loader.html b/docs/api/zh/loaders/Loader.html index 28857b78ec..f6d00341cc 100644 --- a/docs/api/zh/loaders/Loader.html +++ b/docs/api/zh/loaders/Loader.html @@ -24,18 +24,6 @@

属性

-

[property:Function onLoadStart]

-

当加载开始时,将被调用。

-

默认实现是一个空函数体。

- -

[property:Function onLoadProgress]

-

当进入加载流程中,将被调用。

-

默认实现是一个空函数体。

- -

[property:Function onLoadComplete]

-

当加载完成时,将被调用。

-

默认实现是一个空函数体。

-

[property:string crossOrigin]

跨域字符串,用于实现跨域,以便从允许CORS从其他域加载url。默认为"anonymous"。 diff --git a/src/loaders/Loader.d.ts b/src/loaders/Loader.d.ts index 91c23ac13a..81ff4a1ef2 100644 --- a/src/loaders/Loader.d.ts +++ b/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; diff --git a/src/loaders/Loader.js b/src/loaders/Loader.js index 8ebf90fba0..aaa1611ecb 100644 --- a/src/loaders/Loader.js +++ b/src/loaders/Loader.js @@ -39,13 +39,7 @@ Loader.Handlers = { Object.assign( Loader.prototype, { - crossOrigin: 'anonymous', - - onLoadStart: function () {}, - - onLoadProgress: function () {}, - - onLoadComplete: function () {} + crossOrigin: 'anonymous' } ); -- GitLab