From 5b89174f415cd527f9e486a4b5ea4f085a61a05f Mon Sep 17 00:00:00 2001 From: Maciek Jurczyk Date: Mon, 4 Jan 2021 20:18:53 +0100 Subject: [PATCH] Add loadAsync typing --- examples/jsm/loaders/3DMLoader.d.ts | 2 ++ examples/jsm/loaders/3MFLoader.d.ts | 2 ++ examples/jsm/loaders/AMFLoader.d.ts | 2 ++ examples/jsm/loaders/AssimpLoader.d.ts | 2 ++ examples/jsm/loaders/BVHLoader.d.ts | 2 ++ examples/jsm/loaders/BasisTextureLoader.d.ts | 2 ++ examples/jsm/loaders/ColladaLoader.d.ts | 2 ++ examples/jsm/loaders/DRACOLoader.d.ts | 2 ++ examples/jsm/loaders/FBXLoader.d.ts | 2 ++ examples/jsm/loaders/GCodeLoader.d.ts | 2 ++ examples/jsm/loaders/GLTFLoader.d.ts | 2 ++ examples/jsm/loaders/HDRCubeTextureLoader.d.ts | 2 ++ examples/jsm/loaders/KMZLoader.d.ts | 2 ++ examples/jsm/loaders/LDrawLoader.d.ts | 2 ++ examples/jsm/loaders/LUT3dlLoader.d.ts | 2 ++ examples/jsm/loaders/LUTCubeLoader.d.ts | 2 ++ examples/jsm/loaders/LWOLoader.d.ts | 2 ++ examples/jsm/loaders/LottieLoader.d.ts | 2 ++ examples/jsm/loaders/MD2Loader.d.ts | 2 ++ examples/jsm/loaders/MDDLoader.d.ts | 2 ++ examples/jsm/loaders/MMDLoader.d.ts | 2 ++ examples/jsm/loaders/MTLLoader.d.ts | 2 ++ examples/jsm/loaders/OBJLoader.d.ts | 2 ++ examples/jsm/loaders/OBJLoader2.d.ts | 2 ++ examples/jsm/loaders/PCDLoader.d.ts | 2 ++ examples/jsm/loaders/PDBLoader.d.ts | 2 ++ examples/jsm/loaders/PLYLoader.d.ts | 2 ++ examples/jsm/loaders/PRWMLoader.d.ts | 2 ++ examples/jsm/loaders/STLLoader.d.ts | 2 ++ examples/jsm/loaders/SVGLoader.d.ts | 2 ++ examples/jsm/loaders/TDSLoader.d.ts | 2 ++ examples/jsm/loaders/TGALoader.d.ts | 2 ++ examples/jsm/loaders/TTFLoader.d.ts | 2 ++ examples/jsm/loaders/TiltLoader.d.ts | 2 ++ examples/jsm/loaders/VOXLoader.d.ts | 2 ++ examples/jsm/loaders/VRMLLoader.d.ts | 2 ++ examples/jsm/loaders/VRMLoader.d.ts | 2 ++ examples/jsm/loaders/VTKLoader.d.ts | 2 ++ examples/jsm/loaders/XLoader.d.ts | 2 ++ examples/jsm/loaders/XYZLoader.d.ts | 2 ++ src/loaders/AnimationLoader.d.ts | 2 ++ src/loaders/AudioLoader.d.ts | 2 ++ src/loaders/BufferGeometryLoader.d.ts | 2 ++ src/loaders/CompressedTextureLoader.d.ts | 2 ++ src/loaders/CubeTextureLoader.d.ts | 2 ++ src/loaders/DataTextureLoader.d.ts | 2 ++ src/loaders/FileLoader.d.ts | 2 ++ src/loaders/FontLoader.d.ts | 2 ++ src/loaders/ImageBitmapLoader.d.ts | 2 ++ src/loaders/ImageLoader.d.ts | 2 ++ src/loaders/MaterialLoader.d.ts | 2 ++ src/loaders/ObjectLoader.d.ts | 2 ++ src/loaders/TextureLoader.d.ts | 2 ++ 53 files changed, 106 insertions(+) diff --git a/examples/jsm/loaders/3DMLoader.d.ts b/examples/jsm/loaders/3DMLoader.d.ts index 939b7d20103145..79dced64c60147 100644 --- a/examples/jsm/loaders/3DMLoader.d.ts +++ b/examples/jsm/loaders/3DMLoader.d.ts @@ -14,4 +14,6 @@ export class Rhino3dmLoader extends Loader { setWorkerLimit( workerLimit: number ): Rhino3dmLoader; dispose(): Rhino3dmLoader; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/3MFLoader.d.ts b/examples/jsm/loaders/3MFLoader.d.ts index c0d2cd2a355e3d..327ddeed5021eb 100644 --- a/examples/jsm/loaders/3MFLoader.d.ts +++ b/examples/jsm/loaders/3MFLoader.d.ts @@ -13,4 +13,6 @@ export class ThreeMFLoader extends Loader { parse( data: ArrayBuffer ): Group; addExtension( extension: object ):void + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/AMFLoader.d.ts b/examples/jsm/loaders/AMFLoader.d.ts index 78edd8d279863b..5b24dd08d644f0 100644 --- a/examples/jsm/loaders/AMFLoader.d.ts +++ b/examples/jsm/loaders/AMFLoader.d.ts @@ -11,4 +11,6 @@ export class AMFLoader extends Loader { load( url: string, onLoad: ( object: Group ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; parse( data: ArrayBuffer ): Group; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/AssimpLoader.d.ts b/examples/jsm/loaders/AssimpLoader.d.ts index d6a23b0ca89330..4737154e559b56 100644 --- a/examples/jsm/loaders/AssimpLoader.d.ts +++ b/examples/jsm/loaders/AssimpLoader.d.ts @@ -17,4 +17,6 @@ export class AssimpLoader extends Loader { load( url: string, onLoad: ( result: Assimp ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( buffer: ArrayBuffer, path: string ) : Assimp; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/BVHLoader.d.ts b/examples/jsm/loaders/BVHLoader.d.ts index 5265bc7a124136..3a6385a17cac66 100644 --- a/examples/jsm/loaders/BVHLoader.d.ts +++ b/examples/jsm/loaders/BVHLoader.d.ts @@ -20,4 +20,6 @@ export class BVHLoader extends Loader { load( url: string, onLoad: ( bvh: BVH ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( text: string ) : BVH; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/BasisTextureLoader.d.ts b/examples/jsm/loaders/BasisTextureLoader.d.ts index 56bc79e236f98f..900221d291a39e 100644 --- a/examples/jsm/loaders/BasisTextureLoader.d.ts +++ b/examples/jsm/loaders/BasisTextureLoader.d.ts @@ -27,6 +27,8 @@ export class BasisTextureLoader extends Loader { detectSupport( renderer: WebGLRenderer ): this; dispose(): void; load( url: string, onLoad: ( texture: CompressedTexture ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + setTranscoderPath( path: string ): this; setWorkerLimit( workerLimit: number ): this; diff --git a/examples/jsm/loaders/ColladaLoader.d.ts b/examples/jsm/loaders/ColladaLoader.d.ts index 82267631db1471..361da00c227608 100644 --- a/examples/jsm/loaders/ColladaLoader.d.ts +++ b/examples/jsm/loaders/ColladaLoader.d.ts @@ -18,4 +18,6 @@ export class ColladaLoader extends Loader { load( url: string, onLoad: ( collada: Collada ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( text: string, path: string ) : Collada; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/DRACOLoader.d.ts b/examples/jsm/loaders/DRACOLoader.d.ts index a0b1ffe0a43d23..ee5521321cc03c 100644 --- a/examples/jsm/loaders/DRACOLoader.d.ts +++ b/examples/jsm/loaders/DRACOLoader.d.ts @@ -15,4 +15,6 @@ export class DRACOLoader extends Loader { preload(): DRACOLoader; dispose(): DRACOLoader; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/FBXLoader.d.ts b/examples/jsm/loaders/FBXLoader.d.ts index 1a3e6bb1bfd160..88f0a7dce941cc 100644 --- a/examples/jsm/loaders/FBXLoader.d.ts +++ b/examples/jsm/loaders/FBXLoader.d.ts @@ -11,4 +11,6 @@ export class FBXLoader extends Loader { load( url: string, onLoad: ( object: Group ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( FBXBuffer: ArrayBuffer | string, path: string ) : Group; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/GCodeLoader.d.ts b/examples/jsm/loaders/GCodeLoader.d.ts index 47ee340b2f0266..d3364bea3e0c9c 100644 --- a/examples/jsm/loaders/GCodeLoader.d.ts +++ b/examples/jsm/loaders/GCodeLoader.d.ts @@ -12,4 +12,6 @@ export class GCodeLoader extends Loader { load( url: string, onLoad: ( object: Group ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( data: string ) : Group; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/GLTFLoader.d.ts b/examples/jsm/loaders/GLTFLoader.d.ts index 844ee6211e77fd..2ac7648b420336 100644 --- a/examples/jsm/loaders/GLTFLoader.d.ts +++ b/examples/jsm/loaders/GLTFLoader.d.ts @@ -50,6 +50,8 @@ export class GLTFLoader extends Loader { parse( data: ArrayBuffer | string, path: string, onLoad: ( gltf: GLTF ) => void, onError?: ( event: ErrorEvent ) => void ) : void; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } export interface GLTFReference { diff --git a/examples/jsm/loaders/HDRCubeTextureLoader.d.ts b/examples/jsm/loaders/HDRCubeTextureLoader.d.ts index 5ca025c4f2d468..261d2687b69c04 100644 --- a/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +++ b/examples/jsm/loaders/HDRCubeTextureLoader.d.ts @@ -16,4 +16,6 @@ export class HDRCubeTextureLoader extends Loader { load( urls: string[], onLoad: ( texture: CubeTexture ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; setDataType( type: TextureDataType ): this; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/KMZLoader.d.ts b/examples/jsm/loaders/KMZLoader.d.ts index 8254a7720277a9..ddca93a6dbad16 100644 --- a/examples/jsm/loaders/KMZLoader.d.ts +++ b/examples/jsm/loaders/KMZLoader.d.ts @@ -12,4 +12,6 @@ export class KMZLoader extends Loader { load( url: string, onLoad: ( kmz: Collada ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; parse( data: ArrayBuffer ): Collada; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/LDrawLoader.d.ts b/examples/jsm/loaders/LDrawLoader.d.ts index beb9d743dc8c6d..43e2ab55d08847 100644 --- a/examples/jsm/loaders/LDrawLoader.d.ts +++ b/examples/jsm/loaders/LDrawLoader.d.ts @@ -18,4 +18,6 @@ export class LDrawLoader extends Loader { addMaterial( material: Material ): void; getMaterial( colourCode: string ): Material | null; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/LUT3dlLoader.d.ts b/examples/jsm/loaders/LUT3dlLoader.d.ts index caa0d3f591612a..715a26fc30b4bb 100644 --- a/examples/jsm/loaders/LUT3dlLoader.d.ts +++ b/examples/jsm/loaders/LUT3dlLoader.d.ts @@ -25,4 +25,6 @@ export class LUT3dlLoader extends Loader { ); parse( data: string ): LUT3dlResult; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/LUTCubeLoader.d.ts b/examples/jsm/loaders/LUTCubeLoader.d.ts index b9026a26fb59fb..8bd23a9b316a26 100644 --- a/examples/jsm/loaders/LUTCubeLoader.d.ts +++ b/examples/jsm/loaders/LUTCubeLoader.d.ts @@ -29,4 +29,6 @@ export class LUTCubeLoader extends Loader { ); parse( data: string ): LUTCubeResult; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/LWOLoader.d.ts b/examples/jsm/loaders/LWOLoader.d.ts index d6f17587a71830..4ba458c3cb854f 100644 --- a/examples/jsm/loaders/LWOLoader.d.ts +++ b/examples/jsm/loaders/LWOLoader.d.ts @@ -26,4 +26,6 @@ export class LWOLoader extends Loader { load( url: string, onLoad: ( lwo: LWO ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( data: ArrayBuffer, path: string, modelName: string ): LWO; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/LottieLoader.d.ts b/examples/jsm/loaders/LottieLoader.d.ts index a2ebdfb3688739..cae57698dbdb0b 100644 --- a/examples/jsm/loaders/LottieLoader.d.ts +++ b/examples/jsm/loaders/LottieLoader.d.ts @@ -12,4 +12,6 @@ export class LottieLoader extends Loader { setQuality( value: Number ) : void; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/MD2Loader.d.ts b/examples/jsm/loaders/MD2Loader.d.ts index 38d7d4a84f649b..7dade846afec6a 100644 --- a/examples/jsm/loaders/MD2Loader.d.ts +++ b/examples/jsm/loaders/MD2Loader.d.ts @@ -11,4 +11,6 @@ export class MD2Loader extends Loader { load( url: string, onLoad: ( geometry: BufferGeometry ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; parse( data: ArrayBuffer ): BufferGeometry; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/MDDLoader.d.ts b/examples/jsm/loaders/MDDLoader.d.ts index 54fddcc36efeaf..856a8e83e2a001 100644 --- a/examples/jsm/loaders/MDDLoader.d.ts +++ b/examples/jsm/loaders/MDDLoader.d.ts @@ -17,4 +17,6 @@ export class MDDLoader extends Loader { load( url: string, onLoad: ( result: MDD ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( data: ArrayBuffer ) : MDD; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/MMDLoader.d.ts b/examples/jsm/loaders/MMDLoader.d.ts index e54be3b883d7b6..0bfc9f336ef09e 100644 --- a/examples/jsm/loaders/MMDLoader.d.ts +++ b/examples/jsm/loaders/MMDLoader.d.ts @@ -29,4 +29,6 @@ export class MMDLoader extends Loader { loadWithAnimation( url: string, vmdUrl: string | string[], onLoad: ( object: MMDLoaderAnimationObject ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; setAnimationPath( animationPath: string ): this; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/MTLLoader.d.ts b/examples/jsm/loaders/MTLLoader.d.ts index ce4305b1a28ab8..bea7e397000039 100644 --- a/examples/jsm/loaders/MTLLoader.d.ts +++ b/examples/jsm/loaders/MTLLoader.d.ts @@ -48,6 +48,8 @@ export class MTLLoader extends Loader { parse( text: string, path: string ) : MTLLoader.MaterialCreator; setMaterialOptions( value: MaterialCreatorOptions ) : void; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } export interface MaterialInfo { diff --git a/examples/jsm/loaders/OBJLoader.d.ts b/examples/jsm/loaders/OBJLoader.d.ts index ef724f81cf1263..00bc922a59f24d 100644 --- a/examples/jsm/loaders/OBJLoader.d.ts +++ b/examples/jsm/loaders/OBJLoader.d.ts @@ -16,4 +16,6 @@ export class OBJLoader extends Loader { parse( data: string ) : Group; setMaterials( materials: MTLLoader.MaterialCreator ) : this; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/OBJLoader2.d.ts b/examples/jsm/loaders/OBJLoader2.d.ts index e0b66095f59ff8..d72e5f82bc3c1b 100644 --- a/examples/jsm/loaders/OBJLoader2.d.ts +++ b/examples/jsm/loaders/OBJLoader2.d.ts @@ -42,4 +42,6 @@ export class OBJLoader2 extends Loader { load( url: string, onLoad: ( object3d: Object3D ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void, onMeshAlter?: ( meshData: object ) => void ): void; parse( content: ArrayBuffer | string ): Object3D; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/PCDLoader.d.ts b/examples/jsm/loaders/PCDLoader.d.ts index c183d28a4dd702..6ccd362b906371 100644 --- a/examples/jsm/loaders/PCDLoader.d.ts +++ b/examples/jsm/loaders/PCDLoader.d.ts @@ -13,4 +13,6 @@ export class PCDLoader extends Loader { load( url: string, onLoad: ( points: Points ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( data: ArrayBuffer | string, url: string ) : Points; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/PDBLoader.d.ts b/examples/jsm/loaders/PDBLoader.d.ts index d284b34f4118bf..d70fcfa3d85e80 100644 --- a/examples/jsm/loaders/PDBLoader.d.ts +++ b/examples/jsm/loaders/PDBLoader.d.ts @@ -20,4 +20,6 @@ export class PDBLoader extends Loader { load( url: string, onLoad: ( pdb: PDB ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( text: string ) : PDB; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/PLYLoader.d.ts b/examples/jsm/loaders/PLYLoader.d.ts index 9836303b37a4b1..9674abfa5789d4 100644 --- a/examples/jsm/loaders/PLYLoader.d.ts +++ b/examples/jsm/loaders/PLYLoader.d.ts @@ -14,4 +14,6 @@ export class PLYLoader extends Loader { setPropertyNameMapping( mapping: object ) : void; parse( data: ArrayBuffer | string ) : BufferGeometry; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/PRWMLoader.d.ts b/examples/jsm/loaders/PRWMLoader.d.ts index 6d738dd8b122d4..cc9af874eebde8 100644 --- a/examples/jsm/loaders/PRWMLoader.d.ts +++ b/examples/jsm/loaders/PRWMLoader.d.ts @@ -12,6 +12,8 @@ export class PRWMLoader extends Loader { load( url: string, onLoad: ( geometry: BufferGeometry ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( data: ArrayBuffer ) : BufferGeometry; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + static isBigEndianPlatform(): boolean; } diff --git a/examples/jsm/loaders/STLLoader.d.ts b/examples/jsm/loaders/STLLoader.d.ts index 660937fc533dd5..443bc1adc1c7e1 100644 --- a/examples/jsm/loaders/STLLoader.d.ts +++ b/examples/jsm/loaders/STLLoader.d.ts @@ -12,4 +12,6 @@ export class STLLoader extends Loader { load( url: string, onLoad: ( geometry: BufferGeometry ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( data: ArrayBuffer | string ) : BufferGeometry; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/SVGLoader.d.ts b/examples/jsm/loaders/SVGLoader.d.ts index 2fb0d53202b798..6f4140465e739a 100644 --- a/examples/jsm/loaders/SVGLoader.d.ts +++ b/examples/jsm/loaders/SVGLoader.d.ts @@ -29,6 +29,8 @@ export class SVGLoader extends Loader { load( url: string, onLoad: ( data: SVGResult ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( text: string ) : SVGResult; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + static getStrokeStyle( width?: number, color?: string, lineJoin?: string, lineCap?: string, miterLimit?: number ): StrokeStyle; static pointsToStroke( points: Vector3[], style: StrokeStyle, arcDivisions?: number, minDistance?: number ): BufferGeometry; static pointsToStrokeWithBuffers( points: Vector3[], style: StrokeStyle, arcDivisions?: number, minDistance?: number, vertices?: number[], normals?: number[], uvs?: number[], vertexOffset?: number ): number; diff --git a/examples/jsm/loaders/TDSLoader.d.ts b/examples/jsm/loaders/TDSLoader.d.ts index 0e558c51396dfa..c1abeb8146001a 100644 --- a/examples/jsm/loaders/TDSLoader.d.ts +++ b/examples/jsm/loaders/TDSLoader.d.ts @@ -21,6 +21,8 @@ export class TDSLoader extends Loader { load( url: string, onLoad: ( object: Group ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; parse( arraybuffer: ArrayBuffer, path: string ): Group; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + debugMessage( message: object ): void; endChunk( chunk: object ): void; nextChunk( data: DataView, chunk: object ): void; diff --git a/examples/jsm/loaders/TGALoader.d.ts b/examples/jsm/loaders/TGALoader.d.ts index ab3e6e7afacebd..fbf3caa687eb07 100644 --- a/examples/jsm/loaders/TGALoader.d.ts +++ b/examples/jsm/loaders/TGALoader.d.ts @@ -11,4 +11,6 @@ export class TGALoader extends Loader { load( url: string, onLoad: ( texture: Texture ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( data: ArrayBuffer ) : Texture; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/TTFLoader.d.ts b/examples/jsm/loaders/TTFLoader.d.ts index 589b17f73e9e66..4de4256e04aa76 100644 --- a/examples/jsm/loaders/TTFLoader.d.ts +++ b/examples/jsm/loaders/TTFLoader.d.ts @@ -11,4 +11,6 @@ export class TTFLoader extends Loader { load( url: string, onLoad: ( json: object ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; parse( arraybuffer: ArrayBuffer ): object; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/TiltLoader.d.ts b/examples/jsm/loaders/TiltLoader.d.ts index 49fce486c96bbd..4d3898934bce32 100644 --- a/examples/jsm/loaders/TiltLoader.d.ts +++ b/examples/jsm/loaders/TiltLoader.d.ts @@ -11,4 +11,6 @@ export class TiltLoader extends Loader { load( url: string, onLoad: ( object: Group ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; parse( data: ArrayBuffer ): Group; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/VOXLoader.d.ts b/examples/jsm/loaders/VOXLoader.d.ts index 5a6413e69bf4af..ad0139cbded4d2 100644 --- a/examples/jsm/loaders/VOXLoader.d.ts +++ b/examples/jsm/loaders/VOXLoader.d.ts @@ -10,4 +10,6 @@ export class VOXLoader extends Loader { load( url: string, onLoad: ( chunks: Array ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; parse( data: ArrayBuffer ): Array; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise>; + } diff --git a/examples/jsm/loaders/VRMLLoader.d.ts b/examples/jsm/loaders/VRMLLoader.d.ts index 69a91e4e27e80d..7cc9f42b312d91 100644 --- a/examples/jsm/loaders/VRMLLoader.d.ts +++ b/examples/jsm/loaders/VRMLLoader.d.ts @@ -11,4 +11,6 @@ export class VRMLLoader extends Loader { load( url: string, onLoad: ( scene: Scene ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ) : void; parse( data: string, path: string ) : Scene; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/VRMLoader.d.ts b/examples/jsm/loaders/VRMLoader.d.ts index 5b8272d280f978..b843dbdd80085f 100644 --- a/examples/jsm/loaders/VRMLoader.d.ts +++ b/examples/jsm/loaders/VRMLoader.d.ts @@ -15,4 +15,6 @@ export class VRMLoader extends Loader { parse( gltf: GLTF, onLoad: ( scene: GLTF ) => void ): void; setDRACOLoader( dracoLoader: DRACOLoader ): this; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/VTKLoader.d.ts b/examples/jsm/loaders/VTKLoader.d.ts index 08a749ce4f6786..46391692478680 100644 --- a/examples/jsm/loaders/VTKLoader.d.ts +++ b/examples/jsm/loaders/VTKLoader.d.ts @@ -11,4 +11,6 @@ export class VTKLoader extends Loader { load( url: string, onLoad: ( geometry: BufferGeometry ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; parse( data: ArrayBuffer | string, path: string ): BufferGeometry; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/XLoader.d.ts b/examples/jsm/loaders/XLoader.d.ts index 6cf33b8bfacc15..40b4874e087d79 100644 --- a/examples/jsm/loaders/XLoader.d.ts +++ b/examples/jsm/loaders/XLoader.d.ts @@ -16,4 +16,6 @@ export class XLoader extends Loader { load( url: string, onLoad: ( object: XResult ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; parse( data: ArrayBuffer | string, onLoad: ( object: object ) => void ): object; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/examples/jsm/loaders/XYZLoader.d.ts b/examples/jsm/loaders/XYZLoader.d.ts index dffbe17ca72fe0..239669ca422389 100644 --- a/examples/jsm/loaders/XYZLoader.d.ts +++ b/examples/jsm/loaders/XYZLoader.d.ts @@ -11,4 +11,6 @@ export class XYZLoader extends Loader { load( url: string, onLoad: ( geometry: BufferGeometry ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void; parse( data: string, onLoad: ( geometry: BufferGeometry ) => void ): object; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/AnimationLoader.d.ts b/src/loaders/AnimationLoader.d.ts index ccf51e6493fdf4..34a05a49a1780b 100644 --- a/src/loaders/AnimationLoader.d.ts +++ b/src/loaders/AnimationLoader.d.ts @@ -14,4 +14,6 @@ export class AnimationLoader extends Loader { ): void; parse( json: any ): AnimationClip[]; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/AudioLoader.d.ts b/src/loaders/AudioLoader.d.ts index c5c5b05d6b6dc0..7112ec65ec92dd 100644 --- a/src/loaders/AudioLoader.d.ts +++ b/src/loaders/AudioLoader.d.ts @@ -12,4 +12,6 @@ export class AudioLoader extends Loader { onError?: ( event: ErrorEvent ) => void ): void; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/BufferGeometryLoader.d.ts b/src/loaders/BufferGeometryLoader.d.ts index 96569ad921a887..4f78a0350894d5 100644 --- a/src/loaders/BufferGeometryLoader.d.ts +++ b/src/loaders/BufferGeometryLoader.d.ts @@ -15,4 +15,6 @@ export class BufferGeometryLoader extends Loader { ): void; parse( json: any ): InstancedBufferGeometry | BufferGeometry; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/CompressedTextureLoader.d.ts b/src/loaders/CompressedTextureLoader.d.ts index 6061909af280ab..ca97727abcd1ea 100644 --- a/src/loaders/CompressedTextureLoader.d.ts +++ b/src/loaders/CompressedTextureLoader.d.ts @@ -13,4 +13,6 @@ export class CompressedTextureLoader extends Loader { onError?: ( event: ErrorEvent ) => void ): CompressedTexture; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/CubeTextureLoader.d.ts b/src/loaders/CubeTextureLoader.d.ts index 12d7b3b3a04bea..d338de3e9da6a3 100644 --- a/src/loaders/CubeTextureLoader.d.ts +++ b/src/loaders/CubeTextureLoader.d.ts @@ -13,4 +13,6 @@ export class CubeTextureLoader extends Loader { onError?: ( event: ErrorEvent ) => void ): CubeTexture; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/DataTextureLoader.d.ts b/src/loaders/DataTextureLoader.d.ts index e49350915abf6a..02775050eaa53a 100644 --- a/src/loaders/DataTextureLoader.d.ts +++ b/src/loaders/DataTextureLoader.d.ts @@ -13,4 +13,6 @@ export class DataTextureLoader extends Loader { onError?: ( event: ErrorEvent ) => void ): void; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/FileLoader.d.ts b/src/loaders/FileLoader.d.ts index 8528f77435a131..10e2c6e9690c69 100644 --- a/src/loaders/FileLoader.d.ts +++ b/src/loaders/FileLoader.d.ts @@ -17,4 +17,6 @@ export class FileLoader extends Loader { setMimeType( mimeType: MimeType ): FileLoader; setResponseType( responseType: string ): FileLoader; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/FontLoader.d.ts b/src/loaders/FontLoader.d.ts index 28b1b189c3b515..229f1fec785e2e 100644 --- a/src/loaders/FontLoader.d.ts +++ b/src/loaders/FontLoader.d.ts @@ -14,4 +14,6 @@ export class FontLoader extends Loader { ): void; parse( json: any ): Font; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/ImageBitmapLoader.d.ts b/src/loaders/ImageBitmapLoader.d.ts index 48420a7bcc1c41..866e631ab949e3 100644 --- a/src/loaders/ImageBitmapLoader.d.ts +++ b/src/loaders/ImageBitmapLoader.d.ts @@ -20,4 +20,6 @@ export class ImageBitmapLoader extends Loader { onError?: ( event: ErrorEvent ) => void ): any; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/ImageLoader.d.ts b/src/loaders/ImageLoader.d.ts index f20d1e6ae8e400..2f7c391e6a2611 100644 --- a/src/loaders/ImageLoader.d.ts +++ b/src/loaders/ImageLoader.d.ts @@ -16,4 +16,6 @@ export class ImageLoader extends Loader { onError?: ( event: ErrorEvent ) => void ): HTMLImageElement; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/MaterialLoader.d.ts b/src/loaders/MaterialLoader.d.ts index 4ad016b26da674..fdf001edb6bb9c 100644 --- a/src/loaders/MaterialLoader.d.ts +++ b/src/loaders/MaterialLoader.d.ts @@ -21,4 +21,6 @@ export class MaterialLoader extends Loader { setTextures( textures: { [key: string]: Texture } ): this; parse( json: any ): Material; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/ObjectLoader.d.ts b/src/loaders/ObjectLoader.d.ts index 3db67234864567..e25d686b042356 100644 --- a/src/loaders/ObjectLoader.d.ts +++ b/src/loaders/ObjectLoader.d.ts @@ -31,4 +31,6 @@ export class ObjectLoader extends Loader { animations: AnimationClip[] ): T; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + } diff --git a/src/loaders/TextureLoader.d.ts b/src/loaders/TextureLoader.d.ts index 2901301926a2be..7e3e357e27ddc4 100644 --- a/src/loaders/TextureLoader.d.ts +++ b/src/loaders/TextureLoader.d.ts @@ -17,4 +17,6 @@ export class TextureLoader extends Loader { onError?: ( event: ErrorEvent ) => void ): Texture; + loadAsync( url: string, onProgress?: ( event: ProgressEvent ) => void ): Promise; + }