|
@@ -1,3 +1,4 @@
|
|
|
|
+import { Loader } from './Loader';
|
|
import { LoadingManager } from './LoadingManager';
|
|
import { LoadingManager } from './LoadingManager';
|
|
import { Texture } from './../textures/Texture';
|
|
import { Texture } from './../textures/Texture';
|
|
|
|
|
|
@@ -5,28 +6,15 @@ import { Texture } from './../textures/Texture';
|
|
* Class for loading a texture.
|
|
* Class for loading a texture.
|
|
* Unlike other loaders, this one emits events instead of using predefined callbacks. So if you're interested in getting notified when things happen, you need to add listeners to the object.
|
|
* Unlike other loaders, this one emits events instead of using predefined callbacks. So if you're interested in getting notified when things happen, you need to add listeners to the object.
|
|
*/
|
|
*/
|
|
-export class TextureLoader {
|
|
|
|
|
|
+export class TextureLoader extends Loader {
|
|
|
|
|
|
constructor( manager?: LoadingManager );
|
|
constructor( manager?: LoadingManager );
|
|
|
|
|
|
- manager: LoadingManager;
|
|
|
|
- crossOrigin: string;
|
|
|
|
- withCredentials: string;
|
|
|
|
- path: string;
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Begin loading from url
|
|
|
|
- *
|
|
|
|
- * @param url
|
|
|
|
- */
|
|
|
|
load(
|
|
load(
|
|
url: string,
|
|
url: string,
|
|
onLoad?: ( texture: Texture ) => void,
|
|
onLoad?: ( texture: Texture ) => void,
|
|
onProgress?: ( event: ProgressEvent ) => void,
|
|
onProgress?: ( event: ProgressEvent ) => void,
|
|
onError?: ( event: ErrorEvent ) => void
|
|
onError?: ( event: ErrorEvent ) => void
|
|
): Texture;
|
|
): Texture;
|
|
- setCrossOrigin( crossOrigin: string ): TextureLoader;
|
|
|
|
- setWithCredentials( value: string ): TextureLoader;
|
|
|
|
- setPath( path: string ): TextureLoader;
|
|
|
|
|
|
|
|
}
|
|
}
|