diff --git a/types/three/three-core.d.ts b/types/three/three-core.d.ts old mode 100644 new mode 100755 index b4daf0bd93..3ede78987f --- a/types/three/three-core.d.ts +++ b/types/three/three-core.d.ts @@ -2302,8 +2302,21 @@ export class LoadingManager { */ onError: (url: string) => void; + /** + * If provided, the callback will be passed each resource URL before a request is sent. + * The callback may return the original URL, or a new URL to override loading behavior. + * This behavior can be used to load assets from .ZIP files, drag-and-drop APIs, and Data URIs. + * @param callback URL modifier callback. Called with url argument, and must return resolvedURL. + */ setURLModifier(callback?: (url: string) => string): void; + /** + * Given a URL, uses the URL modifier callback (if any) and returns a resolved URL. + * If no URL modifier is set, returns the original URL. + * @param url the url to load + */ + resolveURL(url: string): string; + itemStart(url: string): void; itemEnd(url: string): void; itemError(url: string): void; @@ -5568,12 +5581,12 @@ export class WebGLRenderer implements Renderer { getPixelRatio(): number; setPixelRatio(value: number): void; - + getDrawingBufferSize(): { width: number; height: number; }; setDrawingBufferSize(width: number, height: number, pixelRatio: number): void; getSize(): { width: number; height: number; }; - + /** * Resizes the output canvas to (width, height), and also sets the viewport to fit that size, starting in (0, 0). */