starry / backend /libs /three /loaders /ImageLoader.d.ts
k-l-lambda's picture
feat: add Python ML services (CPU mode) with model download
2b7aae2
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 extends Loader {
constructor(manager?: LoadingManager);
load(
url: string,
onLoad?: (image: HTMLImageElement) => void,
onProgress?: (event: ProgressEvent) => void,
onError?: (event: ErrorEvent) => void
): HTMLImageElement;
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<HTMLImageElement>;
}