mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-23 21:35:37 +08:00
update three LoadingManager (#27846)
https://github.com/mrdoob/three.js/pull/11259
This commit is contained in:
17
types/three/three-core.d.ts
vendored
Normal file → Executable file
17
types/three/three-core.d.ts
vendored
Normal file → Executable file
@@ -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).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user