TextureLoader.d.ts 877 B

123456789101112131415161718192021222324252627282930
  1. import { LoadingManager } from './LoadingManager';
  2. import { Texture } from './../textures/Texture';
  3. /**
  4. * Class for loading a texture.
  5. * 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.
  6. */
  7. export class TextureLoader {
  8. constructor(manager?: LoadingManager);
  9. manager: LoadingManager;
  10. crossOrigin: string;
  11. withCredentials: string;
  12. path: string;
  13. /**
  14. * Begin loading from url
  15. *
  16. * @param url
  17. */
  18. load(
  19. url: string,
  20. onLoad?: (texture: Texture) => void,
  21. onProgress?: (event: ProgressEvent) => void,
  22. onError?: (event: ErrorEvent) => void
  23. ): Texture;
  24. setCrossOrigin(crossOrigin: string): TextureLoader;
  25. setWithCredentials(value: string): TextureLoader;
  26. setPath(path: string): TextureLoader;
  27. }
粤ICP备19079148号