1 | import { Loader } from './Loader';
|
2 | import { LoadingManager } from './LoadingManager';
|
3 | import { Object3D } from './../core/Object3D';
|
4 | import { Texture } from './../textures/Texture';
|
5 | import { Material } from './../materials/Material';
|
6 | import { AnimationClip } from './../animation/AnimationClip';
|
7 | import { InstancedBufferGeometry } from '../core/InstancedBufferGeometry';
|
8 | import { BufferGeometry } from '../core/BufferGeometry';
|
9 |
|
10 | export class ObjectLoader extends Loader {
|
11 | constructor(manager?: LoadingManager);
|
12 |
|
13 | load(
|
14 | url: string,
|
15 |
|
16 | onLoad?: <ObjectType extends Object3D>(object: ObjectType) => void,
|
17 | onProgress?: (event: ProgressEvent) => void,
|
18 | onError?: (event: Error | ErrorEvent) => void,
|
19 | ): void;
|
20 | loadAsync<ObjectType extends Object3D>(
|
21 | url: string,
|
22 | onProgress?: (event: ProgressEvent) => void,
|
23 | ): // tslint:disable-next-line:no-unnecessary-generics
|
24 | Promise<ObjectType>;
|
25 | // tslint:disable-next-line:no-unnecessary-generics
|
26 | parse<T extends Object3D>(json: any, onLoad?: (object: Object3D) => void): T;
|
27 | // tslint:disable-next-line:no-unnecessary-generics
|
28 | parseAsync<T extends Object3D>(json: any): Promise<T>;
|
29 | parseGeometries(json: any): { [key: string]: InstancedBufferGeometry | BufferGeometry };
|
30 | parseMaterials(json: any, textures: Texture[]): Material[];
|
31 | parseAnimations(json: any): AnimationClip[];
|
32 | parseImages(json: any, onLoad: () => void): { [key: string]: HTMLImageElement };
|
33 | parseImagesAsync(json: any): Promise<{ [key: string]: HTMLImageElement }>;
|
34 | parseTextures(json: any, images: any): Texture[];
|
35 | parseObject<T extends Object3D>(
|
36 | data: any,
|
37 | geometries: any[],
|
38 | materials: Material[],
|
39 | animations: AnimationClip[],
|
40 | ):
|
41 | T;
|
42 | }
|