forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mrdoob#17327 from Mugen87/dev29
ImageLoader: Inherit from Loader.
- Loading branch information
Showing
4 changed files
with
14 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,19 @@ | ||
import { Loader } from './Loader'; | ||
import { LoadingManager } from './LoadingManager'; | ||
|
||
/** | ||
* A loader for loading an image. | ||
* 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 ImageLoader { | ||
export class ImageLoader extends Loader { | ||
|
||
constructor( manager?: LoadingManager ); | ||
|
||
manager: LoadingManager; | ||
crossOrigin: string; | ||
withCredentials: string; | ||
path: string; | ||
|
||
/** | ||
* Begin loading from url | ||
* @param url | ||
*/ | ||
load( | ||
url: string, | ||
onLoad?: ( image: HTMLImageElement ) => void, | ||
onProgress?: ( event: ProgressEvent ) => void, | ||
onError?: ( event: ErrorEvent ) => void | ||
): HTMLImageElement; | ||
setCrossOrigin( crossOrigin: string ): ImageLoader; | ||
setWithCredentials( value: string ): ImageLoader; | ||
setPath( value: string ): ImageLoader; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters