TextureLoader.d.ts 718 B

12345678910111213141516171819202122
  1. import { Loader } from './Loader';
  2. import { LoadingManager } from './LoadingManager';
  3. import { Texture } from './../textures/Texture';
  4. /**
  5. * Class for loading a texture.
  6. * 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.
  7. */
  8. export class TextureLoader extends Loader {
  9. constructor( manager?: LoadingManager );
  10. load(
  11. url: string,
  12. onLoad?: ( texture: Texture ) => void,
  13. onProgress?: ( event: ProgressEvent ) => void,
  14. onError?: ( event: ErrorEvent ) => void
  15. ): Texture;
  16. loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise<Texture>;
  17. }
粤ICP备19079148号