ObjectLoader.d.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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. export class ObjectLoader extends Loader {
  8. constructor( manager?: LoadingManager );
  9. load(
  10. url: string,
  11. onLoad?: <ObjectType extends Object3D>( object: ObjectType ) => void,
  12. onProgress?: ( event: ProgressEvent ) => void,
  13. onError?: ( event: Error | ErrorEvent ) => void
  14. ): void;
  15. parse<T extends Object3D>( json: any, onLoad?: ( object: Object3D ) => void ): T;
  16. parseGeometries( json: any ): any[]; // Array of BufferGeometry or Geometry or Geometry2.
  17. parseMaterials( json: any, textures: Texture[] ): Material[]; // Array of Classes that inherits from Matrial.
  18. parseAnimations( json: any ): AnimationClip[];
  19. parseImages(
  20. json: any,
  21. onLoad: () => void
  22. ): { [key: string]: HTMLImageElement };
  23. parseTextures( json: any, images: any ): Texture[];
  24. parseObject<T extends Object3D>(
  25. data: any,
  26. geometries: any[],
  27. materials: Material[],
  28. animations: AnimationClip[]
  29. ): T;
  30. }
粤ICP备19079148号